jburley
Member
Posted 4 years ago #
Hi all.
I created a simple plugin which, when activated, refuses any comment that contains a spam word listed in Options>Discussion>Comment Moderation
This method checks the comment body, author, email, url, and poster's IP address against the Comment "common spam words" listed. Because it also checks IP, it can effectively blacklist an IP from posting comments, simply by adding the IP to the "common spam words".
This plugin is currently available at: http://www.stationlabs.com/index.php?page=spamwordblock
I apologize if something like this has already been written... I tried several other spam blockers, but nothing was very simple for others to setup, though I'm certain they're very effective as well.
Anonymous
Unregistered
Posted 4 years ago #
Finally. SpamWordBlock was a snap to install, required no configuration and most importantly stopped the steady flow of "texas holdem" spam I was receiving without compromising wanted posts.
Props.
Anonymous
Unregistered
Posted 4 years ago #
I downloaded, installed and activated SpamWordBlock. I sat back and enjoyed the peace and quiet. Thanks, you brought an end to the spam comments I was getting. This was easily the simplest spam blocking tool I have ever used and it has function great so far. Thanks.
Anonymous
Unregistered
Posted 4 years ago #
why is that even a simle sentence, 'Spam words found'.
did i miss any tweaking?
jburley
Member
Posted 4 years ago #
Um... I don't think I understand the question....
"Spam words found" is outputted by the plugin if a person tries to post a comment that contains any of your listed "Common Spam Words", and then the comment is not posted.
What were you expecting to happen? Comments that do not contain any "spam words" will get posted to the entry as expected.
brian873
Member
Posted 4 years ago #
Hi,
Can someone help a dummy ?
How do I configure what words/ip ii want blocked ?
thanks
hail hail
dinytran
Member
Posted 4 years ago #
Hi, I've got the same pb,
I accessed the plugin modifiing page in my weblog but don't know how to modify or to add words and IP in it. Can anybody help us?
Thanks
Best Regards
A Newbie
ludvig87
Member
Posted 4 years ago #
Yeah, I could need some info as well.
ludvig87
Member
Posted 4 years ago #
Hey, I found it...
Check this:
go to your admin area and go here....
Options>Discussion>Comment Moderation
It is even posted in this thread :S
dinytran
Member
Posted 4 years ago #
Yeah, it's working!
Great plug in !
Thanks
Thanks, this is a great piece of software. This stopped a rash of spam e-mail I had for texas hold-em and numerous sexual dysfunction drugs. I have also added as an extra precaution, the plugin Trencaspammers which forces a commenter to enter in a six digit code before posting. This plugin is available for download at:
http://coffelius.arabandalucia.com/index.php?p=9
I found it easy to install and activate in the plugins portion of the WP admin station.
Also, I have found that monitoring my regular spam e-mail provides me alot of deviant ways to spell words that are in the common spam words list to add to the list.
that's how it's supposed to work unless you start enforcing a string length match which would reduce the effectiveness of the word blocking.
jburley
Member
Posted 4 years ago #
Hey guys! Sorry I haven't checked this thread in awhile... looks like the previous posters have figured out how to add words thanks to you guys!
presto... that's a good point about substrings within words. And, charle97 has the correct response. However, I should be able to add an option in the script that lets the user let it be "less strict" or something.
I'll get back to you about that.
.josh
jburley
Member
Posted 4 years ago #
I had the same problem with html entities being used to get past the moderation-keys, and posted my solution, such as it is, here.
It is far from optimum, since it involves editing source, but if josh thinks it is appropriate to fold into SpamWordBlock (or any other spam-handling plugin writer), that would be better than me making a separate plugin.
That should do it. It should go into 1.3. Have you submitted it?
you could block the html character codes using wpblacklist. i've been blocking them for months with a simple regex.
jburley
Member
Posted 4 years ago #
pericat, I tried adding the code you put together (jsh_html_decode), but it doesn't seem to be working. I'll continue working on it, but until then, do you want to take a look at http://www.uberhaus.net/wp-content/plugins/spamwordblock.php.txt
Am I doing anything wrong?
*still working on it*
jburley
Member
Posted 4 years ago #
Hrm, yeah, jsh_html_decode doesn't seem to decode
poker
into
poker
I'm not sure why that's (not?) happening for you, josh. Or perhaps I've not been clear as to what exactly you should expect.
Those snippets don't make any kind of permanent translation; it's just long enough to let the results be compared to the list of banned words. The translation is local to the comment_check function.
Unless you have 'poker' by itself in your moderation-keys list, poker won't be flagged, and comments won't be held for moderation (or deleted, or whatever post-processing you have in place.)
charlie97, thanks for noting that; it sounds like this wouldn't be needed by anyone running wpblacklist. I'm not, so I wouldn't have known that.
awh, I haven't submitted it anywhere; I had an acute problem for which I needed a fix asap, this is what I came up with.
jburley
Member
Posted 4 years ago #
Hrm, well, I copied the jsh_html_decode method into my script (you can see it in the URL I posted for you), and have it outputting to a debug file all of the results of the three changes it tries on $text. But, it always has the HTML version (poker) sent to the file.
Unless I'm really misunderstanding your intention with that function.
jburley
Member
Posted 4 years ago #
Ah, cool....
I've updated the version at that URL, take a look.
Unfortunately it still doesn't seem to be translating the codes correctly.
The last errant backslash has been cornered and replaced in its post. So you should have joy now.
jburley
Member
Posted 4 years ago #
Awesome, it's working now. :)
I'll post a new version of the plugin later today.
jburley
Member
Posted 4 years ago #
Thanks to pericat, a new version is available:
http://www.stationlabs.com/index.php?page=spamwordblock
This will fix the problem that awh described!
Thanks for keeping the same url :)
Saves me updating www.tamba2.org.uk/wordpress/spam
Did you disable the old plugin before replacing it? Try this:
1. Deactivate the old plugin.
2. Delete the old plugin.
3. Upload the new plugin.
4. Activate the new plugin.
jburley
Member
Posted 4 years ago #
Also, what version of PHP do you have installed? That method is for PHP 4.3.0 or higher.
http://us2.php.net/manual/en/function.html-entity-decode.php
jburley:
Did this new version fix the problem of blocking such words as cANAL , harrASSment, TITle, etc. because they had letters in the same order as the block words in the spam block list?