Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Adding captcha or something like it

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

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

Page: 1 2
Go to End
Author Topic: 6053 Views
  • raamklaza
    Avatar
    Community Member
    182 Posts

    Adding captcha or something like it Link to this post

    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

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Adding captcha or something like it Link to this post

    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.

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: Adding captcha or something like it Link to this post

    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.

  • raamklaza
    Avatar
    Community Member
    182 Posts

    Re: Adding captcha or something like it Link to this post

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

    Thnx guys

  • deejayh
    Avatar
    Community Member
    10 Posts

    Re: Adding captcha or something like it Link to this post

    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

  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Re: Adding captcha or something like it Link to this post

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

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Adding captcha or something like it Link to this post

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

  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Re: Adding captcha or something like it Link to this post

    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?

    6053 Views
Page: 1 2
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.