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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

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

Adding captcha or something like it


Go to End


9 Posts   7082 Views

Avatar
raamklaza

Community Member, 182 Posts

9 November 2008 at 4:26am

People can make comments with out one login in or two captcha security or something else.

How do you guys tackle this?

Is there a way for people to login so they can make comments or people can make a comment and then a verification

Avatar
Liam

Community Member, 470 Posts

9 November 2008 at 7:01am

You can add MathSpamProtection::setEnabled(); to your _config.php file which adds a basic math question to the form for users to answer.

If you take a look at the modules, there is a recaptcha spam verification one as well as another one (though the name escapes me). I believe they're in the daily build list.

Can do a search of the forum as well.

Avatar
(deleted)

Community Member, 473 Posts

9 November 2008 at 9:49am

You can also enable moderation of all comments, so you have to approve them before they go live, with

PageComment::enableModeration();

Which you could use if someone isn't logged in, by using:

if(!Member::CurrentMember()) PageComment::enableModeration();

which would only enable moderation if someone isn't logged in.

Avatar
raamklaza

Community Member, 182 Posts

11 November 2008 at 11:18am

I did the Math spam protection, it looks quite nice.

Thnx guys

Avatar
deejayh

Community Member, 10 Posts

21 November 2008 at 12:33pm

Added the MathSpamProtection::setEnabled(); great!

I also tried adding:

PageComment::enableModeration();

Which you could use if someone isn't logged in, by using:

if(!Member::CurrentMember()) PageComment::enableModeration();

which would only enable moderation if someone isn't logged in.

But it broke my site (500)

Regards,
Dave

Avatar
steve_nyhof

Community Member, 224 Posts

27 November 2008 at 1:19pm

Where do I add this exactly? What _config.php file - the mysite?

Avatar
Liam

Community Member, 470 Posts

29 November 2008 at 7:32am

Add what exactly? The math spam protection? Yes, in your mysite config file. Generally always put stuff in there.

Avatar
steve_nyhof

Community Member, 224 Posts

30 November 2008 at 12:44pm

Thank you, I am running 2.2.2 - am I supposed to see something, or do something?
I am trying to get this to work on the contact page when people fill in the contact form - does it work there?

Go to Top