Overview

Packages

  • admin
  • classes
    • media
  • CodeIgniter
    • Libraries
  • core
  • functions
  • JSMin
  • None
  • OpenID
  • PHP
  • PHPMailer
  • plugins
    • admin
    • development
    • feed
    • mail
    • media
    • misc
    • seo
    • spam
    • uploader
    • users
    • zenpage
    • zenphoto
      • news
  • Services
    • JSON

Classes

  • reCaptcha
  • zpCaptcha
  • zpSimpleSpam
  • zpTrivialSpam
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class zpSimpleSpam

This implements the standard SpamFilter class for the Simple spam filter.

Package: plugins\spam
Author: Stephen Billard (sbillard)
Located at zp-extensions/simpleSpam.php
Methods summary
public SpamFilter
# __construct( )

The SpamFilter class instantiation function.

The SpamFilter class instantiation function.

Returns

SpamFilter
public
# displayName( )
public array
# getOptionsSupported( )

The admin options interface

The admin options interface

Returns

array
public
# handleOption( string $option, mixed $currentValue )

Handles custom formatting of options for Admin

Handles custom formatting of options for Admin

Parameters

$option
the option name of the option to be processed
$currentValue
the current value of the option (the "before" value)
public integer
# filterMessage( string $author, string $email, string $website, string $body, object $receiver, string $ip )

The function for processing a message to see if it might be SPAM returns: 0 if the message is SPAM 1 if the message might be SPAM (it will be marked for moderation) 2 if the message is not SPAM

The function for processing a message to see if it might be SPAM returns: 0 if the message is SPAM 1 if the message might be SPAM (it will be marked for moderation) 2 if the message is not SPAM

Parameters

$author
Author field from the posting
$email
Email field from the posting
$website
Website field from the posting
$body
The text of the comment
$receiver
The object on which the post was made
$ip
the IP address of the comment poster

Returns

integer
public boolean
# hasSpamPattern( string $text )

Tests to see if the text contains any of the SPAM trigger patterns

Tests to see if the text contains any of the SPAM trigger patterns

Parameters

$text
The message to be parsed

Returns

boolean
public boolean
# hasSpamWords( string $text )

Tests to see if the text contains any of the list of SPAM trigger words

Tests to see if the text contains any of the list of SPAM trigger words

Parameters

$text
The text of the message to be examined.

Returns

boolean
public
# getWords( $text, $notUnique = false )
Properties summary
public string $name
# 'simpleSpam'
public array $wordsToDieOn
# array('cialis', 'ebony', 'nude', 'porn', 'porno', 'pussy', 'upskirt', 'ringtones', 'phentermine', 'viagra', 'levitra')
public array $patternsToDieOn
# array('\[url=.*\]')
public integer $excessiveURLCount
# 5
Zenphoto doc API documentation generated by ApiGen