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

Class: zpTrivialSpam

Source Location: /zp-extensions/trivialSpam.php

Class zpTrivialSpam

Class Overview

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

Note that this filter will always pass comments from users with "manage" rights on the commented object.

Located in /zp-extensions/trivialSpam.php [line 30]



		
		
		
		

Properties

Methods

[ Top ]
Property Summary
mixed   $name  

[ 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   handleOption()   Handles custom formatting of options for Admin

[ Top ]
Properties
mixed   $name = 'trivialSpam' [line 32]

[ Top ]
Methods
Constructor __construct  [line 39]

  SpamFilter __construct( )

The SpamFilter class instantiation function.



[ Top ]
displayName  [line 44]

  void displayName( )



[ Top ]
filterMessage  [line 92]

  int filterMessage( string $author, string $email, string $website, string $body, string $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
string   $receiver:  The object on which the post was made
string   $ip:  the IP address of the comment poster


[ Top ]
getOptionsSupported  [line 60]

  array getOptionsSupported( )

The admin options interface

called from admin Options tab returns an array of the option names the theme supports the array is indexed by the option name. The value for each option is an array: 'type' => 0 says for admin to use a standard textbox for the option 'type' => 1 says for admin to use a standard checkbox for the option 'type' => OPTION_TYPE_CUSTOM will cause admin to call handleOption to generate the HTML for the option 'desc' => text to be displayed for the option description.



[ Top ]
handleOption  [line 72]

  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 ]

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