Silverstripe: How can I disable comments?

Posted by SamIAm on Pro Webmasters See other posts from Pro Webmasters or by SamIAm
Published on 2011-06-23T00:46:00Z Indexed on 2012/04/02 5:42 UTC
Read the original article Hit count: 285

Filed under:
|

My client site is built in Silverstripe, there is a news page, and it allows people to leave comments. Unfortunately we've got loads of spam emails. I'm new to this, is there any way we can disable the comment field by default? How do I do it? Alternatively is there easy way for me to install a spam protection?

Update - Because this is someone else's code, I just realised that they have some sort of spam protection already, so we are trying to disable comments now. I have manage to set no comment as default by changing file BlogEntry.php

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

to

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

Am I on the right track to disable comments by default? Also how can I stop on the news page showing xxx comments link? eg

Test

Posted by Admin on 21 June 2011 | 3 Comments

Tags: P

This is a test....

3 comments | Read the full post

© Pro Webmasters or respective owner

Related posts about spam-prevention

Related posts about spam