mirror of
https://github.com/silverstripe/silverstripe-spamprotection.git
synced 2024-10-22 14:05:59 +02:00
MINOR: updated docs in spam protection
This commit is contained in:
parent
a6906762e0
commit
c8e57dd427
5
CHANGELOG
Normal file
5
CHANGELOG
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
0.1:
|
||||||
|
- initial release
|
||||||
|
|
||||||
|
0.2
|
||||||
|
- Renamed 'SpamProtecterManager' to 'SpamProtectorManager'. Note the typo with the 'er'
|
17
INSTALL
17
INSTALL
@ -10,7 +10,7 @@ It should be at the same level as 'jsparty', 'cms' and 'sapphire' modules.
|
|||||||
|
|
||||||
2. Ensure the directory name for the module is 'spamprotection'.
|
2. Ensure the directory name for the module is 'spamprotection'.
|
||||||
|
|
||||||
3. Visit your SilverStripe site.
|
3. Visit your SilverStripe site in a webbrowser and run www.yoursite.com/dev/build
|
||||||
|
|
||||||
5. We now need to setup some basic features to get the module up and running. Open up _config.php
|
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.
|
inside project directory (typically 'mysite/_config.php') with your favourite text editor.
|
||||||
@ -23,31 +23,16 @@ 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
|
Before putting the following code in '_config.php', make sure you have a subclass of 'SpamProtectorField' installed or written. One
|
||||||
example of 'SpamProtector' subclass is 'MollomField'.
|
example of 'SpamProtector' subclass is 'MollomField'.
|
||||||
|
|
||||||
<<<< CODE STARTS >>>>
|
|
||||||
|
|
||||||
SpamProtectorManager::set_spam_protector('MollomSpamProtector');
|
SpamProtectorManager::set_spam_protector('MollomSpamProtector');
|
||||||
|
|
||||||
<<<< 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
|
UPDATING A FORM TO INCLUDE THE SPAM PROTECTOR FIELD
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
|
|
||||||
This following code should appear after the form creation.
|
This following code should appear after the form creation.
|
||||||
|
|
||||||
<<<< CODE STARTS >>>>
|
|
||||||
|
|
||||||
$protector = SpamProtectorManager::update_form($form, 'Message');
|
$protector = SpamProtectorManager::update_form($form, 'Message');
|
||||||
|
|
||||||
<<<< 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
|
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
|
MollomField field. The first parameter is a Form object in which the field will be added into and the second parameter tells
|
||||||
SpamProtectorManagor to place the new field before a field named 'Message'.
|
SpamProtectorManagor to place the new field before a field named 'Message'.
|
||||||
|
6
README
6
README
@ -7,11 +7,16 @@ Maintainer Contact
|
|||||||
Saophalkun Ponlu
|
Saophalkun Ponlu
|
||||||
<phalkunz (at) silverstripe (dot) com>
|
<phalkunz (at) silverstripe (dot) com>
|
||||||
|
|
||||||
|
Will Rossiter
|
||||||
|
<will (at) silverstripe (dot) com>
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
SilverStripe 2.3
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
http://doc.silverstripe.com/doku.php?id=modules:spamprotection
|
||||||
|
|
||||||
Installation Instructions
|
Installation Instructions
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
@ -19,6 +24,7 @@ See INSTALL
|
|||||||
|
|
||||||
Usage Overview
|
Usage Overview
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
See INSTALL
|
||||||
|
|
||||||
Known issues
|
Known issues
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
Loading…
Reference in New Issue
Block a user