MINOR: Updated documentation

This commit is contained in:
Saophalkun Ponlu 2009-03-10 03:04:05 +00:00
parent 98e0c85937
commit becbdcd9c6
2 changed files with 2 additions and 4 deletions

View File

@ -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.

View File

@ -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