Firefox PHP

Module: Akismet for Phorum 5.2

Posted by Brian Moon 
All files from this thread

File Name File Size   Posted by Date  
akismet-5.2.1.tar.gz 2.8 KB open | download Brian Moon 03/13/2009 Read message
Module: Akismet for Phorum 5.2
March 11, 2009 05:10AM
This was an oversight. I should have updated this a while back.

Akismet is a real time spam checking service. You have to have a key from them to use it. Its free for personal use. If you are a commercial site, you can pay to get a commercial key.

This module will send messages to Akismet for spam checking. If Akismet believes they are spam, Phorum will alter the message to an unapproved state. No message is given to the user. No sense tipping them off and usually spam comes from bots.

There are two options in the settings. The first allows you to not check registered users messages. The second allows you to set a minimum trusted post count. Any user that has less than that many posts will be check for spam.

When messages are approved, they are sent to Akismet to recognize them as NOT spam. What Akismet calls ham. There is a little template work that has to be done to add a spam link to the read pages if you want to report things you believe to be spam to Akismet.

Akismet Module
===============

To block spam
--------------
1. Go to Akismet.com and get a key.
2. Unpack the akismet module in your mods dir.
3. Go to your Phorum admin and turn the module on.
4. Edit the Settings for the module and enter you key.


To report spam
---------------
This is a little trickier.  You have to edit your template to insert the Spam
links on the read page.

In read.tpl, you will find something like:

    <a class="icon icon-delete" href="javascript:if(window.confirm('{LANG->ConfirmDeleteMessage}')) window.location='{MESSAGES->URL->DELETE_THREAD}';">{LANG->DelMessReplies}</a>

    <a class="icon icon-delete" href="javascript:if(window.confirm('{LANG->ConfirmDeleteMessage}')) window.location='{MESSAGES->URL->DELETE_MESSAGE}';">{LANG->DeleteMessage}</a>

    <a class="icon icon-delete" href="javascript:if(window.confirm('{LANG->ConfirmDeleteMessage}')) window.location='{MESSAGES->URL->DELETE_THREAD}';">{LANG->DelMessReplies}</a>

You will want to add another link just before each of those:

    <a class="icon icon-delete" href="javascript:if(window.confirm('{LANG->ConfirmDeleteMessage}')) window.location='{MESSAGES->URL->SPAM_THREAD}';">{LANG->Spam}</a>

    <a class="icon icon-delete" href="javascript:if(window.confirm('{LANG->ConfirmDeleteMessage}')) window.location='{MESSAGES->URL->SPAM_MESSAGE}';">{LANG->Spam}</a>

    <a class="icon icon-delete" href="javascript:if(window.confirm('{LANG->ConfirmDeleteMessage}')) window.location='{MESSAGES->URL->SPAM_THREAD}';">{LANG->Spam}</a>

These links will delete the spam and submit it to Akismet.

For read_threads.tpl, look for similar URLs.

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Attachments:
open | download - akismet-5.2.1.tar.gz (2.8 KB)
Re: Module: Akismet for Phorum 5.2
March 18, 2010 09:13PM
*self-deleted*



Edited 1 time(s). Last edit at 06/24/2018 11:46PM by Voltius.
Re: Module: Akismet for Phorum 5.2
March 18, 2010 09:18PM
If this module doesn't have an auto-delete function, you can take a look at the code for my Self-Delete Posts Option module which uses its own db table to track the messages it hides and has a cronjob option delete those posts after X number of days. Most of that work can be found in the scheduled hook and the db_functions.php file.

As for the lack of message body, I would suggest installing my Post Previews module. With this enabled, you can hover over the subject lines of even hidden posts to see a preview of their content (most often enought to determine spam from ham).


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Sorry, only registered users may post in this forum.

Click here to login