Release status: experimental
|Description||Rejects edits from suspected comment spammers on Akismet's blacklist.|
|Author(s)||Carl Austin Bennett (Carlbtalk)|
|License||No license specified|
Translate the AkismetKlik extension if it is available at translatewiki.net
|Check usage and version matrix; code metrics|
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[edit | edit source]
This extension requires PHP5 and uses the Akismet.class library, available here.
- Save Akismet.class.php to the AkismetKlik folder.
- Download the source for the AkismetKlik.php extension into the AkismetKlik folder.
- Obtain a WordPress API key by registering as a user on http://wordpress.com (WordPress.com not WordPress.org)
- Edit AkismetKlik.php 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
- Add the 'bypassakismet' right to certain groups in LocalSettings.php to allow them to bypass this filter completely
$wgGroupPermissions['autoconfirmed']['bypassakismet'] = true;
$wgGroupPermissions['sysop']['bypassakismet'] = true;
$wgGroupPermissions['bot']['bypassakismet'] = true;
- Include the extension from LocalSettings.php using:
- require_once( "$IP/extensions/AkismetKlik/AkismetKlik.php" );
Testing[edit | edit source]
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[edit | edit source]
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.
A group can be given the 'bypassakismet' right to bypass the filter completely. This could be used to allow bots, sysops or even all autoconfirmed users to edit without the false-positives this filter can return.
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[edit | edit source]
ScribbleWiki has developed their own Akismet extension, Akismetcheck. However, this is not available anymore.
ScribbleWiki's AkismetCheck was downloadable at http://scribblewiki.com/akismet (code released under GPL).
See also[edit | edit source]
Disclaimers[edit | edit source]
The PHP5 code structure is based loosely on that of existing extension code, specifically Extension:SpamBlacklist, which is open-source under the GPL.