phpDocumentor sf-active
base_classes
[ class tree: sf-active ] [ index: sf-active ] [ all elements ]

Class: Spam

Source Location: /classes/spam_class.inc

Class Spam

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Cache

Cache::$allowed_html_tags
Cache::$allowed_text_tags
Cache::$cachestatus
Cache::$errorstatus
Cache::$upload_target_url

Inherited From Cache

Cache::cache_file()
writes a file to disk given it's content and the path.
Cache::cache_ram_file()
caches a ram file to disk given a upload target, a year and a month.
Cache::cache_var()
Writes an array or other variable to disk, in a php-readable format
Cache::check_file_path()
this method will check if your filepath is ok (so no .. and stuff like that).
Cache::clean()
adds slashes to a string if get_magic_quotes_runtime isn't set
Cache::cleanup_email()
cleans up an email_address
Cache::cleanup_filename()
cleans up the name of file
Cache::cleanup_html_value()
cleans up a value that is published as html
Cache::cleanup_number()
cleans up a number
Cache::cleanup_pathname()
cleans up the name of a path.
Cache::cleanup_post()
Removes dangerous HTML from data submitted via POST
Cache::cleanup_text_value()
cleans up a value that is allowed to contain limited html (an article submitted as text/plain)
Cache::cleanup_value()
cleans up a value that should not contain any html at all (the normal procedure)
Cache::clear_error_status()
Clears any existing error status
Cache::clear_update_status()
Clears any existing update status
Cache::create_dir_recursive()
creates a directory recursively
Cache::create_upload_dirs()
this will create the directories we move the article and uploaded files to if they don't exist yet
Cache::display_error_status()
displays the error status.
Cache::do_form()
calls the form we want to use in the publish process given it's name and various options.
Cache::dump()
dumps a variable encapsulated in html
Cache::get_allowed_html_tags()
returns $allowed_html_tags
Cache::get_allowed_text_tags()
returns {$link $allowed_text_tags}
Cache::get_antispam_mail()
returns an emailaddress with antispam blocks in.
Cache::get_cached_var()
Retrieve a cached variable from disk
Cache::get_error_status()
returns the $errorstatus
Cache::get_months()
returns an array of months from 01 to 12
Cache::get_update_status()
returns the $cachestatus
Cache::get_years()
returns an array of years for your calendar
Cache::is_error()
Returns true if there is an existing error
Cache::list_directories()
List the directories in the specified path
Cache::list_files()
Lists the files in the specified directory path
Cache::make_checkbox_form()
renders a checkbox form given it's name, an array with options and an option-array to preselect
Cache::make_multiple_form()
renders a multiple given it's name, an array with options and an option-array to preselect
Cache::make_select_form()
renders a select form given it's name, an array with options and an option to preselect
Cache::make_video_thumbnail()
make a "video thumbnail" of a video uploads
Cache::mirror_html()
mirrors your html files.
Cache::mirror_media()
mirrors your media files
Cache::process_file_metadata()
gets metadata from media file headers and stores them
Cache::process_uploads()
process any uploads from a POST
Cache::rel2abs()
Replaces any relative links with absolute links
Cache::rel2absfield()
Like rel2abs, replaces relative links with absolute links
Cache::render_entities()
strips tags and replaces <,> & ' out of a given html string by their htmlentities
Cache::render_protest_date()
This creates the protest-style dates, like J18 given an input date-string.
Cache::render_var()
Renders an array or other variable into php code
Cache::render_yearmonth_link()
returns a file path given a year and month
Cache::replace_rte_tags()
startx: replaces ugly tags from rte editor
Cache::set_allowed_html_tags()
sets $allowed_html_tags
Cache::set_allowed_text_tags()
sets $allowed_text_tags
Cache::set_date_from_smarty()
sets a unix timestamp from a smarty date array
Cache::set_mysql_date_from_smarty()
sets a mysql datetime from a smarty date/time array
Cache::sf_error_log()
logs an error. (don't know how it's used atm)
Cache::update_error_status()
Allows easy access to adding an update string
Cache::update_status()
Allows easy access to adding an update string
Cache::validate_event_post()
does error checking for $_POST data for a posted event.
Cache::validate_post()
does error checking on $_POST data for an article or comment.
Cache::validate_uploads()
error checking for files submitted via POST

[ Top ]
Property Summary
string;   $content_hash   Hash of the content
string   $ip_hash   Hash of remote_addr, http_user_agent & http_accept_language

[ Top ]
Method Summary
Spam   Spam()   class constructor, does nothing.
void   Add()   empty method.
bool   Detect()   returns 1 if a post is spam.
void   Log()   logs successful blocks
void   log_ip()   logs information about the published article.
void   Remove()   empty method.
void   store_hashes()   Stores the hashes to disk. We do this in a different method so if you make a mistake it shouldn't matter

[ Top ]
Properties
string;   $content_hash [line 25]

Hash of the content


[ Top ]
string   $ip_hash [line 20]

Hash of remote_addr, http_user_agent & http_accept_language


[ Top ]
Methods
Constructor Spam  [line 30]

  Spam Spam( )

class constructor, does nothing.



[ Top ]
Add  [line 195]

  void Add( mixed $ip  )

empty method.



[ Top ]
Detect  [line 41]

  bool Detect( mixed $spam_publish, [mixed $type = "article"]  )

returns 1 if a post is spam.



[ Top ]
Log  [line 212]

  void Log( string $text  )

logs successful blocks

Parameters:
string   $text: 


[ Top ]
log_ip  [line 224]

  void log_ip( mixed $article  )

logs information about the published article.



[ Top ]
Remove  [line 203]

  void Remove( mixed $ip  )

empty method.



[ Top ]
store_hashes  [line 248]

  void store_hashes( )

Stores the hashes to disk. We do this in a different method so if you make a mistake it shouldn't matter



[ Top ]

Documentation generated on Tue, 24 Jun 2008 01:03:57 -0700 by phpDocumentor 1.3.0RC3