Jump to:

1835 Posts in 1139 Topics by 554 members

Blog Module

SilverStripe Forums » Blog Module » user comment needs approval first

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 1211 Views
  • iroy2000
    Avatar
    Community Member
    15 Posts

    user comment needs approval first Link to this post

    Hi, I like the blog module, but how do I configure so that when a user enter a comment, it requires approval first before going to the public??

  • Johan
    Avatar
    Community Member
    49 Posts

    Re: user comment needs approval first Link to this post

    I cant get it to work yet (been flushing lots)

    The solution shouls be here

    http://www.silverstripe.org/blog-module-forum/show/9707

    Would presume:

    BlogEntry.php

       static $defaults = array(
          "ProvideComments" => false,
          'ShowInMenus' => false
       );

  • iroy2000
    Avatar
    Community Member
    15 Posts

    Re: user comment needs approval first Link to this post

    But sounds like it only turns off the comment for a blog entry.

    So I want the work flow is

    1) User [A] can enter comment as usual
    2) User [A] comment won't show up in public by default
    3) Admin will need to approve User [A] comment before the comment shows in the public.

  • iroy2000
    Avatar
    Community Member
    15 Posts

    Re: user comment needs approval first Link to this post

    I go through the blog module code.

    You can change the PageComment.php to have comments moderated as default.

    Search for

    static $moderate = false;

    and replace it with true;

    ( location: /cms/code/sitefeatures )

  • Invader_Zim
    Avatar
    Community Member
    141 Posts

    Re: user comment needs approval first Link to this post

    Hi iroy2000,

    the much better solution would be to call the enableModeration() method of PageComment.php in your mysite/_config.php like this:

    PageComment::enableModeration();

    This way, you won't need to edit core files and keep the ability for easy updates.

    Cheers
    Christian

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: user comment needs approval first Link to this post

    Good

    1211 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.