diff --git a/INSTALL b/INSTALL index 790f5d8..a227f7e 100644 --- a/INSTALL +++ b/INSTALL @@ -40,14 +40,14 @@ This following code should appear after the form creation. <<<< CODE STARTS >>>> -$protector = SpamProtecterManager::update_form('MollomField', 'Captcha', $form, 'Message', $callbackObj); +$protector = SpamProtecterManager::update_form($form, 'Message', $callbackObj); <<<< CODE ENDS >>>> What does this do? ------------------ -This code add an instance of a 'SpamProtecterField' class specified in SETTING UP THE MODULE section. The newly created field will have "MollomField" as a name and "Captcha" as a title. The third parameter is a Form object in which the field will be added into and the fourth parameter tells SpamProtecterManager to place the new field before a field named 'Message'. The last parameter is an object that get notified when the spam verification is done and given the form object. +This code add an instance of a 'SpamProtecterField' 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 SpamProtecterManager to place the new field before a field named 'Message'. The last parameter is an object that get notified when the spam verification is done and given the form object. The purpose of having callback object is we can process the submission differently according to the spam status of the submission. For example, put any submission with 'spam' status into spam queue. diff --git a/code/SpamProtecterManager.php b/code/SpamProtecterManager.php index 9338b1b..37c0098 100644 --- a/code/SpamProtecterManager.php +++ b/code/SpamProtecterManager.php @@ -17,8 +17,6 @@ class SpamProtecterManager { /** * Add the spam protecter field to a form - * @param string the name of the protecter field - * @param string the title of the protecter field * @param Form the form that the protecter field added into * @param string the name of the field that the protecter field will be added in front of * @param object an object that implements Spamable