This chapter provides you with a comprehensive view about applications in Knowledge, including:

  • Portlets

    Details (package, portlet.xml, and portlet preferences) of all portlets used in Knowledge, including Forum, Answers, FAQ and Polls.

  • Gadgets

    Introduction to Poll Gadget, its preferences and links to used REST services.

These applications are packaged as Web application archives (WARs).

Also, you can specify the package of each portlet and gadget and its available preferences that allow you to extend the configuration choices for standard preferences.

  • Forum Portlet

    Details (including package, portlet.xml, preferences and events) of the Forum application which allows posting and reading messages on different topics.

  • Answers Portlet

    Details (including package, portlet.xml, preferences) of the Answers application that allows creating answers, replying and managing questions.

  • FAQ Portlet

    Details (including package, portlet.xml, preferences) of the FAQ application which allows showing questions and answers.

  • Polls Portlet

    Details (including package, portlet.xml, preferences) of the Poll application which allows voting any ideas, or activities.

See also

The Forum portlet is the application for users to post and read messages on different topics.

Package

This portlet is packaged in the forum.war file.

Portlet.xml

Preferences

Preference name Possible value Default value Description
useAjax true, false true Define if links in the Forum will be plain hrefs or javascript ajax (better for SEO) or not.
showForumActionBar true, false true This is the UIForumActionBar. If the value is set to "true", the UIForumActionBar will be shown. If false, the UIForumActionBar will be hidden.
forumNewPost day number 1 Specify if a post is new. If the post is created within the set period, it is new in the Forum.
enableIPLogging true, false true Enable the IP logging function in the Forum. IP addresses of all posts will be collected.
enableIPFiltering true, false true Enable the IP filter function in Forum, enabling IP addresses to be blocked in the Forum.
invisibleCategories id categories empty Hide some categories. If the value is set empty, all categories of the Forum will be shown.
invisibleForums id forums empty Hide some Forums. All Forums will be shown if the value is set empty.
uploadFileSizeLimitMB integer 20 Limit the size of uploaded files in MB in the Forum.
isShowForumJump true, false true Specify if the Forum jump panel is shown or not.
isShowIconsLegend true, false true Specify if the icon legends panel is shown or not.
isShowModerators true, false true Specify if the moderators panel is shown or not.
isShowPoll true, false true Specify if the poll panel is shown or not.
isShowQuickReply true, false true Specify if the quick reply panel is shown or not.
isShowRules true, false true Specify if the forum rules panel is shown or not.
isShowStatistics true, false true Specify if the statistics panel is shown or not.

Events

Name Description
ForumLinkEvent Set the render for UIForumLinkPortlet and set values for UIForumLinks.
ReLoadPortletEvent Reload UIForumPortlet.
OpenLink Update values for UIForumLinks.
ForumPollEvent Set the render for UIForumPollPortlet.
ForumModerateEvent Set the render for UIForumModeratorPortlet.
ForumRuleEvent Set the render for UIForumRulePortlet.
QuickReplyEvent Set the render for UIForumQuickReplyPortlet.

ForumLinkEvent This event is fired through UIForumLinkPortlet.

To receive ForumLinkEvent, you must use the ForumParameter class with two properties:

Name Type Possible value Description
isRenderForumLink boolean true/false If the value is set to true or false, the Forum link is rendered or not respectively.
path string The absolute path of the class node (including types: category, forum, topic) defined by JCR. Set data for the UIForumLinkPortlet.

For example:

ReLoadPortletEvent This event is fired through UIForumPortlet.

To receive ReLoadPortletEvent, you must use the ForumParameter class with two properties:

Name Type Possible value Description
topicId string Id of topic. Return the id of topic for UIForumPortlet
isRenderPoll boolean true/false If the value is set to true or false, the UITopicPoll component is rendered or not respectively.

For example:

OpenLink This event is fired through UIForumPortlet.

To receive OpenLink, you must use the ForumParameter class with one property:

Name Type Possible value Description
path string The absolute path of the node defined by JCR. Set data for the UIForumPortlet.

For example:

ForumPollEvent This event is fired through UIForumPollPortlet.

To receive ForumPollEvent, you must use the ForumParameter class with four properties:

Name Type Possible value Description
isRenderPoll boolean True/false If the value is set to true or false, the UIForumPollPortlet portlet is rendered or not respectively.
categoryId string Id of category Return the Id of category for UIForumPollPortlet.
forumId string Id of forum Return the Id of forum for UIForumPollPortlet.
topicId string Id of topic Return the Id of topic for UIForumPollPortlet.

For example:

ForumModerateEvent This event is fired through UIForumModeratePortlet.

To receive ForumModerateEvent, you must use the ForumParameter class with two properties:

Name Type Possible value Description
isRenderModerator boolean True/false If the value is set to true or false, the UIForumModeratePortlet portlet is rendered or not respectively.
moderator list of strings List of user name Set data for UIForumModeratePortlet.

For example:

ForumRuleEvent This event is fired through UIForumRulePortlet.

To receive ForumRuleEvent, you must use the ForumParameter class with two properties:

Name Type Possible value Description
isRenderRule boolean True/false If the value is set to true or false, the UIForumRulePortlet portlet is rendered or not respectively.
infoRules list of strings The list of states: can create topic, can add post and topic has lock. Set permissions for users in UIForumRulePortlet.

For example:

QuickReplyEvent This event is fired through UIQuickReplyPortlet.

To receive QuickReplyEvent, you must use the ForumParameter class with five properties:

Name Type Possible value Description
isRenderQuickReply boolean True/false If the value is set to true or false, the UIQuickReplyPortlet portlet is rendered or not respectively.
isModerator boolean True/false Specify if the user is moderator of forum containing the topic with quick reply or not.
categoryId string Id of category Return the Id of category for UIQuickReplyPortlet.
forumId string Id of forum Return the Id of forum for UIQuickReplyPortlet.
topicId string Id of topic Return the Id of topic for UIQuickReplyPortlet.

For example:

The Answers portlet is the application to create answers, reply and manage questions.

Package

This portlet is packaged in the faq.war file.

Portlet.xml

Portlet Preferences

The Answers portlet consists of preferences as follows:

Preference name Possible value Default value Description
enableViewAvatar true, false true Enable users to view the avatar of owner posting the question.
enableAutomaticRSS true, false true Enable users to get RSS automatically.
enableVotes AndComments true, false true Enable users to give votes and comments for the question.
enableAnonymous SubmitQuestion true, false true Enable anonymous users to submit questions.
display approved, both both Enable administrators to view unapproved questions in the questions list in UIQuestions.
SendMailAdd NewQuestion string empty Display the content of sent email when a new question is added.
SendMailEdit ResponseQuestion string empty Display the email content when a response is edited.
emailMoveQuestion string empty Display the email content when a question is moved.
orderBy alphabet, created alphabet Arrange questions in the alphabet or created date order.
orderType asc, desc asc Display questions in the ascending or descending order.
isDiscussForum true, false false Enable the DiscussQuestions function.
idNameCategoryForum CategoryName, ForumName empty Select categories and forums for the DiscussionQuestions function.
uploadFileSizeLimitMB integer 20 Set the maximum size of uploaded files in MB.
Copyright © 2009-2012. All rights reserved. eXo Platform SAS