Customizing SMF > Modifications and Packages
Akismet Spam Protection
live627:
Link to Mod
Rate this Mod
IMPORTANT!
An issue has crept into the Akismet 1.1.1 mod which will prevent people from creating new topics. A fixed package has been uploaded (Akismet_1-1-1_Fixed1.zip). If you installed the original Akismet 1.1.1 package (only about 20 people did), then please see this post.
Akismet Spam Protection for SMF
What is it?
This is a SMF modification implementing the Akismet spam protection service. The MOD requires SMF 1.1 Final or higher (but it may still work on SMF 1.1 RC3, that was not tested).
NOTE: If you were testing out the Beta version of this mod, you'll need to uninstall it before installing version 1.0!
How do I use it?
Firstly, you'll need to sign up for a free API key at http://wordpress.com/api-keys/. Then, install this mod via the SMF Package Manager. Once it's installed, there will be a new 'Akismet Configuration' option in the admin panel, under the 'Forum' section. Enter your API key in, and you're all set!
How do I know it's working?
You test it, of course! Simply write a new topic with the subject of 'akismet-test-123', and it will be classified as spam by the mod. This tests that the mod is installed correctly. An additional test is writing a guest post with a name of 'viagra-test-123'. Any message with this name will be marked as spam by the Akismet service. If this message is also detected as spam, then everything is working perfectly :)
How do I get it working in other themes?
The spam warning will be shown to users using the default theme, but if you use a custom theme, you'll need to edit it.
Open Themes/[theme name]/Display.template.php, and find:
--- Code: --- // Show the page index... "Pages: [1]".
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0">
--- End code ---
Add before:
--- Code: --- // ---- Begin Akismet Mod 1.0 ----
// If this person was an evil one, and sent spam, let's give them a "friendly" message :-)
if (isset($_GET['spam']))
echo '
<hr width="100%" size="1" class="hrcolor" />
<div style="color: red; font-size: 14px" align="center">', $txt['akismet_spam_warning'], '</div>
<hr width="100%" size="1" class="hrcolor" />';
// ---- End Akismet Mod 1.0 ----
--- End code ---
That's for the warning at the top of the page. For the warning next to the post's subject, find:
--- Code: ---
<a href="', $message['href'], '">', $message['subject'], '</a>
</div>';
--- End code ---
Replace with:
--- Code: --- <a href="', $message['href'], '">', $message['subject'], '</a>';
// ---- Begin Akismet Mod 1.0 ----
if ($message['spam'] == 1)
echo '
<span style="color: red">', $txt['akismet_flagged'],'</span>';
// ---- End Akismet Mod 1.0 ----
echo '
</div>';
--- End code ---
Note that this may differ depending on your theme. If in doubt, write a comment, and I'll see how to modify your theme.
Changelogs
1.0 --> 1.1
- If server is inaccessible, mark post as Non-spam and write error to errorlog
- Minor changes to language strings (use single quotes (') instead of double quotes ("))
0.1 --> 1.0
- Updated MOD files to comply with SMF standards
- Now parses BBCode in posts in the Akismet admin panel
- Added version information to admin section
- Now marks any posts with subject of 'akismet-test-123' as spam (for testing purposes)
- In Subs-Post.php, use $posterOptions and $msgOptions arrays rather than $_POST variables
- Moved 'Akismet Configuration' option from Configuration heading to Forum heading
- Moved position of Spam warning above the topic buttons
- Moved 'Flagged as spam' message next to subject, rather than under it
Known Issues
- Only admins can moderate the spam comments (Delete all spam, Mark as 'Not Spam'). This may change in a future release, to also allow moderators access.
- Statistics may be incorrect after deleting spam messages. Recounting all the statistics should fix this
- There is currently no way to mark existing posts as spam (false negatives).
(c) 2006, 2007 DanSoft Australia - http://www.dansoftaustralia.net/. This mod is released under the same license agreement as SMF itself.
Version: 1.1 (Build 3)
Release Date: 29th December 2006
RoarinRow:
Very cool, every little bit helps. 8)
RoarinRow:
Installation went well my my 1.1.1 forums.
Just got this error after deleting a test post that was marked not as spam:
Error connecting to host: rest.akismet.com Error number: 0 Error message: Undefined error: 0
Edit - I had to un-install cause it was clause slowness when hit and getting to the forum page.
EdwinK:
I like it very much. Has already catched many spam on my blog, so I hope it will do a good job on SMF as well.
Just not sure about editing my DilbertMC theme. I've screwed up the theme several times already :(
wudzzy:
how to install this mod ?
i just login as admin - click to admin - package manager - download package , then upload it - browse package , then click to apply mod , then i have message :
Installations actions for "Akismet Spam Blocking":
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
what i should do ?
Navigation
[0] Message Index
[#] Next page
Go to full version