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 .
- Modify the "Comments" property field with the . 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:
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 .
- Modify the newly added "docextra.vm" property field by adding the replace-with-your-intense-debateid-here value in the pasted content with your IntenseDebate id. . Make sure you modify the
Here's what you'd get:
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