Class SpamChecker

Description

SpamChecker Class

This class implements first round spam checking.

  • version: $Id$
  • copyright: 2008

Located in /system/plugins/spamchecker/spamchecker.plugin.php (line 10)

Pluggable
   |
   --Plugin
      |
      --SpamChecker
Method Summary
array filter_rewrite_args (array $args, string $rulename)
array filter_rewrite_rules (array $rules)
float filter_spam_filter (float $spam_rating, Comment $comment, array $handlervars)
A get_code (A $post_id, [The $ip = ''])
array info ()
True verify_code (A $suspect_code, The $post_id, [ $ip = ''])
Variables

Inherited Variables

Inherited from Pluggable

Pluggable::$info
Pluggable::$plugin_id
Methods
action_comment_insert_before (line 42)

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.

  • return: The comment result to store.
Comment action_comment_insert_before (Comment $comment)
  • Comment $comment: The comment that will be processed before storing it in the database.
filter_rewrite_args (line 186)

Change some outgoing arguments supplied to rewrite rules during URL generation

  • return: The modified arguments
  • access: public
array filter_rewrite_args (array $args, string $rulename)
  • array $args: The arguments passed to build a URL
  • string $rulename: The name of the URL that is to be built
filter_rewrite_rules (line 164)

Add a rule to replace the existing rule for creating a comment post url

  • return: The modified rules array
  • access: public
array filter_rewrite_rules (array $rules)
  • array $rules: The array of rewrite rules to route incoming URL requests to handlers
filter_spam_filter (line 211)

Ensure that the code assigne dto this user for their commenting URL is genuine

  • return: The original spam rating
float filter_spam_filter (float $spam_rating, Comment $comment, array $handlervars)
  • 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
get_code (line 233)

Get a 10-digit hex code that identifies the user submitting the comment

  • return: 10-digit hex code
  • access: public
A get_code (A $post_id, [The $ip = ''])
  • A $post_id: post id to which the comment will be submitted
  • The $ip: IP address of the commenter
info (line 17)

function info

Returns information about this plugin

  • return: Plugin info array
array info ()

Redefinition of:
Plugin::info()
Returns information about this plugin
verify_code (line 249)

Verify a 10-digit hex code that identifies the user submitting the comment

  • return: if the code is valid, false if not
  • access: public
True verify_code (A $suspect_code, The $post_id, [ $ip = ''])
  • A $suspect_code: post id to which the comment has been submitted
  • The $post_id: IP address of the commenter
  • $ip

Inherited Methods

Inherited From Plugin

Plugin::__construct()
Plugin::add_template()
Plugin::info()
Plugin::_plugin_available_templates()
Plugin::_plugin_include_template_file()

Inherited From Pluggable

Pluggable::__construct()
Pluggable::get_db_schema()
Pluggable::get_file()
Pluggable::get_url()
Pluggable::load()
Pluggable::load_text_domain()
Pluggable::plugin_id()

Documentation generated on Thu, 30 Oct 2008 20:31:27 +0100 by phpDocumentor 1.3.2