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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Mathspamprotection in Page and Blog Comments


Go to End


3 Posts   884 Views

Avatar
monkee

Community Member, 22 Posts

19 November 2014 at 9:04pm

Hello.

Comments Module works perfect. Blog Module works perfect. Userforms works perfect.

Mathspamprotection works out of the box with the Userforms.

How do i add it to Page and Blog Comments?

Avatar
martimiz

Forum Moderator, 1391 Posts

20 November 2014 at 2:16am

To enable spamprotection on the Comments module, you have to

CommentingController::add_extension('CommentSpamProtection');

I guess that would work for the blog as well? Haven't checked...

Avatar
monkee

Community Member, 22 Posts

13 January 2015 at 6:44am

Your Solution works perfect! Thanks a Lot!

For others:
To activate MathSpamProtection add a file named spamprotection.yml to your mysite/_config/ directory with the following content:

---
name: spamprotection
---
FormSpamProtectionExtension:
default_spam_protector: MathSpamProtector

aaand dev/build...