Developer manual

Setting up Spring as a blog

Spring can be configured to provide blog like features for any site.

The Blog features Spring supports are:

  • Article listing using either 'short-post' or 'full-post' display
  • Reverse chronological display of posts
  • Comments
  • Gravatar images for comments
  • RSS
  • Categories (tags)


  1. Setup a page to display the list of articles
  2. Add fields to a custom form to allow commenting and comment display on any blog post.
  3. Setup a backend tab to list all comments so they can be managed
  4. Setup the comment moderation options in settings.xml
  5. Setup pages to be shown if comments are moderated or blocked
  6. Add the comment form and list spring tags to layout.xml


Setting up a page to display articles

Use a standard Blog listing plugin to display the list of articles on a page.

A standard blog listing plugin configuration:

<select name="feed">
<option value="format">blog.listing.xslt</option>
<option value="status">10</option>
<option value="query">parentid:news-archive</option>
<option value="show">thumbnail date title short-post continue tags comments</option>

Add fields to a custom form for commenting

To allow comments on a page, add the following to the appropriate custom.pages.xml add:

 <fieldset label="Blog" name="blog">
<field name="comment-form" fieldtype="checkbox">
<option value="1" name="comment-form" checked="checked">Show Comment Form</option>

<field name="comment-list" fieldtype="checkbox">
<option value="1" name="comment-list" checked="checked">Show Comments</option>

Setting up the backend tabs

Create a new manager tab to display a list of comments to help manage spam and inappropriate posts.

  1. Copy default.xql file to the local template directory and rename it custom.xql
  2. Add a new section to custom.xql to define a new tab.
  3. Add a new section to settings.xml to load the custom.xql

Add to custom.xql:


Add to settings.xml:


Setup moderation

Spring has the option to set moderation levels for comments. Moderation is designed to check incoming comments against a database of known spam comments and phrases. Spring will check the contents of each comment against the database and determine a 'moderation' number based on the estimated number of matches.

i.e. At it's simplest level - a post with 2 suspect phrases or words would be given a moderation number of '2', and post with 5 suspect words of phrases will be given a moderation level of '5'.

Based on this, there are 3 possible actions Spring will take once the moderation number has been calculated:

  1. Not Moderated - the comment does not meet the threshold for moderation and is immediately online
  2. Moderated - the comment has been moderated and made offline pending manual review
  3. Rejected - the comment exceeds the moderation maximum and has immediately been rejected

To adjust these levels add the following <spam> options into the <settings> tag of settings.xml:


Using the above settings as an example, a comment will not be moderated if it has a moderation number of '0' or '1'. It will be moderated if it has a number of '2', and rejected if it has a moderation number of '3'.

Based on past experience, the vast majority (in excess of 95%) of all comments will be spam or inappropriate -therefore the moderate level should be kept low.

Setup moderation notification pages

If a comment is moderated, Spring will redirect the user to a notification page.

  • Moderated ---> /view/moderation/
  • Rejected ---> /view/guidelines/

By default these links are created in new sites - if they are not already present you must create two folders with the id's of 'moderation' and 'guidelines', and create a default page in each with the appropriate notice.

Example text for Moderation page:

Moderation process

Thank you for your comments, it will be online as soon as I have had a chance to review your message.

Example text for Rejected page:

Posting Guidelines

Sorry but it looks as though your comment has been filtered out to avoid blog spam.

Add the comment form and list spring tags

In layout.xml add the following spring tags in the position you'd like these elements to appear:

 <comment-list show="gravatar" gravatar-size="40" gravatar-default=""/>
 <comment-form show="gravatar"/>