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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

SilverStripe Page Comments System - Email, Order, Unapprove


Go to End


8 Posts   3829 Views

Avatar
davede

Community Member, 24 Posts

28 July 2011 at 11:19pm

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: http://www.ssbits.com/tutorials/2010/adding-an-email-field-to-the-page-comment-form/ . 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: http://api.silverstripe.org/2.4/cms/comments/PageCommentInterface.html . 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: http://silverstripe.org/disqus-module/ and have noted that SS.org 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?

Thanks,

Dave

Avatar
Willr

Forum Moderator, 5523 Posts

29 July 2011 at 8:03pm

Yes the current built in functions are pretty limited. This is why for 3.0 we stripped it out to a module (https://github.com/silverstripe/silverstripe-comments). 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 doc.ss, though all the moderation is disqus rather than the cms so not really ideal for non techy content administration people.

Avatar
davede

Community Member, 24 Posts

29 July 2011 at 8:19pm

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 ;) )?

Avatar
Willr

Forum Moderator, 5523 Posts

29 July 2011 at 8:44pm

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

Avatar
davede

Community Member, 24 Posts

17 August 2011 at 5:25am

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?

Avatar
ccburns

Community Member, 79 Posts

2 October 2011 at 5:17pm

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

http://www.ssbits.com/tutorials/2010/adding-an-email-field-to-the-page-comment-form/

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

http://chillburn.com.au/blog/adding-gravatar-images-to-the-silverstripe-blog/

Hope this helps if you still need them...

Cheers,
Colin

Avatar
davede

Community Member, 24 Posts

3 October 2011 at 12:05am

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?

Avatar
ccburns

Community Member, 79 Posts

7 November 2011 at 1:46pm

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 ;)).

Cheers,
Colin