Public Member Functions

SpamChecker Class Reference

Inheritance diagram for SpamChecker:
Collaboration diagram for SpamChecker:

List of all members.

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= '')

Detailed Description

SpamChecker Class

This class implements first round spam checking.

Definition at line 14 of file spamchecker.plugin.php.

Member Function Documentation

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 28 of file spamchecker.plugin.php.

SpamChecker::filter_rewrite_args ( args,

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
array The modified arguments

Definition at line 172 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
array The modified rules array

Definition at line 150 of file spamchecker.plugin.php.

SpamChecker::filter_spam_filter ( spam_rating,

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
float The original spam rating

Definition at line 199 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
A 10-digit hex code

Definition at line 221 of file spamchecker.plugin.php.

Referenced by filter_rewrite_args(), and verify_code().

SpamChecker::verify_code ( suspect_code,
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
True if the code is valid, false if not

Definition at line 237 of file spamchecker.plugin.php.

Referenced by filter_spam_filter().

The documentation for this class was generated from the following file: