Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com Jun 23 '11 at 7:46

This question came from our site for professional and enthusiast programmers.

add comment

4 Answers 4

Take a look at implementing the disqus comments system, this has solved the problem for me.

It's free, easy to implement and is used by some very large national newspapers, plus users can login with open ID via google, facebook and around a dozen others.

My answer here provides some more information

share|improve this answer
add comment

I recommand Comment SPAM Wiper. It has a high rate of detection and has an API that works with the vast majority of platforms.

share|improve this answer
add comment

I've faced the same issue with my website, I've first try to use recatcha, but if this seems to works fine with robot, it does not with human, and I strongly believe that spammer are now using more and more cheap labour do to the dirty job.

I'm now using a combined solution recatcha to get rid of the bot and by default comments are not published on the webiste but I get an email for each comment with 2 options - publish - spam

The link will poin to a uniq url and the comment will be display or removed from the db. (don't forget do optimize your table once removed )

Bear in mind that if you let spammer on your website, your website quality will be impacted and search engine might drop your ranking.

Good luck, the number might drop once the spammer don't see the spam on the webiste, I'm still facing having 30 spam comments per day, i'm sure they will learn at some point.

I've also notice that they create account from the same domain like tom.com, in your user account creation you could also black list some of them. It will never be 100% but if the target is too hard, they might just give up on you!

share|improve this answer
add comment

You can disable comments for existing pages by going to the Behvaiour tab and de-select the "Allow comments on this page?" checkbox.

If you haven't done it already, you can turn on moderation to prevent the spam from appearing on the live site. Simply add the following to your mysite/_config.php file.

PageComment::enableModeration();

There's also MathSpamProtection which can be enabled with:

MathSpamProtection::setEnabled();

SilverStripe also have a Spam Protection module up on GitHub.

share|improve this answer
    
Thank you Shane for your reply, I am trying to work out some other people's code, I just realised that they have put some spam protection in it, unfortunately my client is stillgetting hundreds of spams. Therefore we are thinking of turning off the comments option. Please see my update, your help is really appreciated. S:) –  SamIAm Jun 23 '11 at 4:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.