Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

SilverStripe Page Comments System - Email, Order, Unapprove


8 Posts   1985 Views


28 July 2011 at 11:19pm Community Member, 24 Posts

Hi all,

1st post here :)

We're launching a new site in SS however we're having some trouble with the seemingly limited page comments system.

It would be great to have some of the WordPress defaults however what we really need in addition to what is provided by default in SS is:

- an email field
- order comments with the oldest first
- to have comments unapproved by default

We can't really launch the new site without the above features.

I've seen a tutorial on adding an email field here: [url][/url] . However the tutorial seems way over my head and very complicated (the author himself notes this as well ;)). Is there a simpler way available?

I've seen some some sort of code that will re-arrange the order of comments with oldest first here: [url][/url] . However again I have no idea what to do there. Any tutorials or guides on how to change it?

Disqus Module

I've seen a disqus module available here: [url][/url] and have noted that actually uses Disqus instead of it's own page comments system.

I'm very interested to know how others who use the disqus module or use disqus on a SS managed site find it. Would you recommend using it? How does it compare to the SS page comment system?




29 July 2011 at 8:03pm Forum Moderator, 5511 Posts

Yes the current built in functions are pretty limited. This is why for 3.0 we stripped it out to a module ( It's currently not production ready but that supports email fields, ordering configuration and moderation controllers are the next thing to overhaul. If you're a developer you may want to check that out and work away at improving that.

To set the ordering of comments using the 2.4 system like you sent through you can set PageCommentInterface:: set_order_comments_by('Created ASC');

Disqus is perfect for pages like, though all the moderation is disqus rather than the cms so not really ideal for non techy content administration people.


29 July 2011 at 8:19pm Community Member, 24 Posts

Hi Will,

Thanks for the reply.

Glad to hear there are plans to develop the comment system further.

I'll get our web dev to take a look at the non-production ready system and see what we can do.

Is there anyway to have new comments unapproved by default using the current system? (an easy way ;) )?


29 July 2011 at 8:44pm Forum Moderator, 5511 Posts

Yes, you can turn moderation on by using PageComment::enableModeration();


17 August 2011 at 5:25am Community Member, 24 Posts

Hi Will,

Was working on other things for a while. Thanks for another reply.

I added both lines of code you provided to mysite/_config.php

They both work well thank you.

How about the email field? Are there any straight-forward 'how-tos' or tutorials for adding an email field?


2 October 2011 at 5:17pm Community Member, 74 Posts

Here is a link to an article on SSBits just in case you still need some more information on how to add an email address

This article is about how to add a gravatar image to the comment.

Hope this helps if you still need them...



3 October 2011 at 12:05am Community Member, 24 Posts

Thanks for that Colin.

Our developer got email up and running - I think he used that tutorial ;)

Gravatar certainly would be nice.

The other thing we wanted to get happening was a subscribe and unsubscribe to future comments function. Know of any tutorials for subscribing?


7 November 2011 at 1:46pm Community Member, 74 Posts

Hi davede,

Sorry I should have subscribed to this thread.

No I don't know of any "subscribe" options or tutorials. I need to set this up for my own sites so I think perhaps I will try to set this up.

Willr, will the decoupled comments system only work on 3.0 or will it work on 2.4 as well (he asks hopefully ;)).