eXo Knowledge Reference Guide

exo.ks.docs.refguide - 2.1.0-CR02

Authors

eXo Platform (eXo Platform)

Acknowledgements
1. Configuration
1.1. General
1.1.1. Roles Plugin Configuration
1.1.2. Overview
1.1.3. Configuration
1.1.4. Mail Service Configuration
1.1.5. Overview
1.1.6. Runtime Configuration
1.1.7. Profile Provider Configuration
1.1.8. Overview
1.1.9. Configuration
1.2. Forum Configuration
1.2.1. Initialization Forum Plugin Configuration
1.2.2. Overview
1.2.3. Configuration
1.2.3.1. Default forum data
1.2.3.2. Forum array
1.2.3.3. Forum topics
1.2.4. Auto Prone Plugin Configuration
1.2.5. Overview
1.2.6. Configuration
1.2.7. Auto-count Active Users Plugin Configuration
1.2.8. Overview
1.2.9. Configuration
1.2.10. Forum Action Bar Configuration
1.2.11. Overview
1.2.12. Configuration
1.2.13. Default forum setting configuration
1.2.14. Overview
1.2.15. Configuration
1.2.16. Forum IP Login Configuration
1.2.17. Overview
1.2.18. Configuration
1.2.19. Bookmarkable Forum URLs Configuration
1.2.20. Overview
1.2.21. Changing the portlet preference
1.2.22. Changing in the UI
1.3. Answers Configuration
1.3.1. Answers Default Data Plugin
1.3.2. Overview
1.3.3. Configuration
1.3.3.1. Default Answers data
1.3.4. FAQ Preferences Configuration
1.3.5. Overview
1.3.6. Portlet Preferences
1.3.7. FAQ Mail Template Configuration
1.3.8. Overview
1.3.9. Configuration
2. Data Storage
2.1. FAQ JCR Structure
2.1.1. Overview
2.1.2. Category
2.1.3. Question and Question home
2.1.4. Answer, Comment and Attachment
2.1.5. FAQ Setting
2.1.6. Template for FAQ portlet
2.2. Forum JCR Structure
2.3. Overview
2.4. Forum System
2.4.1. Ban IP address and Ban IP address home
2.4.2. User profile and User profile home
2.4.3. Statistic and Statistic home
2.4.4. Administration and Administration home
2.5. Forum Data
2.5.1. Category and Category home
2.5.2. Forum
2.5.3. Topic
2.5.4. Post
2.5.5. Tag and Tag home
2.5.6. BBCode and BBCode home
2.5.7. Topic type and Topic type home

Acknowledgements

This book is produced by the Wikbook tool. Wikbook is an open source project for converting wiki files into a set of docbook files.

Chapter 1. Configuration

1.1. General

1.1.1. Roles Plugin Configuration

1.1.2. Overview

The roles plugin component is used to define user roles in eXo Forum and eXo FAQ. Roles are a convenient instrument to define access to a set of functions within the application.

Currently, it only allows to define who is in the administrator role. Administrators get access to administration functions.

At runtime, the application get data from the roles plugin in order to decide whether the logged user has the administration role or not.

1.1.3. Configuration

The plugin is configured in ks-plugins-configuration.xml file.

When a user signs in, his or her username, group and membership is compared with the user roles defined in the xml file that is provided by the roles plugin component.

In details:

At runtime of the Forum Service, the roles plugin component is called. The role plugin is configured in the ks-plugins-configuration.xml file. The component-plugin named add.role.rules.plugin refers to org.exoplatform.forum.service.conf.RoleRulesPlugin to create users for eXo Forum corresponding to the users that exist in the Organization database. Besides, the list of users who have administration roles is also defined.


  <component-plugin>
      <name>add.role.rules.plugin</name>
      <set-method>addRolePlugin</set-method>
      <type>org.exoplatform.forum.service.conf.RoleRulesPlugin</type>
      <description>add role rules</description>
      <init-params>
	      <value-param>
	        <name>role</name>
	        <description>name of the role</description>
	        <value>ADMIN</value>
	      </value-param>
	      <values-param>
	        <name>rules</name>
	        <description>rules of the role</description>
	        <value>root</value>
                <value>john</value> 
                <value>/platform/administrators</value> 
	        <value>member:/VIP</value>
		<value>validator:/VIP</value>
	        <!-value>*:/somegroup/somesubgroup</value->
	        <!-value>manager:/somegroup/someothergroup</value->
	      </values-param>
	 </init-params>
    </component-plugin>

When ks-plugins-configuration.xml file is executed, the administration role (with ADMIN value) will be checked and assigned to a matrix of users/groups/memberships defined inside "value" tags like below:

<value>...</value>

For example:

...
                <value>root</value>
                <value>john</value> 
                <value>/platform/administrators</value> 
	        <value>member:/VIP</value>
		<value>validator:/VIP</value>
...

With the example above, the default Forum Administrator are root , john, users in /platform/administrators group and users who are member/validator memberships in the VIP group.

When root, john or any user who belongs to the /platform/administrators group or users who have amember/validator memberships in the VIP group signs in to eXo Forum, he or she will be identified as the default Forum Administrator.

To add or remove the default Forum Administrator, simply edit ks-plugins-configuration.xml file and add or remove the correspondent "value" tags.

...             
                <values-param>
                 ...
                <value>...</value>
                 ...
                </values-param>
...

The default Forum Administrators can only change their roles by editing in ks-plugins-configuration.xml file.

At runtime, the modifications in the ks-plugins-configuration.xml file will be read and the database updated, the forum normal users and the default administration will be created correspondingly.

1.1.4. Mail Service Configuration

1.1.5. Overview

In KS, MailService comes from kernel, KS relies on this service to sends notifications via email.

This configuration initializes parameters for MailService, the parameters declare properties of a mail box that is used to send email notification.

1.1.6. Runtime Configuration

At runtime of KS, when the send mail function is executed, org.exoplatform.services.mail.MailService will be called that refers to org.exoplatform.services.mail.impl.MailServiceImpl.

Properties of MailService are defined with the format:

...
 <component>
  <key>org.exoplatform.services.mail.MailService</key> 
  <type>org.exoplatform.services.mail.impl.MailServiceImpl</type> 
- <init-params>
- <properties-param>
  <name>config</name> 
  <property name="mail.smtp.auth.username" value="notifuser" /> 
  <property name="mail.smtp.auth.password" value="somepassword" /> 
  <property name="mail.smtp.host" value="smtp.example.org" /> 
  <property name="mail.smtp.port" value="465" /> 
  <property name="mail.smtp.starttls.enable" value="true" /> 
  <property name="mail.smtp.auth" value="true" /> 
  <property name="mail.smtp.debug" value="false" /> 
  <property name="mail.smtp.socketFactory.port" value="465" /> 
  <property name="mail.smtp.socketFactory.class" value="javax.net.ssl.SSLSocketFactory" /> 
  <property name="mail.smtp.socketFactory.fallback" value="false" /> 
  </properties-param>
  </init-params>
  </component>

...

Properties:

Table 1.1. 

name description sample value
mail.smtp.auth.username Default user name for SMTP or the email address which is used to send notification mail. notifuser
mail.smtp.auth.password The password of the email address which is used to send notification mail. somepassword
mail.smtp.host The SMTP server to connect to or the host name of the email provider. smtp.example.org
mail.smtp.port The SMTP server port corresponding to the mail server of the email provider. 465
mail.smtp.starttls.enable If true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the server's certificate. true false
mail.smtp.auth If true, attempt to authenticate the user using the AUTH command. true false
mail.smtp.debug If true, in case there is error when connecting to SMTP server, warning will be returned. true false
mail.smtp.socketFactory.port Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used. 465
mail.smtp.socketFactory.class If set, specifies the name of a class that implements the socketFactory interface. This class will be used to create SMTP sockets. javax.net.ssl.SSLSocketFactory
mail.smtp.socketFactory.fallback If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created. true false

When sending an email in KS, those properties will use to connect to mail box(example: exoservice on gmail ) and send notification from there.

By fault, the default properties can only be changed by editing its value in ks-plugins-configuration.xml file and the user can configure an different mail box when deploying KS. Note that the properties which are used for SMTP Service must be exact.

At runtime, the modifications in ks-plugins-configuration.xml file will be read and updated, MailService will be executed depending on its properties.

1.1.7. Profile Provider Configuration

1.1.8. Overview

Forum and FAQ applications allow to show some information about the posters. The way we retrieve that information is pluggable through contact provider implementations.

For public internet websites, you may want to allow user provide personal information such as personal email address and location. To enable this simply override the ContactProvider component in your configuration.

1.1.9. Configuration

Configuration file format:

 <component>
    <key>org.exoplatform.forum.service.user.ContactProvider</key>
    <type>org.exoplatform.forum.service.user.PersonalProfileContactProvider</type>
 </component>  

For corporate websites, it is probably more advisable to use the business information such as professional phone or email address. In that case you would use the BusinessProfileContactProvider :

 <component>
    <key>org.exoplatform.forum.service.user.ContactProvider</key>
    <type>org.exoplatform.forum.service.user.BusinessProfileContactProvider</type>
 </component> 

If you run eXo Collaboration Suite on your portal you can get profile information from eXo Address Book contacts, including avatar image. To enable this nice feature :

 <component>
    <key>org.exoplatform.forum.service.user.ContactProvider</key>
    <type>org.exoplatform.forum.provider.cs.CSContactProvider</type>
</component>  

And finally you can create your own implementation to apply custom privacy policies.

1.2. Forum Configuration

1.2.1. Initialization Forum Plugin Configuration

1.2.2. Overview

The Initialization plugin component is used to define the default forum data in xml file. It includes categories,forums,topics and posts.

When Forum Service runs, it will get values which are returned from Initialization plugin component to initialize the default forum data.

1.2.3. Configuration

1.2.3.1. Default forum data

The default forum data is configured in ks-plugins-configuration.xml file.

In details:

At the runtime of Forum Service, Initailization plugin component is called, then ks-plugins-configuration.xml file is executed, the component-plugin named addInitialDataPlugin will be referred to org.exoplatform.forum.service.conf.InitializeForumPlugin to excute some objects to create default data for the forum application.


   <component-plugin>
     <name>default.data</name>
     <set-method>addInitialDataPlugin</set-method>
     <type>org.exoplatform.forum.service.conf.InitializeForumPlugin</type>
     <description>description</description>
     <init-params>
       <object-param>
         <name>livedemo.default.configuration</name>
         <description>initial data for live demo</description>
           <object type="org.exoplatform.forum.service.conf.ForumInitialData">
             <field name="categories">
              <collection type="java.util.ArrayList">
                <value>
                 <object type="org.exoplatform.forum.service.conf.CategoryData">
                   <field name="owner">
                     <string>root</string>
                   </field>
                   <field name="name">
                     <string>Knowledge Suite</string>
                   </field>
                   <field name="description">
                     <string>All about eXo KS</string>
                   </field>
                   <field name="forums">
                     <collection type="java.util.ArrayList">
                     <value>
                     <object type="org.exoplatform.forum.service.conf.ForumData">
                        <field name="owner"><string>root</string></field>
                        <field name="name"><string>Live demo</string></field>
                        <field name="description"><string>Questions about this demo</string></field>
                         <field name="topics">
                          <collection type="java.util.ArrayList">
                          <value>
                             <object type="org.exoplatform.forum.service.conf.TopicData">
                              <field name="name"><string>Demo data policy</string></field>
                              <field name="icon"><string>Tux</string></field>
                              <field name="owner"><string>root</string></field>
                              <field name="content"><string>Welcome to eXo Forum live demo...at anytime.</string></field>
                               <field name="posts">
                                  <collection type="java.util.ArrayList">
                                  <value>
                                  <object type="org.exoplatform.forum.service.conf.PostData">
                                  <field name="name"><string>Reply: Demo data policy</string></field>
                                  <field name="icon"><string>IconsView</string></field>
                                  <field name="owner"><string>root</string></field>
                                  <field name="content"><string>Enjoy and don't forget to send feedback at ks@exoplatform.com</string></field>
                       </object>
                      </value>
                     </collection>
                    </field>
                   </object>
                  </value>
                 </collection>
                </field>
               </object>
              </value>
             </collection>
            </field>
           </object>
          </value>
         </collection>
        </field>
       </object>
      </object-param>
     </init-params>
    </component-plugin>

1.1 Category array

After org.exoplatform.forum.service.conf.InitializeForumPlugin object is executed, org.exoplatform.forum.service.conf.ForumInitialData object is called. It returns a category array. The value of the category array is defined by org.exoplatform.forum.service.conf.CategoryData object like below:

  <object-param>
               <name>livedemo.default.configuration</name>
               <description>initial data for live demo</description>
               <object type="org.exoplatform.forum.service.conf.ForumInitialData">
                  <field name="categories">
                     <collection type="java.util.ArrayList">
                        <value>
                           <object type="org.exoplatform.forum.service.conf.CategoryData">
                              <field name="owner">
                                 <string>root</string>
                              </field>
                              <field name="name">
                                 <string>Knowledge Suite</string>
                              </field>
                              <field name="description">
                                 <string>All about eXo KS</string>
                              </field>
  1. category includes some basic data which are defined in field tag with specific name like below:

                              
         <field name="owner">
         <string>root</string>
         </field>
         <field name="name">
         <string>Knowledge Suite</string>
         </field>
         <field name="description">
         <string>All about eXo KS</string>
         </field>

In which:

Table 1.2. 

field description value sample
owner The user who is the creator of the category. root
name The name of the title of the category. Knowledge Suite
description The brief description of the category. All about eXo KS

1.1 Category value modification

The values of the default category can be changed by changing text values in string tag of each field by the other one.

With the sample code above, org.exoplatform.forum.service.conf.CategoryData object is called only one time. It means that only one default category is defined. If you want to define more default categories, repeat calling org.exoplatform.forum.service.conf.CategoryData object and define values for the new category with the sample code below:

     <value>
        <object type="org.exoplatform.forum.service.conf.CategoryData">
        <field name= " ">                             
           ...  
        </field> 
      </value>

1.2.3.2. Forum array

  1. category may contain one or more forums. The value of the forum is defined in forums field. It returns a forum array. The value of the forum array is defined by org.exoplatform.forum.service.conf.ForumData object like below:

    <field name="forums">
       <collection type="java.util.ArrayList">
       <value>
       <object type="org.exoplatform.forum.service.conf.ForumData">
         <field name="owner"><string>root</string></field>
         <field name="name"><string>Live demo</string></field>
         <field name="description"><string>Questions about this demo</string></field>
              ...

1.1 Basic forum data

A forum includes some basic data which are defined in field tag with specific name like above.

In which:

Table 1.3. 

field description value
owner The creator of the default forum. root any value
name The name or the title of the default forum. Live demo any value
description The brief description of the default forum. Questions about this demo any value

The values of the default forum can be changed by changing text values in string tag of each field by the other one.

With the sample code above, org.exoplatform.forum.service.conf.ForumData object is called only one time. It means that only one default forum is defined inside the default category named Knowledge Suite. If you want to define more default forums, repeat calling org.exoplatform.forum.service.conf.ForumData object and define values for the new forum with the sample code below:

    <value>
      <object type="org.exoplatform.forum.service.conf.ForumData">
      <field name=" ">
              ...
      </field> 
    </value>

1.2.3.3. Forum topics

  1. forum may contain one or more topics. The value of the topic is defined in topics field. It returns a topic array. The value of the topic array is defined by org.exoplatform.forum.service.conf.TopicData object like below:

    <field name="topics">
       <collection type="java.util.ArrayList">
       <value>
         <object type="org.exoplatform.forum.service.conf.TopicData">
             <field name="name"><string>Demo data policy</string></field>
             <field name="icon"><string>Tux</string></field>
             <field name="owner"><string>root</string></field>
             <field name="content"><string>Welcome to eXo Forum live demo. ... at anytime.</string></field>
                   ...

A topic includes some basic data which are defined in field tag with specific name like above. In which:

Table 1.4. 

field description value
name The name or the title of the default topic. Demo data policy
icon The default icon of the default topic. Tux
owner The creator of the default topic. root
content The main content of the default topic. Welcome to eXo Forum live demo...at anytime.This

This values of the default topic can be changed by changing text values in string tag of each field by the other one.

With the sample code above, org.exoplatform.forum.service.conf.TopicData object is called only one time. It means that only one default topic is defined inside the default forum named Live demo. If you want to define more default topics, repeat calling org.exoplatform.forum.service.conf.TopicData object and define values for the new topic with the sample code below:

      <value>
        <object type="org.exoplatform.forum.service.conf.TopicData">
        <field name=" ">
                    ...
        </field> 
      </value>
  1. topic may contain one or more posts. The value of the post is defined in posts field. It returns a post array. The value of the post array is defined by org.exoplatform.forum.service.conf.PostData object like below:

    <field name="posts">
      <collection type="java.util.ArrayList">
      <value>
        <object type="org.exoplatform.forum.service.conf.PostData">
        <field name="name"><string>Reply: Demo data policy</string></field>
        <field name="icon"><string>IconsView</string></field>
        <field name="owner"><string>root</string></field>
        <field name="content"><string>Enjoy and don't forget to send feedback at ks@exoplatform.com</string>     
      </field>
                             ...

A post includes some basic data which are defined in field tag with specific name like above.

In which:

Table 1.5. 

field description value
name The name or the title of the default post. Reply: Demo data policy
icon The default icon of the default post. IconsView
ownwer The creator of the default post. root
content The main content of the default post. Enjoy and don't forget to send feedback at ks@exoplatform.com

This values of the default post can be changed by changing text values in string tag of each field by the other one.

With the sample code above, org.exoplatform.forum.service.conf.PostData object is called only one time. It means that only one default post is defined inside the default topic named Demo data policy. If you want to define more default posts, repeat calling org.exoplatform.forum.service.conf.PostData object and define values for the new post with the sample code below:

       <value>
         <object type="org.exoplatform.forum.service.conf.PostData">
         <field name=" ">
               ...
         </field> 
       </value>

By fault, the default forum data can only be changed by editing in ks-plugins-configuration.xml file.

At the runtime, the new changes in ks-plugins-configuration.xml file will be executed and updated, the default forum data will be created correspondingly.

1.2.4. Auto Prone Plugin Configuration

1.2.5. Overview

Auto prune component is used to activate automatically the topics in specific Forums which are not activated (not viewed, edited or added post) for a period of time.

When Job Schedule Service runs, it will get values which are returned from Auto prune plugin component to identify the topics which have to be inactivated in Forum application. These topics will be invisible to users.

1.2.6. Configuration

The properties of Auto prune plugin is configured in ks-plugins-configuration.xml file.

In details:

At the runtime of Job Schedule Service, Auto prune plugin component is called, then ks-plugins-configuration.xml file is executed, the component-plugin named ForumDeactiveJob will be referred to org.exoplatform.forum.service.conf.DeactivePeriodJob to inactivate the topics in specific Forum which satisfy predefined inactivation properties.

<component-plugin>
      <name>ForumDeactiveJob</name>
      <set-method>addPeriodJob</set-method>
      <type>org.exoplatform.forum.service.conf.DeactivePeriodJob</type>
      <description>add a Deactive job to the JobSchedulerService</description>
      <init-params>
        <properties-param>
          <name>job.info</name>
          <description>save the monitor data  periodically</description>
          <property name="jobName" value="DeactiveJob"/>
          <property name="groupName" value="KnowlegedSuite"/>
          <property name="job" value="org.exoplatform.forum.service.conf.DeactiveJob"/>
          <property name="repeatCount" value="0"/>
          <property name="period" value="7200000"/> <!- 2 hours->    
          <property name="startTime" value="+0"/>
          <property name="endTime" value=""/>               
        </properties-param>
        <properties-param>
          <name>deactive.info</name>
          <description></description>
          <property name="inactiveDays" value="1"/>          
          <property name="forumName" value="Live demo"/>          
        </properties-param>
      </init-params>
    </component-plugin>

The properties for Auto-prune plugin are defined in property tag with format like below:

...
          <property name="jobName" value="DeactiveJob"/>
          <property name="groupName" value="KnowlegedSuite"/>
          <property name="job" value="org.exoplatform.forum.service.conf.DeactiveJob"/>
          <property name="repeatCount" value="0"/>
          <property name="period" value="7200000"/> <!-- 2 hours-->    
          <property name="startTime" value="+0"/>
          <property name="endTime" value=""/>               
...
          <property name="inactiveDays" value="1"/>          
          <property name="forumName" value="Live demo"/>          
 ...

In details:

Table 1.6. 

property description value
jobname The name of job which will be executed. DeactiveJob
groupname The name of the application which will be executed. KnowlegedSuite
job The reference function of the job which will be executed. org.exoplatform.forum.service.conf.DeactiveJob
repeatCount The repeat time for the job. It means that how many time the job will be executed. It means that DecactiveJob is called at runtime only. It is does not repeat. Assume that the value is 2 or 3, DecactiveJob is called 2 or 3 times. 0 any value
period The time interval the job will be executed. 72000000 (equal to 2 hours) any value
starttime The start time when the function will be executed. starttime is 0. It means that the time to start executing DecactiveJob is the runtime 0 any value
endtime The end time when the function will be stopped executing. endtime is blank. It means that there is no limitation for the end time for DecactiveJob. null

With start and end time, you can give a specific date in format:yyyy-mm-dd HH:mm:ss.sss to define the start and end time for DecactiveJob . Besides, deactive information is also defined:

Table 1.7. 

property description value
inactiveDays The number of days the topic has not been activated. inactivateDays is 1. It means that all the topics which have 1 inactivated day, will be set inactivated status. They will be invisible. numeric value
forumname The name of the Forum which will be checked for Auto prune. In case, forumname is blank. It means that all forums will be checked for auto prune. forumname is Live demo. It means that only the forum named 'Live demo' is checked for Auto prune. Live Demo

By fault, the default properties can only be changed by editing its value in ks-plugins-configuration.xml file.

At the runtime, the new changes in ks-plugins-configuration.xml file will be executed and updated, Auto prune plugin will be executed depending on its properties.

1.2.7. Auto-count Active Users Plugin Configuration

1.2.8. Overview

Auto-count Active Users component is used to calculate automatically the number of active users. A user is considered as an active user only when he/she often adds topic/post in Forum and his/her last post date satisfies with the interval time that is predefined.

For example, after 15 days if one user does not have any new post, he/she is not considered as an active user.

When Job Schedule Service runs, it will get values which are returned from Auto-count Active Users plugin component to identify the number of active users. This value is updated at Active Members information when viewing Forum statistics.

1.2.9. Configuration

The properties of Auto-count Active Users plugin is configured in ks-plugins-configuration.xml file.

In details:

At Job Schedule Service runtime, Auto-count Active Users plugin component is called, then ks-plugins-configuration.xml file is executed, the component-plugin named RecountActiveUserJob will be referred to org.exoplatform.forum.service.conf.RecountActiveUserPeriodJob to calculate number active users.

 <component-plugin>
      <name>RecountActiveUserJob</name>
      <set-method>addPeriodJob</set-method>
      <type>org.exoplatform.forum.service.conf.RecountActiveUserPeriodJob</type>
      <description>add a RecountActiveUser job to the JobSchedulerService</description>
      <init-params>
        <properties-param>
          <name>job.info</name>
          <description>save the monitor data  periodically</description>
          <property name="jobName" value="RecountActiveUserJob"/>
          <property name="groupName" value="KnowlegedSuite"/>
          <property name="job" value="org.exoplatform.forum.service.conf.RecountActiveUserJob"/>
          <property name="repeatCount" value="0"/>
          <property name="period" value="7200000"/> <!- 2 hours->    
          <property name="startTime" value="+0"/>
          <property name="endTime" value=""/>               
        </properties-param>
        <properties-param>
          <name>RecountActiveUser.info</name>
          <description></description>
          <property name="lastPost" value="15"/> <!- users are active if have last posts in 15 day ->
        </properties-param>
      </init-params>
    </component-plugin>

The properties for Auto-count Active Members plugin are defined in property tag like below:

...
          <property name="jobName" value="RecountActiveUserJob"/>
          <property name="groupName" value="KnowlegedSuite"/>
          <property name="job" value="org.exoplatform.forum.service.conf.RecountActiveUserJob"/>
          <property name="repeatCount" value="0"/>
          <property name="period" value="7200000"/> <!-- 2 hours-->    
          <property name="startTime" value="+0"/>
          <property name="endTime" value=""/>     
...
         <property name="lastPost" value="15"/> 
 ...

In which:

Table 1.8. 

property description value
jobname The name of job which will be executed. RecountActiveUserJob
groupname The name of the application which will be executed. KnowlegedSuite
job The reference function of the job which will be executed. org.exoplatform.forum.service.conf.RecountActiveUserJob
repeatCount The repeat time for the job. It means that how many time the job will be executed. repeatCount is 0. It means that RecountActiveUserJob is called at runtime only. It is does not repeat. Assume that the value is 2 or 3, RecountActiveUserJob is called 2 or 3 times. 0 any value
period The time interval the job will be executed. 7200000 (millisecond) (equal to 2 hours)
starttime The start time when the function will be executed. starttime is 0. It means that the time to start executing RecountActiveUserJob is the runtime. 0 any value
endtime The end time when the function will be stopped executing. endtime is blank. It means that there is no limitation for the end time for RecountActiveUserJob . null

With start and end time, you can give a specific date in format:yyyy-mm-dd HH:mm:ss.sss to define the start and end time for RecountActiveUserJob . Besides, active time information is also defined:

Table 1.9. 

property description value
lastPost The number of days that the user has added last post. lastPost is 15. It means that all users, within 15 days since their last post date, have any new post, they are active members. numeric value

By default, the default properties can only be changed by editing its value in ks-plugins-configuration.xml file.

At the runtime, the new changes in ks-plugins-configuration.xml file will be executed and updated, Auto-count Active Users plugin will be executed depending on its properties.

1.2.10. Forum Action Bar Configuration

1.2.11. Overview

Main action bar displays all main function buttons. The number of function buttons depending on the role of user login. Currently, the main action bar is only visible on the homepage. It disappears when you focus into other pages. But Show/hide main action bar is an option, you can configure the main action to be shown or hidden in all pages all the time.

1.2.12. Configuration

The value is to determine to show/hide main action bar in Forum is true or false.

In case true,Main action bar is shown on all pages.

In case false, Main action bar is only show on the homepage.

This value is defined in portlet.xml file like below:

...
 <portlet-preferences>
  <preference>
	<name>showForumActionBar</name>
	<value>false</value> <!- true/false ->
	<read-only>false</read-only>
  </preference>
 </portlet-preferences>
...

In which:

Table 1.10. 

parameter description value
name The name of function which will be executed. showForumActionBar any value
value The value is to determine whether to show main action bar or hide true false
read only The value is to determine the value will be show 1 time only or depending the times the showForumActionBar function is called. True is for 1 only time and False is for dynamic. true false

1.2.13. Default forum setting configuration

1.2.14. Overview

Default forum setting includes settings set for new user account. It contains declarations of time zone, short date format, long date format, time format, max topic per page, max post per page and flag for showing forum jump or not. It's rather simple and user can change such settings by UI based function after that.

1.2.15. Configuration

This configuration is declared in a file named "ks-configuration.xml". Its path is "tomcat source/webapps/ks-extension/WEB-INF/ks-extension/ks/ks-configuration.xml" if you are running tomcat and "project source/extension/webapp/src/main/webapp/WEB-INF/ks-extension/ks/ks-configuration.xml" if you are in developing phase.

In details:


...
 <external-component-plugins>
    <target-component>org.exoplatform.services.organization.OrganizationService</target-component>
    <component-plugin>
     ...
      <init-params>
        <properties-param>
          <name>user.profile.setting</name>
          <description>set default user profile</description>
          <property name="timeZone" value="GMT"/>
          <property name="shortDateFormat" value="MM/dd/yyyy"/>
          <property name="longDateFormat" value="DDD,MMM dd,yyyy"/>
          <property name="timeFormat" value="hh:mm a"/>
          <property name="maxTopic" value="10"/>
          <property name="maxPost" value="10"/>
          <property name="isShowForumJump" value="true"/>
          
        </properties-param>
      </init-params>
      
      
    </component-plugin>
  </external-component-plugins>
...

In which:

Table 1.11. 

parameter description value
timeZone time zone of user time zone id. For example: GMT, GMT-05:00, GMT+07:00, GMT+08:30 ... visit http://java.sun.com/j2se/1.4.2/docs/api/java/util/TimeZone.html for more detail.
shortDateFormat the format to display short information of a date String date format visit http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html to ensure the format exactly.
longDateFormat the format to display a date with more infomation String date format visit http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html to ensure the format exactly.
timeFormat format to view time(hour, minute,..) String time format visit http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html to ensure the format exactly.
maxTopic maximum number of topics on a page number
maxPost maximum number of posts on a page number
isShowForumJump show forum jump or not true false

1.2.16. Forum IP Login Configuration

1.2.17. Overview

IP logging is the IP of the computer which is used to connect Internet and do action in Forum. For example, when users add a topic or post in Forum, their IP address can be saved enclosing with their entry. Only the administrator can view that IP information.

However, get and save IP information is an option. The supper administrator can determine whether to get and save IP information or not.

1.2.18. Configuration

The value is to determine to get and save IP enclosing with post in Forum is true or false.

In case true, the IP is gotten, saved and shown enclosing with post.

In case false, the IP is not gotten and saved.

This value is defined in portlet.xml file like below:

...
 <portlet-preferences>
  <preference>
	<name>enableIPLogging</name>
	<value>true</value> <!-true/false ->
	<read-only>false</read-only>
	</preference>
  </portlet-preferences>
...

In which:

Table 1.12. 

parameter description value
name The name of function which will be executed. enbaleIPLogging any value
value The value is to determine whether to get IP or not. true false
read only The value is to determine the value will be gotten 1 time only or depending the times the enableIPLogging function is called. True is for 1 only time and False is for dynamic. true false

The administrator can determine whether to get or save the IP logging or not by simply editing the value of this portlet preference in portlet.xml file with two optional value true or false.

1.2.19. Bookmarkable Forum URLs Configuration

1.2.20. Overview

This feature defines how the links are generated in the Forum application. You can choose to use ajax or not.

  • By not using Ajax, the Forum will generate plain URLs in the links. The added benefit will be bookmarkability and better SEO as the links will be permalinks.

  • Using ajax, the links will be javascript based and generate ajax calls. This should make browsing faster because the whole page is not reloaded.

This article will explain how to configure the ajax setting for the forum portlet.

1.2.21. Changing the portlet preference

The setting is called useAjax and is defined in portlet.xml file below:

<preference>
 <name>useAjax</name>
 <value>true</value> <!--true/false -->
 <read-only>false</read-only>
</preference>

By default, 'true' value is set. Because using Ajax will makes the speed of the Forum process fatser.

If you want to show the detail link to any forum/topic in the Forum Application, simply replace 'true' value by 'false', the Forum Application will be displayed with the detail link to the page that is being viewed.

1.2.22. Changing in the UI

[Note]Note

Since KS 1.2

The easiest way to configure bookmarkability of the forum urls is to use the UI. Go to the portlet Edit Mode, then go to tab "Options", then uncheck "Use Ajax" option.

1.3. Answers Configuration

1.3.1. Answers Default Data Plugin

1.3.2. Overview

The Initialization plugin component is used to define the default answers data in xml or zip file. It includes categories of question and that should be exported from a eXo Answers application.

When Answers Service starts, it will get values which are returned from Initialization plugin component to initialize the default Answers data.

1.3.3. Configuration

1.3.3.1. Default Answers data

The default Answers data is configured in services-configuration.xml file.

In details:

At the run time of Answers Service, Initailization plugin component is called, then services-configuration.xml file is executed, the component-plugin named addInitialDataPlugin will be referred to org.exoplatform.faq.service.InitializeDataPlugin to excute some objects to create default data for the forum application.

When initialize default data in a zip file

<component-plugin>
      <name>technical-faq</name>
      <set-method>addInitialDataPlugin</set-method>
      <type>org.exoplatform.faq.service.InitialDataPlugin</type>
      <description>Initialize</description>
      <init-params>
        <value-param>
          <name>location</name>
          <description>location where Answers export format file is stored</description>
          <value>war:/data/Technical-FAQ.zip</value>
        </value-param>
      </init-params>
    </component-plugin>

If the default data in xml format

<value>war:/data/Technical-FAQ.xml</value>

By default, the default Answers data can only import if the importing categories does not exist in database.

To initialize default data in multiple files needs to declare them in multiple plugin

<component-plugin>

.....

</component-plugin>

1.3.4. FAQ Preferences Configuration

1.3.5. Overview

FAQ is configured mainly in two files:

  • Portlet preferences : /webapps/faq/WEB-INF/portlet.xml

  • Services configuration : WEB-INF/conf/ks-plugins-configuration.xml

[Note]Note

For general KS configuration information, please refer to [KS Configuration| KS:KS Manual#Configuration] section

1.3.6. Portlet Preferences

FAQ portlet has portlet preferences that you can configure to alter the behavior.

At runtime you can use the portlet EDIT mode to set the preferences :

Alternatively, you may want to configure the portlet in portet-preferences.xml file.

Table 1.13. 

Preference Values Default Description Since
display approved, both both Indicate if only unapproved questions are hidden to normal users 1.0
orderBy alphabet,created alphabet Default sort order for questions 1.0
orderType asc,desc asc Default sort direction ascending or descending 1.0
SendMailAddNewQuestion email notification template (see below) blank Template for email notifications when a new FAQ entry is added. A blank vaue will use default template. 1.0
SendMailEditResponseQuestion email notification template (see below) blank Template for email notifications when a new FAQ entry is added. A blank vaue will use default template. 1.0
enableVotesAndComments true, false true Enable or disable votes and comments feature 1.1
enableAutomaticRSS true, false true Enable or disable RSS feature 1.1
isDiscussForum true, false false Enable or disable discuss question in forum feature 1.1
pathNameCategoryForum any value blank Define the forum path which is used for discussion. Blank value means the forum path will be defined later in FAQ portlet settings. 1.1
enableViewAvatar true, false true Enable or disable avatar feature 1.1

Default Portlet Preferences

As a reference, the default portlet.xml for FAQ application is:

<portlet-preferences>
  <preference>
    <name>display</name>
    <value>both</value> <!-approved/both ->
    <read-only>false</read-only>
  </preference>
  <preference>
    <name>SendMailAddNewQuestion</name>
    <value> </value>
    <read-only>false</read-only>
  </preference>
  <preference>
    <name>SendMailEditResponseQuestion</name>
    <value> </value>
    <read-only>false</read-only>
  </preference>
  <preference>
    <name>orderBy</name>
    <value>alphabet</value> <!-alphabet/created ->
    <read-only>false</read-only>
  </preference>
  <preference>
    <name>orderType</name>
    <value>asc</value>      <!- asc/desc ->
    <read-only>false</read-only>
  </preference>
  <preference>
    <name>enableAutomaticRSS</name>
    <value>true</value> <!- true/false ->
    <read-only>false</read-only>
  </preference>
  <preference>
    <name>enableVotesAndComments</name>
    <value>true</value> <!- true/false ->
    <read-only>false</read-only>
  </preference>
  <preference>
    <name>isDiscussForum</name>
    <value>false</value>
    <read-only>false</read-only>
  </preference>
  <preference>
     <name>pathNameCategoryForum</name>
     <value> </value>
     <read-only>false</read-only>
   </preference>
  <preference>
      <name>enableViewAvatar</name>
      <value>true</value> <!- true/false ->
      <read-only>false</read-only>
  </preference>
</portlet-preferences>    

1.3.7. FAQ Mail Template Configuration

1.3.8. Overview

FAQ is configured mainly in two files:

  • Portlet preferences : /webapps/faq/WEB-INF/portlet.xml

  • Services configuration : WEB-INF/conf/ks-plugins-configuration.xml

[Note]Note

For general KS configuration information, please refer to [KS Configuration| KS:KS Manual#Configuration] section

1.3.9. Configuration

Mail templates use a specific syntax that you can use to create a customized email message:

Parameters:

Table 1.14. 

Parameter Description
&categoryName To load the category's name.
&questionContent To load the question's content.
&questionResponse To load the question's answer.
here: To load the link to question in FAQ.

Chapter 2. Data Storage

2.1. FAQ JCR Structure

2.1.1. Overview

eXo FAQ is a JCR based application. FAQ information is saved in eXo-JCR under FAQservice data directory.

2.1.2. Category

Category is created from exo:faqCategory nodetype and defined to add data inside as:

  • Sub-Category

  • Question Home

  • RSS

System auto creates category home under FAQ application node when the first time launch application. All users create categories are the sub-category of category home.

The home category auto created here:

<tt> /exo:applications/faqApp/categories </tt>

  • Sub-Category

In fact, sub category is also a category, we defined a mixin nodetype called mix:faqSubCategory* to allow add a node with the same type with category to a existing category. When a category is created this mixin nodetype will be mixed to that category.

  • RSS

Each category has a RSS child node that stores a RSS feed representing all question in this category as binary data type. node type exo:faqRSS

<tt> /exo:applications/faqApp/categories/ks.rss </tt>

2.1.3. Question and Question home

Question home node creates from exo:faqQuestionHome nodetype that is defined as a child node of category. This node is containing all question node that created in side a category. Only question nodetype (exo:faqQuestion) can be added to question home.

The question home is created as a child node of category

<tt> /exo:applications/faqApp/categories/questions </tt>

  • Question

Question node creates from exo:faqQuestion nodetype under question home. The answers, comments and attachments are defined as child node of question.

The question node create under question home

<tt> /exo:applications/faqApp/categories/questions/Question7364ba00c0a8014700bcf58acbbafae2 </tt>

  • Multilanguages

Question support multilanguages, all other languages are storing as a child node of question and can be add to question via a mixin nodetype called mix:faqi18n

After added mixin nodetype mix:faqi18n to question, the nodetype exo:questionLanguageHome can add to question node and this nodetype will containing all languages node with nodetype exo:faqLanguage, all display properties of question are defined in exo:faqLanguage nodetype

2.1.4. Answer, Comment and Attachment

Answer, comment and attachment are defined as child nodes of question node. Attachment is defined as a nt:file nodetype and storing directly under question node. Answers and comments are storing under answer home and comment home nodes

  • exo:answerHome/exo:answer

<tt> /exo:applications/faqApp/categories/questions/Question7364ba00c0a8014700bcf58acbbafae2/faqAnswerHome/Answer736e99dec0a8014701622a1157719bb4 </tt>

  • exo:commentHome/exo:comment

<tt> /exo:applications/faqApp/categories/questions/Question7364ba00c0a8014700bcf58acbbafae2/faqCommentHome/Comment736e99dec0a8014701622a1157719bb4 </tt>

2.1.5. FAQ Setting

Storing information for sort data as order by, order type, sort question by vote. Each user has a dedicate setting for display data in faq as they want, the default setting is used if user have never save a setting. Node type is exo:faqUserSetting

<tt> /exo:applications/faqApp/settingHome/userSettingHome/$username} </tt>

2.1.6. Template for FAQ portlet

This place stores template for FAQ portlet. User can online edit this template in FAQ portlet to change layout, skins,... The template is storing in an nt:file nodetype under template home node

<tt> /exo:applications/faqApp/templateHome/nt:file </tt>

2.2. Forum JCR Structure

2.3. Overview

eXo Forum is a JCR based application. Forum information is saved in eXo-JCR under ForumService data directory.

2.4. Forum System

Forum system node creates from nodetype exo:forumSystem. That is defined as a child node of ForumService and can store nodes with nodetype as exo:banIP, exo:forumUserProfile, exo:statistic, exo:administration under forum system.

<tt> /exo:applications/ForumService/ForumSystem <tt>

2.4.1. Ban IP address and Ban IP address home

Storing information about banned IP address access forum. Node type is exo:banIP, exo:banIPHome

The banIP stores under ForumSystem node

<tt> /exo:applications/ForumService/ForumSystem/exo:banIPHome/exo:banIP <tt>

2.4.2. User profile and User profile home

Storing information of each user, user profile is auto created by a listener when user register to organization service. Private message can be added to user profile as a child node. Node type is exo:forumUserProfile, exo:userProfileHome. Private message exo:privateMessage define as child node of exo:forumUserProfile

The user profile stores under ForumSystem node

<tt> /exo:applications/ForumService/ForumSystem/exo:userProfileHome/exo:forumUserProfile <tt>

2.4.3. Statistic and Statistic home

Storing Statistic information of forum as number of posts, topics, users, active users, ... Node type is exo:forumStatistic, exo:statisticHome

The Statistic stores under ForumSystem node

<tt> /exo:applications/ForumService/ForumSystem/exo:statisticHome/exo:forumStatistic <tt>

2.4.4. Administration and Administration home

Storing informations for setting the layout, email notify format and censor works. Node type is exo:administration, exo:administrationHome

The Administration stores under ForumSystem node

<tt> /exo:applications/ForumService/ForumSystem/exo:administrationHome/exo:administration <tt>

2.5. Forum Data

Forum data node creates from nodetype exo:forumData. The data nodes as category, forum, topic, post, tag, BBcode, topic type will store under forum data node.

<tt> /exo:applications/ForumService/ForumData <tt>

2.5.1. Category and Category home

Category home is defined for stores all categories of forum, this node is a child node of ForumData node and only category nodetype can be added to category home. Node type is exo:categoryHome

<tt> /exo:applications/ForumService/ForumData/CategoryHome <tt>

Category (node type is exo:forumCategory) is a child node of category home, this nodetype defined to allow add child nodes as exo:forum and exo:forumRSS

<tt> /exo:applications/ForumService/ForumData/CategoryHome/Category736e99dec0a8014701622a1157719bb4 <tt>

2.5.2. Forum

Forum node is defined as child node of category and allowed add child nodes as Topic and RSS type. Node type is exo:forum

<tt> /exo:applications/ForumService/ForumData/CategoryHome/Category736e99dec0a8014701622a1157719bb4/Forum1622a1157719bb4736e99dec0a801470 <tt>

2.5.3. Topic

Topic nodetype is defined as child node of Forum and allowed add child nodes as Topic, Poll and RSS type. Node type is exo:topic, exo:poll

<tt> /exo:applications/ForumService/ForumData/CategoryHome/Category736e99dec0a8014701622a1157719bb4/Forum1622a1157719bb4736e99dec0a801470/Topica8014701622a1157719bb4736e99dec0 <tt>

2.5.4. Post

Post nodetype is defined as child node of Topic and allowed add only attachment type child node. Node type is exo:post, exo:forumAttachment

<tt> /exo:applications/ForumService/ForumData/CategoryHome/Category736e99dec0a8014701622a1157719bb4/Forum1622a1157719bb4736e99dec0a801470/Topica8014701622a1157719bb4736e99dec0/Posta157719bb4736e99dec08014701622a1 <tt>

2.5.5. Tag and Tag home

Tag is storing in formation about name, topic that tag added, number of user used this tag, number of tag in used. Node type is exo:forumTag, exo:tagHome

<tt> /exo:applications/ForumService/ForumData/TagHome/tag2a1157719bb4736e99dec0a801470162 <tt>

2.5.6. BBCode and BBCode home

Defined BBCode that is using in forum, Node type is exo:forumBBCode, exo:forumBBCodeHome

<tt> /exo:applications/ForumService/ForumData/forumBBCode/$bbcodename} <tt>

2.5.7. Topic type and Topic type home

Node type is exo:topicType, exo:topicTypeHome

<tt> /exo:applications/ForumService/ForumData/TopicTypeHome/topicType2ec0a801470162a1157719bb4736e99d <tt>