[geeklog-cvs] geeklog-1.3/plugins/spamx Developer.txt,NONE,1.1 spamx.html,NONE,1.1 ArrayWriter.class.php,1.1,NONE Config.Admin.class.php,1.1,NONE

blaine at iowaoutdoors.org blaine at iowaoutdoors.org
Sun Oct 3 14:28:13 EDT 2004


Update of /var/cvs/geeklog-1.3/plugins/spamx
In directory www:/tmp/cvs-serv14339/plugins/spamx

Added Files:
	Developer.txt spamx.html 
Removed Files:
	ArrayWriter.class.php Config.Admin.class.php 
Log Message:
SPAMX Update: Removed 2 files that are no longer needed and added 2 documention related files

--- NEW FILE: Developer.txt ---
The spamx plugin interface has been modified so that other modules and
plugins can use the spamx engine to examine user submitted text.

The code from comment.php can be used as an example of the call.

// Let plugins have a chance to decide what to do before saving the comment.
$someError = PLG_commentPreSave($comment,$_CONF['spamx']);
    
// If a plugin returned an error, return it
if ($someError) {
    return $someError;
}

All that is required is to send the comment to spamx with the
PLG_commentPreSave call.  The two parameters are the comment text itself and
an action number with tells spamx what actions to take if spam is found. 
You can use the built in actions by passing the sum of the numbers of the
spamx action modules for those actions you want to use.  The actions are
performed in numerical order.  The current action modules are:

Mail admin     -> 8
Ignore comment -> 128

So to Ignore the comment pass 128, to mail the admin pass 8, to do both pass
136.  All action module numbers are multiples of 2 and each modules number
is anded with value you pass to the plugin.  The modules are executed in
numerical order so Mail Admin would happen before Ignore Comment.  Best
practices require that you put this action number in a configuration
variable, so that the site admin can change it if necessary.  If you do not
want to use any of the spamx action modules then pass 0 as the action and
check the return from the function call. If spam is found it will return
true if not false.  If you do not pass anything as the action then the
system default will be used.

Spamx has three types of modules: admin, examine, and action.  Each module
is contained within a class file.  The name of the file the module is in is
critical.  For example: an admin module must end with .Admin.class.php.  The
first part of the file name must be the name of the class contained within
the file.  So if the class was named MassDelete then the file would be named
MassDelete.Admin.class.php.  Examine modules end in .Examine.class.php and
Action modules end in .Action.class.php. If you add a new actions to spamx,
you must assign it a number.  Pick a number not used by other action modules
and in the correct numerical sequence.


--- ArrayWriter.class.php DELETED ---

--- NEW FILE: spamx.html ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>Geeklog Documentation - SpamX Plugin</title>
  <link rel="stylesheet" type="text/css" href="docstyle.css" title="Dev Stylesheet">
</head>

<body>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
  <td valign="top"><img src="images/newlogo.gif" alt="Geeklog Documentation" width="235" height="90" border="0"></td>
</tr>
<tr>
  <td valign="top" class="menu"><a href="index.html">Geeklog Documentation</a> - SpamX Plugin</td>
</tr>
</table>

<h1>SpamX Plugin</h1>

<h2>Introduction</h2>

<p>The Geeklog SpamX plugin was created to fight the problem of comment spam
for Geeklog systems. If you are unfamiliar with comment spam you might see the
<a href="http://kalsey.com/2003/11/comment_spam_manifesto/">Comment Spam
Manifesto</a>.</p>

<h2>MT-Blacklist</h2>

<p>The main mechanism SpamX uses to fight comment spam is to use the blacklist 
created by Jay Allen and Movable Type users - MT-Blacklist.  You can find out
info about this project at <a href="http://www.jayallen.org/comment_spam/">http://www.jayallen.org/comment_spam/</a>. Jay has taken
it upon himself not only to write and support the plugin for Movable Type but
also to maintain the blacklist.  This requires human effort to review all the
submissions and determine which are really spam and which are just noise.  If
you have a few extra bucks drop by Jay's website above and drop a few dollars
in his PayPal account to show your appreciation.</p>

<p>The MT-Blacklist theory is that comment spammers do it to increase their
Google rankings and therefore the link is all important.  The MT-Blacklist
therefore only filters on urls.</p>

<h2>Other options</h2>

<p>The MT-Blacklist is only one part of the Geeklog SpamX plugin however.  The
SpamX plugin has its own personal blacklist that you can add to. You can
use it to filter anything from comments.  One option is to import the Geeklog
<a href="config.html#desc_censorlist">censor list</a> and ban all comments
which contain one of those words.  This or an expanded list might be usefull
for a website that caters to children.  Then no comments with offensive
language could be posted.</p>

<h2>Module types</h2>

<p>The SpamX plugin was built to be expandable to easily adapt to changes the
comment spammers might make.  There are three types of modules: <b>admin</b>,
<b>examine</b> and <b>action</b>.  A new module is contained in a file and can
simply be dropped in and it will be added to the plugin.  The modules with
which the plugin ships are:</p>

<ul>
  <li>Admin
    <ul>
      <li>View SpamX log</li>
      <li>Update MT-Blacklist</li>
      <li>Edit Personal Blacklist</li>
      <li>View/Import Other Personal Blacklists</li>
    </ul></li>
  <li>Examine
    <ul>
      <li>MT-Blacklist</li>
      <li>Personal Blacklist</li>
    </ul></li>
  <li>Action
    <ul>
      <li>Delete Comment if on Blacklist</li>
      <li>Mail Admin if Comment Rejected</li>
    </ul></li>
</ul>

<p>Other modules can be just dropped into place and they will become
available to the plugin.  To remove a module just
delete it from the spamx directory or rename it.  Planned modules include:</p>

Admin
    <ul>
      <li>Easy mass deletion of spam comments</li>
      <li>Parsing comments and automatic adding spam links</li>
      <li>Comparing MT-Blacklist and personal blacklist to eliminate
          duplications</li>
    </ul>

<p>Action modules are each assigned a number and the actions taken when a
spam comment is found can be designated by a configuration variable.  Note:
the spamx interface has been generalized and can be called by other modules
and plugins.  See the developer docs for details.</p>

<h2>Sharing blacklists</h2>

<p>One feature of the SpamX plugin is the ability to share your blacklist and to
view and import the Blacklists of other SpamX plugin users.  Your participation
in this will help give early warning to other SpamX plugin users.  This
facility will also make it possible to create special blacklists for different
classes of users such as k-12 schools. The sharing of blacklists uses rss feeds 
to distibute the blacklists.  If anyone wants to create a special blacklist I 
will make the server and interface scripts to facilitate this.</p>

<h2>Plugin Homepage</h2>

<p>Further information as well as a support forum for the SpamX plugin can be
found on the <a href="http://www.pigstye.net/gplugs/staticpages/index.php/spamx">SpamX Plugin's Homepage</a>.</p>

<table border="0" width="100%" class="footer">
<tr valign="top">
  <td colspan="2"><a href="http://www.geeklog.net">The Geeklog Documentation Project</a><br>
    All trademarks and copyrights on this page are owned by their respective owners. GeekLog is copyleft.</td>
</tr>
</table>

</body>
</html>

--- Config.Admin.class.php DELETED ---




More information about the geeklog-cvs mailing list