From 35beeaf4a5441eda6e28706595bce1857a9738f3 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Thu, 10 Jun 2010 02:31:06 +0000 Subject: [PATCH 1/2] MINOR: Updated documentation and converted readme to markdown --- README | 30 ------------------------------ README.md | 26 ++++++++++++++++++++++++++ INSTALL => docs/Install.md | 31 +++++++++++++++++-------------- 3 files changed, 43 insertions(+), 44 deletions(-) delete mode 100644 README create mode 100644 README.md rename INSTALL => docs/Install.md (58%) diff --git a/README b/README deleted file mode 100644 index 5a899c4..0000000 --- a/README +++ /dev/null @@ -1,30 +0,0 @@ -############################################### -SpamProtection Module -############################################### - -Maintainer Contact ------------------------------------------------ -Saophalkun Ponlu - - -Will Rossiter - - -Requirements ------------------------------------------------ -SilverStripe 2.3 - -Documentation ------------------------------------------------ -http://doc.silverstripe.com/doku.php?id=modules:spamprotection - -Installation Instructions ------------------------------------------------ -See INSTALL - -Usage Overview ------------------------------------------------ -See INSTALL - -Known issues ------------------------------------------------ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..a18432c --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# SpamProtection Module + +## Maintainer Contact + * Saophalkun Ponlu + + + * Will Rossiter + + +## Requirements + +SilverStripe 2.3.2 or greater + +## Documentation + +http://doc.silverstripe.org/modules:spamprotection + +## Installation Instructions + +See docs/Install + +## Usage Overview + +See docs/Install + +## Known issues diff --git a/INSTALL b/docs/Install.md similarity index 58% rename from INSTALL rename to docs/Install.md index 933e455..315a118 100644 --- a/INSTALL +++ b/docs/Install.md @@ -1,12 +1,9 @@ -SilverStripe SpamProtection Module 0.1 beta -======================================= +# Spam Protection Module Installation - -INSTALLATION ------------- +## Install 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. +It should be at the same level as the 'cms' and 'sapphire' modules. 2. Ensure the directory name for the module is 'spamprotection'. @@ -17,22 +14,28 @@ inside project directory (typically 'mysite/_config.php') with your favourite te Read the instructions below to setup the initial configuration of the module. -SETTING UP THE MODULE (in 'mysite/_config.php') ------------------------------------------------------- +## Configuring -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'. +Before putting the following code in '_config.php', make sure you have a additional protector class installed. +The SpamProtector module only provides the backbone. To make use of the module you have to have an additional protector +such as Mollom or Recaptcha. Both of these modules can be downloaded off the SilverStripe.org website. -SpamProtectorManager::set_spam_protector('MollomSpamProtector'); + SpamProtectorManager::set_spam_protector('MollomSpamProtector'); -UPDATING A FORM TO INCLUDE THE SPAM PROTECTOR FIELD ---------------------------------------------------- +## Updating a form to include Spam Protection This following code should appear after the form creation. -$protector = SpamProtectorManager::update_form($form, 'Message'); + // your existing form code here... + $form = new Form( .. ); + + // add this line + $protector = SpamProtectorManager::update_form($form, 'Message'); 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 SpamProtectorManagor to place the new field before a field named 'Message'. + + +## Using Spam Protection with User Forms From aa8ef8aca9b7a0c33769e7cb76b6265cd90e8b3e Mon Sep 17 00:00:00 2001 From: Saophalkun Ponlu Date: Tue, 29 Jun 2010 05:49:00 +0000 Subject: [PATCH 2/2] MINOR: update documentation --- README.md | 1 + docs/Install.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a18432c..320656a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # SpamProtection Module ## Maintainer Contact + * Saophalkun Ponlu diff --git a/docs/Install.md b/docs/Install.md index 315a118..95445cb 100644 --- a/docs/Install.md +++ b/docs/Install.md @@ -2,7 +2,7 @@ ## Install -1. Unzip this file (spamprotection-0.1.tar.gz) inside your SilverStripe installation directory. +1. Unzip this file (spamprotection-0.3.tar.gz) inside your SilverStripe installation directory. It should be at the same level as the 'cms' and 'sapphire' modules. 2. Ensure the directory name for the module is 'spamprotection'.