ZenphotoCMS 1.6.5

zpSimpleSpam

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

Table of Contents

Properties

$excessiveURLCount  : mixed
$name  : mixed
$patternsToDieOn  : mixed
$wordsToDieOn  : mixed

Methods

__construct()  : SpamFilter
The SpamFilter class instantiation function.
displayName()  : mixed
filterMessage()  : int
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
getOptionsSupported()  : array<string|int, mixed>
The admin options interface
getWords()  : mixed
handleOption()  : mixed
Handles custom formatting of options for Admin
hasSpamPattern()  : bool
Tests to see if the text contains any of the SPAM trigger patterns
hasSpamWords()  : bool
Tests to see if the text contains any of the list of SPAM trigger words

Properties

$excessiveURLCount

public mixed $excessiveURLCount = 5

$patternsToDieOn

public mixed $patternsToDieOn = array('\\[url=.*\\]')

$wordsToDieOn

public mixed $wordsToDieOn = array('cialis', 'ebony', 'nude', 'porn', 'porno', 'pussy', 'upskirt', 'ringtones', 'phentermine', 'viagra', 'levitra')

Methods

__construct()

The SpamFilter class instantiation function.

public __construct() : SpamFilter
Return values
SpamFilter

filterMessage()

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

public filterMessage(string $author, string $email, string $website, string $body, object $receiver, string $ip) : int
Parameters
$author : string

Author field from the posting

$email : string

Email field from the posting

$website : string

Website field from the posting

$body : string

The text of the comment

$receiver : object

The object on which the post was made

$ip : string

the IP address of the comment poster

Return values
int

getOptionsSupported()

The admin options interface

public getOptionsSupported() : array<string|int, mixed>
Return values
array<string|int, mixed>

getWords()

public getWords(mixed $text[, mixed $notUnique = false ]) : mixed
Parameters
$text : mixed
$notUnique : mixed = false

handleOption()

Handles custom formatting of options for Admin

public handleOption(string $option, mixed $currentValue) : mixed
Parameters
$option : string

the option name of the option to be processed

$currentValue : mixed

the current value of the option (the "before" value)

hasSpamPattern()

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

public hasSpamPattern(string $text) : bool
Parameters
$text : string

The message to be parsed

Return values
bool

hasSpamWords()

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

public hasSpamWords(string $text) : bool
Parameters
$text : string

The text of the message to be examined.

Return values
bool

        
On this page

Search results