AnonymousComments

Last modified by Vincent Massol on 2019/06/11 10:11

Apr 05 2009

XWiki Enterprise allows users to leave comments on pages. However in order to prevent spam on your public wiki instance you usually only want to allow registered users the right to add comments. Thus we need a solution that still allows guest users to leave comments while preventing spam.

I'm proposing 2 solutions that I've both tried on this blog and that have worked well: Solution 1: create a special guest account that can be used transparently to leave comments. This can be achieved by creating a custom skin and tweaking the comments form Solution 2: integrate with an external comment web service such as IntenseDebate. This also requires a custom skin in order to override some templates.

Solution 1: Special Guest account

  • Create a "Guest" user by going to the Administration page.
  • Modify the Skins class so that the comments property points to the commentsinline.vm file (instead of the comments.vm one). Go to the XWiki.XWikiSkins page and change the Name field for the Comments property to "commentsinline.vm". Save.
  • In the Administration page, click on the Presentation icon and then click on the "Customize" button in the Skin section. Click "Edit this Skin" to edit the skin.
  • Modify the "Style" property field for better avatar display with the following content.
  • Modify the "Comments" property field with the following content. This change adds several fields to the comments form that guest users can fill and provide a direct link to log in guest users.

When done you should get the following comment feature:

solution1.png

Solution 2: Integration with IntenseDebate

  • Register on IntenseDebate to get a key to interact with their system.
  • Modify the Skins class to add 2 new fields so that we can override them. Go to the XWiki.XWikiSkins page and use the right panel to add 2 text area fields named "htmlfooter.vm" and "docextra.vm". Save.
  • In the Administration page, click on the Presentation icon and then click on the "Customize" button in the Skin section. Click "Edit this Skin" to edit the skin.
  • Modify the newly added "htmlfooter.vm" property field by adding the following content.
  • Modify the newly added "docextra.vm" property field by adding the following content. Make sure you modify the replace-with-your-intense-debateid-here value in the pasted content with your IntenseDebate id.

Here's what you'd get:

solution2.png

IntenseDebate is really nice and it offers the following features:

  • Comment threading
  • Reply by email
  • Importing / exporting comments
  • Commenter profiles
  • Reputation points and comment voting
  • Moderation / blacklisting, Profanity filter and Akismet spam filtering
  • Widgets
  • RSS feeds and reader tracking
  • Twitter / friendfeed integration
  • OpenID authentication
  • Commenter gravatar
  • HTML formatting
Created by Vincent Massol on 2009/02/24 10:20