@billw: π Thank you for your kind words. I have a lot of fun and take a lot of pride in this community!
There has been some interest in this script and writing another script to add stuff to the blacklist is one of things I still have to do. As for the ability to consider viagra etc as spam, you could add another regex to the list before you import it. For example you could add another line to blacklist.txt (before importing it) which would say:
(levitra|lolita|phentermine|viagra|vig-?rx|zyban|valtex|xenical|adipex|meridia\b)
This would check for those words in your comments and filter them out for moderation if those words are contained in the comments. Here is a good tutorial for understanding regular expressions (or regex) like the ones used in blacklist.txt
http://dinki.mine.nu/word/regex/regex.php
Peace.
Having just got my first comment spams today (advertising viagra), I’ve just installed this hack. We’ll see how it goes.
I’ve also taken the step of obfuscating the words Name, Email, URI and “Your Comment” in wp-comments.php, in case the spammers are doing automated scripting looking for those words on the page.
Man…. I got my first spam comment today….. about darn time! At any rate, I’m going to be running LL’s hack…. But…. I was wondering if there is a way to add a link/button/something to the edit comment page to add the name/domain/ip to the blacklist automatically.
TG
Cool. I got my first comment spam today. Deleted it fairly quick, then installed LL’s hack. I tried posting a comment merely *mentioning* who the spam came from, and the blacklist filter caught it. Thanks, LL!
Anonymous
After getting some comment spam today, I came here to look for a solution. I installed this script, tested it, and it works like a charm!
Thanks, LL! π
@tg: That is one of the things on my list of items to do when I get a reprieve from my thesis. I will also be working on an import/export function for the blacklist for easier exchange between users. π
Everyone else….Thanks for the positive feedback!
Thanks so much for writing WP Blacklist!
I (and probably others also) would find it really useful if you could add a few lines to WP Blacklist so that the blacklist MySQL table can have the same user-specified prefix as the other WP tables.
When installing WP, one has the option of changing the $table_prefix variable in wp-config.php to the prefix for the WP tables (e.g. $table_prefix = ‘wp_’;). It’s pretty easy to add something similar to WP Blacklist (instructions halfway down this page)
so it might be worth doing for future versions.
HTH!
And it works too! So far I’m 6 for 6 in catching spam comments, and only two false positives (both of which were me!)
TG
Does this still work with 1.2?
It probably does but you can’t find the lines mentioned in the readme file for the install instructions :p I actually rewrote the wholet thing as a plugin for 1.2 and am calling it WP Blacklist 1.2. I’ve asked Mark whether he wants the source back so that he can continue development or whether I can distribute it on my own and continue development and once I hear from him, I’ll either release it or he will π
I’ve developed a WP 1.2 compatible version of the WP Blacklist plugin. If anybody is interested, you can download it from http://sm.farook.org/files/WPBlacklist12.zip
Very cool update, Fahim. Exceedingly easy to install. I look forward to future updates (especially de-spamming of existing comments after adding new spam filters… that was my most used function under MT.) And of course, kudos to LaughingLizard for the original versions. π
Anonymous
In trying to help out an MT-Blacklist user, I came across two regular expressions that he said he didn’t add to his own blacklist. I now know where they came from.
Do you guys know what these two regular expressions do?:
[*.]+-[^*]+-\.{2,}
[0-9a-zA-Z]+-[0-9a-zA-Z]+-\S*\..{2,}