silverstripe-spamprotection/INSTALL

54 lines
1.8 KiB
Plaintext
Raw Normal View History

2009-02-04 05:41:14 +01:00
SilverStripe SpamProtection Module 0.1 beta
=======================================
INSTALLATION
------------
1. Unzip this file (spamprotection-0.1.tar.gz) inside your SilverStripe installation directory.
It should be at the same level as 'jsparty', 'cms' and 'sapphire' modules.
2. Ensure the directory name for the module is 'spamprotection'.
3. Visit your SilverStripe site.
5. We now need to setup some basic features to get the module up and running. Open up _config.php
inside project directory (typically 'mysite/_config.php') with your favourite text editor.
Read the instructions below to setup the initial configuration of the module.
SETTING UP THE MODULE (in 'mysite/_config.php')
------------------------------------------------------
Before putting the following code in '_config.php', make sure you have a subclass of 'SpamProtectorField' installed or written. One
example of 'SpamProtecter' subclass is 'MollomField'.
2009-02-04 05:41:14 +01:00
<<<< CODE STARTS >>>>
SpamProtectorManager::set_spam_protector('MollomSpamProtector');
2009-02-04 05:41:14 +01:00
<<<< CODE ENDS >>>>
What does this do?
------------------
This tell 'SpamProtection' module that you want to use 'MollomField' as a spam protection module across your site.
UPDATING A FORM TO INCLUDE THE SPAM PROTECTOR FIELD
2009-02-04 05:41:14 +01:00
---------------------------------------------------
This following code should appear after the form creation.
<<<< CODE STARTS >>>>
$protector = SpamProtectorManager::update_form($form, 'Message');
2009-02-04 05:41:14 +01:00
<<<< CODE ENDS >>>>
What does this do?
------------------
This code add an instance of a 'SpamProtectorField' class specified in SETTING UP THE MODULE section. The newly created field will have
MollomField field. The first parameter is a Form object in which the field will be added into and the second parameter tells
SpamProtecterManagor to place the new field before a field named 'Message'.