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

Class: SNLbase

Source Location: /plugins/spamx/SNLbase.class.php

Class Overview


Checks number of links in post.


Methods



Class Details

[line 20]
Checks number of links in post.

based in large part on the works of Dirk Haun, Tom Willet (Spam-X) and Russ Jones (SLV)




[ Top ]


Class Methods


constructor __construct [line 28]

SNLbase __construct( )

Constructor



Tags:

access:  public


[ Top ]

method CheckForSpam [line 42]

boolean CheckForSpam( string $post)

Check for spam links



Tags:

return:  true = spam found, false = no spam Note: Also returns 'false' in case of problems communicating with SNL. Error messages are logged in Geeklog's error.log
access:  public


Parameters:

string   $post   post to check for spam

[ Top ]

method getLinks [line 81]

string getLinks( string $comment)

Extract links Extracts all the links from a post; expects HTML links, i.e. <a> tags



Tags:

return:  All the URLs in the post, sep. by line feeds
access:  public


Parameters:

string   $comment   The post to check

[ Top ]

method prepareLinks [line 113]

string prepareLinks( string $comment)

Extract only the links from the post SNL has a problem with non-ASCII character sets, so we feed it the URLs only. We also remove all URLs containing our site's URL.

Since we don't know if the post is in HTML or plain ASCII, we run it through getLinks() twice.




Tags:

return:  All the URLs in the post, sep. by linefeeds
access:  public


Parameters:

string   $comment   The post to check

[ Top ]


Documentation generated on Sun, 02 Oct 2016 07:54:56 +0000 by phpDocumentor 1.4.3