Shoutbox-Spam List Manager
For the past few months i like many other Shoutbox users have been getting spam shouts on our boxes. The most annoying thing being links ot porn sites being used as the poster's URL.
Oscar of ofhills.com came up with a solution to reject shouts that have urls that are known to be that of shoutbox-spammers. It is really basic and works just like it's supposed but for requiring one to continuously open up the shoutbox.php file to update it.
Here's an optimised version using the same logic.
I'm calling it the Shoutbox Spam List Manager V 0.2 and will post updates here as well.
Changes/New Features:
1. Two files Added; spam_list_man.php (the spam list manager itself) and spam_man_list.php (contains the list of words used to reject shouts)
2. Edit shoutbox.php only once
3. Add new words to the list
4. Rejects words already on the list
5. Uses the shoutbox admin cookie as authorisation
Installation procedure:
1. Grab this zipped file here: shoutbox_spam_list_managerv0.2.zip
2. Extract the two files from the zipped file (update spam_man_list.php with your own list if you've been using Oscar's solution)
3. Upload the two files into the same folder as shoutbox.php
4. CHMOD spam_man_list.php 666 so it can be written to.
5. Open the file "shoutbox_langpack_english.php" in a text editor. On or about line #31, paste in the following definition.
6. Open the file "shoutbox.php" in a text editor. Go to around line # 116, and find this:
if (isFlooding() >= 3) {
$error .= _PROCESS_FLOODING;
}
Add a few spaces after that "if" statement so you can paste in another one. Paste this "if" statement after (below) the one above:
include_once ("spam_man_list.php");
if (preg_match ("/$spam_man_list/i", $url)) {
$error = _SPAM_MAN;
}
7. Re-upload shoutbox.php and load up spam_list_man.php in your browser.
(NB: You need to be logged in to your shoutbox first to use this)
The code is not clean and i dont think it's fully optimised but ispent about two hours working on it. I'll look to add an option to delte from the list and a feature to update the list using a "central" list in the future.