Extension:AkismetKlik

About
The AkismetKlik extension rejects edits identified as being from comment spammers. It uses Akismet, an adaptive spam-filtering service originally devised by WordPress for use by blog hosts.

Installation
This extension requires PHP5 and uses the Akismet.class library, available here.

Installation steps:
 * 1) Download and install Akismet.class.php
 * 2) Download the source for the AkismetKlik.php extension
 * 3) Obtain a WordPress API key by registering as a user on http://wordpress.com (WordPress.com not WordPress.org)
 * 4) Use require_once('AkismetKlik.php'); to include the extension from LocalSettings.php
 * 5) Edit to customise the following configuration variables to match your sitename and ten-digit API key, for instance:
 * $wgAKkey='867-5309';                    // Jenny's personal API key at wordpress.org - keep this secret!
 * $siteURL='http://wiki.example.org';     // URL of the local wiki, $wgArticlePath is assumed to be /wiki/$1 under this

Testing
Akismet's servers are configured to flag all edits from User:Viagra-test-123 as unconditionally spam. Edit a page while logged out (or logged in as a different user) and the wiki should respond normally; attempt to edit while logged in under a test account User:Viagra-test-123 and every attempt should be rejected with a Spam Filter error.

Limitations
This extension has been tested against the current MediaWiki release only; its compatibility with other versions of MediaWiki is unknown although it likely can be adapted in some form.

This extension does not currently provide a means to handle (or to report) false-positive or false-negative results. There are functions in the Akismet.class library to "report as spam" or "report as ham", but this extension does not make this functionality available to wiki admins.

There is also no direct MediaWiki equivalent to WordPress's capability to store suspected spam comments for later manual review. As such, text which triggers false-positive results cannot be edited or saved.

There is no check to prevent this from blocking edits from legit 'bot accounts, such as pywikipediabot. This can lead to many false-positives.

The page title (MW 1.12 only) is passed to Akismet in the "permalink" field and the URL field is populated based on the first external link found in the message body. It may make more sense to change the submitted query to use the wiki edit comment field data in some manner - most likely by re-purposing an existing field, given that the field names are based on WordPress' design, not wiki.

Alternatives
ScribbleWiki has developed their own Akismet extension, Akismetcheck. It also currently lacks a system for someone to check spam marked by Akismet to correct false positives, but they are to be working on a system similar to the current Wordpress mod to do exactly that.

ScribbleWiki's AkismetCheck is downloadable at http://scribblewiki.com/akismet (code released under GPL).

Disclaimers
The PHP5 code structure is based loosely on that of existing extension code, specifically Extension:SpamBlacklist, which is open-source under the GPL.

SPAM&trade; is a trademarked food product of Hormel, Inc. KLIK&trade; and KAM&trade; are products of Canada Packers/Maple Leaf Foods and represent direct competition to SPAM&trade;. Viagra&trade; is a trademark of Pfizer. Akismet and akismet.com are services of WordPress, available in free versions for non-commercial users as well as non-free versions for commercial and institutional use. Consult your doctor or pharmacist. Refrigerate after opening. Void where prohibited.