Reference library

Article number: 303186

Using posts for forums

Sitekit CMS's new forums system is built on the post architecture. A forum is created and can contain multiple discussion or threads, if they have the rights users can create new discussions or add to posts to exisiting discussions.

In this page we indicate how posts can be used to create moderated or unmoderated forums. 

The steps are as follows

  1. Create a posttype of type 'forum'
  2. Create a page and set its contentlayout to use the new forum post type
  3. Configure your access rights
  4. Administer your form, edit, manage and approve posts

The above is a simple example and uses the default site and XSL styling, there would also be option via alternative searchposts data islands to provide customised forum system with altered functionality.

In more detail:

There's two equivalent options for creating new forums

  1. Under the configure tab, click on posts, add a new posttype called say ‘Tech help’ and then open it up and set its type to 'forum'. 
  2. Under the configure tab, click on forums, add a new forum called say ‘Tech help’

Once a posttype has been set to type forums using method one, it no longer appears in the posttype table and can only then be edited via the forums path. The new post type can be edited by clicking on it as shown below. This forum has been set to be moderated.

forumadmin

Whenever someone posts on a forum discussion, a notification email is sent to everyone else who has commented on that discussion, together with the person who started that discussion (10.2). The format and content of the email are handled by some new magic words and are configured at the bottom of the forum posttype dialog box as shown below.

The new page is then created as normal and its content derived from 'posts:Tech help'. The forum is now ready to populate. 

Access rights

Forums can be set up in extranet areas or in open pages. In the latter case the user will always be prompted to login before submitting any new posts or discussions. The ability to add discussions, add posts and whether entries to both are moderated or not is governed in several areas:

  • Moderation - this is set by ticking the 'moderated' checkbox in the forums post type. This governs whether any discussion or post added by user are seen immediately or require to be approved by adminstrators befor being visible
  • Lock - this is set by clicking on the 'lock' link in the manage forums page in admin. Accessed via the 'Manage' tab and then selecting the relevant forum in the collaboration section. Locking a discussion prevents an users from adding new posts to it. It's also possible to create a forum where the user can add to existing discussions but not create their own, this would be achieved via cutomising the initial forum.xsl.
  • Visibility - visibility of the forum can be controlled by setting the access controls on the relevant asset classes that the forum components are in. Different asset classes can be assigned to the forum's page, the forum's posttype, the discussion/thread and the individual posts themselves. 
  • Access control - It is possible to create a user group who's members can post directly to a moderated forum without approval. In such a case the relevant group's rights need to be set to 'administer' for the asset class in use, as shown below. In such a case any user in the 'extranet' group could post into a moderated forum without approval.
forumadminrights

Forum display

The default styling of the resulting forum is shown below. The forum displays icons for pinned and locked discussions that are held in the local CSS.  

forumlist

The post list from a single thread is shown below. The header is a breadcrumb trail allowing the user to navigate back to the main discussion.

forumpost2

If a user wants to start a new discussion they're prompted for a login and then presented with this form

discussion

When the script manager is implemented correctly the front end text entry is a cut down rich text editor as shown above (10.2). From a previous version of the CMS the discussion form does support a truncated version of bb (bulletin board) syntax to allow users to mark up their entries, however this will likely be deprecated in the near future.

Email notifications (10.2)

When a post is added to a forum discussion, all other participants are sent an email notification. The notification email name (from), subject, and body can be customised in the forum configuration. The following variables can be included in order to insert content relevant to the discussion in question:-

:::site.name:::
###discussion.name###
###discussion.body###
###discussion.owner.fullname###
###discussion.owner.email###
###comment.owner.fullname###
###comment.owner.email###
###comment.body###
###posttype.name.singular###
###posttype.name.plural###

Forum administration

The forum is administered via the CMS. The administration system allows discussion to  be deleted, approved, edited, pinned, locked and sunk. For details on these actions please see the related help pages. As regards moderation, if a user posts a new discussion or adds a post to an existing discussion on a moderated forum then their addition will not appear until approved. In the forum managment pages a discussion with unapproved posts looks like this.

forumthreadadmin

Clicking on the manage option then takes you to the screen below with the option to approve.

forumpostadmin

The above gives an outline of how the vanilla flavour of forums work and render. They can also be easily customised

Related questions