• 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.

Viewing 15 replies - 16 through 30 (of 45 total)
  • 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.

    Thread Starter jburley

    (@jburley)

    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*

    Thread Starter jburley

    (@jburley)

    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.

    Thread Starter jburley

    (@jburley)

    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.

    Thread Starter jburley

    (@jburley)

    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.

    Thread Starter jburley

    (@jburley)

    Awesome, it’s working now. πŸ™‚
    I’ll post a new version of the plugin later today.

    Thread Starter jburley

    (@jburley)

    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 http://www.tamba2.org.uk/wordpress/spam

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    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.

    Thread Starter jburley

    (@jburley)

    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?

    Deactivate/activate didn’t work.
    phpinfo says I have PHP Version 4.2.2. That must be why.
    My web host should upgrade at some point.
    Thanks!

Viewing 15 replies - 16 through 30 (of 45 total)
  • The topic ‘Announce: SpamWordBlock plugin’ is closed to new replies.