[ class tree: plugins ] [ index: plugins ] [ all elements ]

Class: zpSimpleSpam

Source Location: /zp-extensions/simpleSpam.php

Class zpSimpleSpam

Property Summary
mixed   $excessiveURLCount  
mixed   $name  
mixed   $patternsToDieOn  
mixed   $wordsToDieOn  

[ Top ]
Method Summary
SpamFilter   __construct()   The SpamFilter class instantiation function.
void   displayName()  
int   filterMessage()   The function for processing a message to see if it might be SPAM
array   getOptionsSupported()   The admin options interface
void   getWords()  
void   handleOption()   Handles custom formatting of options for Admin
bool   hasSpamPattern()   Tests to see if the text contains any of the SPAM trigger patterns
bool   hasSpamWords()   Tests to see if the text contains any of the list of SPAM trigger words

[ Top ]
Properties
mixed   $excessiveURLCount = 5 [line 33]

[ Top ]
mixed   $name = 'simpleSpam' [line 30]

[ Top ]
mixed   $patternsToDieOn = array('\[url=.*\]') [line 32]

[ Top ]
mixed   $wordsToDieOn = array('cialis', 'ebony', 'nude', 'porn', 'porno', 'pussy', 'upskirt', 'ringtones', 'phentermine', 'viagra', 'levitra') [line 31]

[ Top ]
Methods
Constructor __construct  [line 40]

  SpamFilter __construct( )

The SpamFilter class instantiation function.



[ Top ]
displayName  [line 48]

  void displayName( )



[ Top ]
filterMessage  [line 96]

  int 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:

  1. if the message is SPAM
  2. if the message might be SPAM (it will be marked for moderation)
  3. if the message is not SPAM

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


[ Top ]
getOptionsSupported  [line 56]

  array getOptionsSupported( )

The admin options interface



[ Top ]
getWords  [line 156]

  void getWords( $text, [ $notUnique = false]  )

Parameters:
   $text: 
   $notUnique: 


[ Top ]
handleOption  [line 76]

  void handleOption( string $option, mixed $currentValue  )

Handles custom formatting of options for Admin

Parameters:
string   $option:  the option name of the option to be processed
mixed   $currentValue:  the current value of the option (the "before" value)


[ Top ]
hasSpamPattern  [line 133]

  bool hasSpamPattern( string $text  )

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

Parameters:
string   $text:  The message to be parsed


[ Top ]
hasSpamWords  [line 149]

  bool hasSpamWords( string $text  )

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

Parameters:
string   $text:  The text of the message to be examined.


[ Top ]

Documentation generated on Sat, 07 Jun 2014 18:03:45 +0200 by phpDocumentor 1.4.3