Inheritance diagram for SpamChecker:
Collaboration diagram for SpamChecker:Public Member Functions | |
| action_comment_insert_before ($comment) | |
| filter_rewrite_rules ($rules) | |
| filter_rewrite_args ($args, $rulename) | |
| filter_spam_filter ($spam_rating, $comment, $handlervars) | |
| get_code ($post_id, $ip= '') | |
| verify_code ($suspect_code, $post_id, $ip= '') | |
SpamChecker Class
This class implements first round spam checking.
Definition at line 10 of file spamchecker.plugin.php.
| SpamChecker::action_comment_insert_before | ( | $ | comment | ) |
function act_comment_insert_before This function is executed when the action "comment_insert_before" is invoked from a Comment object. The parent class, Plugin, handles registering the action and hook name using the name of the function to determine where it will be applied. You can still register functions as hooks without using this method, but boy, is it handy.
| Comment | The comment that will be processed before storing it in the database. |
Definition at line 24 of file spamchecker.plugin.php.
| SpamChecker::filter_rewrite_args | ( | $ | args, | |
| $ | rulename | |||
| ) |
Change some outgoing arguments supplied to rewrite rules during URL generation
| array | $args The arguments passed to build a URL | |
| string | $rulename The name of the URL that is to be built |
Definition at line 168 of file spamchecker.plugin.php.
| SpamChecker::filter_rewrite_rules | ( | $ | rules | ) |
Add a rule to replace the existing rule for creating a comment post url
| array | $rules The array of rewrite rules to route incoming URL requests to handlers |
Definition at line 146 of file spamchecker.plugin.php.
| SpamChecker::filter_spam_filter | ( | $ | spam_rating, | |
| $ | comment, | |||
| $ | handlervars | |||
| ) |
Ensure that the code assigned to this user for their commenting URL is genuine
| float | $spam_rating The spamminess of the comment as detected by other plugins | |
| Comment | $comment The submitted comment object | |
| array | $handlervars An array of handlervars passed in via the comment submission URL |
Definition at line 193 of file spamchecker.plugin.php.
| SpamChecker::get_code | ( | $ | post_id, | |
| $ | ip = '' | |||
| ) |
Get a 10-digit hex code that identifies the user submitting the comment
| A | post id to which the comment will be submitted | |
| The | IP address of the commenter |
Definition at line 215 of file spamchecker.plugin.php.
Referenced by filter_rewrite_args(), and verify_code().
| SpamChecker::verify_code | ( | $ | suspect_code, | |
| $ | post_id, | |||
| $ | ip = '' | |||
| ) |
Verify a 10-digit hex code that identifies the user submitting the comment
| A | post id to which the comment has been submitted | |
| The | IP address of the commenter |
Definition at line 231 of file spamchecker.plugin.php.
Referenced by filter_spam_filter().
1.7.1