craft.spamguard
craft.spamguard copied to clipboard
Spam Guard harnesses the power of Akismet to fight Spam
Spam Guard 0.6.0
Lovingly crafted by Selvin Ortiz for Craft CMS
Spam Guard harnesses the power of Akismet to fight Spam
Features
- Proven Spam Fighting capabilities with the help of Akismet
- Native support for the Contact Form Plugin
- Native support for the Guest Entries Plugin
- Native support for the Sprout Forms
- Clean and efficient codebase with good documentation
- Friendly developer support via Github, Twitter, and via email at [email protected]
Installation
- Download the Official Release
- Extract the archive into your
craft/plugins
directory - Install Spam Guard from the control panel @
Settings > Plugins
- Add your
API Key
andOrigin URL
- Enable support for Contact Form and/or Guest Entries
Upgrading
If you are upgrading to version 0.6.0 from an earlier version, please see the documentation for Guest Entries because the way hidden fields in your form are defined has changed.
- Spam Guard now expects the following fields
spamguard[emailField|authorField|contentField]
- The values for those fields should now be wrapped in curly braces match entry field handles
Dependencies
- PHP 5.3.2 or above
- Craft 1.3 Build 2415 or above
- Contact Form 1.3+ for contact form support
- Guest Entries 1.1+ for guest entries support
Please note that Guest Entries requires Craft 2.0 or above
Contact Form Usage
To fight spam coming from your contact form, you must do the following...
- Follow the Contact Form setup guide if you haven't already
- Make sure Contact Form support @
Settings > Plugins > Spam Guard
That is it, all future submissions will be monitored by spam guard ;)
Guest Entries Usage
To fight spam coming from your guest entry form, you must do the following...
- Follow the Guest Entries setup guide if you haven't already
- Make sure Guest Entries support is enabled @
Settings > Plugins > Spam Guard
- Add the
hidden input
fields to your form so Spam Guard knows what to validate
Hidden Input Fields
Add the following fields to your guest entry form.
<input type="hidden" name="spamguard[emailField]" value="{guestEntryEmailFieldHandle}">
<input type="hidden" name="spamguard[authorField]" value="{guestEntryFullNameFieldHandle}">
<input type="hidden" name="spamguard[contentField]" value="{guestEntryBodyFieldHandle}">
These fields need to be defined so that Spam Guard knows what attributes to look for in the guest entry in order to prepare the data to pass along to Akismet for validation.
When the form is submitted and the Guest Entry is validated, the entry will be handed to Spam Guard which will then grab the spamguard[emailField|authorField|contentField]
values containing twig placeholders which will then be replaced by attribute values found in the EntryModel
Note that the emailField and authorField are not required!
Sprout Forms Usage
Sprout Forms support is implemented in the same way support is implemented for Guest Entries, the directions for Guest Entries should be followed.
Changelog
All noteworthy changes are listed on the official changelog
Feedback
If you have any feedback or questions, please reach out to me on twitter @selvinortiz
Credits
- Huge thanks to the WordPress/Akismet team for their great efforts and service they provide.
- Special thanks to @themccallister for testing Spam Guard and for providing valuable feedback.
License
Spam Guard is open source software licensed under the MIT license