The MU forums have moved to

Anti spam plugin for the signup page (6 posts)

  1. donncha
    Key Master
    Posted 16 years ago #

    I just announced my modification of WP Hashcash for the MU signup page.

    This is an anti spam plugin that will hopefully put a dent in the number of spam blogs registered on MU sites. Basically it uses Javascript to generate a known value that must match a number stored in the db.

    It'll also attach itself to comment forms providing some protection for those too.

    It's all explained and on my post but if you want to just download it grab version 4.2 off the plugin db page.

  2. MrBrian
    Posted 16 years ago #

    Nice share donncha. I chose to modify the WP SpamFree plugin to do the same thing, but i never saw hashcash and it looks much cleaner. I might use yours instead :)

    Might i suggest changing line 512 to something like this:

    $result['errors']->add( 'splog', __('<p class="error">You were unable to pass a spam check. Please enable JavaScript in your browser!</p>') );

    This way those with firefox addons like NoScript and such know that they just need to enable javascript to signup and it also looks prettier.

  3. donncha
    Key Master
    Posted 16 years ago #

    Good idea MrBrian, added that in trunk, and also changed it so it uses sitemeta on MU, and you can activate the comments and signup protection separately now. I wonder if it's too early to bump the version again?

    You should be able to get those features in the development version on this page:

  4. MrBrian
    Posted 15 years ago #

    I noticed a little problem. After receiving spam comments, it seems to clear the plugin data you have back to default. I will set it to delete spam comments, but then later i'll get a spam comment that has a hashcash value of 0 and it will be put into moderation and sent to my email asking me to moderate. When i go to check the plugin, I see that it's reversed back to "Moderate" and the ham and spam counts have reset. Verified this 3 times to make sure i wasn't just losing my memory lol. Options get saved fine, they just reset after receiving some spam. Looking at the code, i'm guessing when the options get updated with wphc_option($options), the $options part is not populated with the old values somewhere in the plugin.

  5. Akashic
    Posted 15 years ago #

    Having google maps (called by addLoadEvent as well) on a page with comments turned off leads to break off maps and retruning error:

    Error: document.getElementById("wphc_value") is null

    so as to avoid this, it'd better to check beforehand if it's null. So to say:
    change line 372 from
    echo "addLoadEvent(function(){document.getElementById('wphc_value').el.value=wphc();});\n";

    echo "addLoadEvent(function(){var notNullWphc= document.getElementById('wphc_value'); if(notNullWphc){notNullWphc.value=wphc();}});\n";

  6. maxaud
    Posted 15 years ago #

    I was having there error with a null value using WP-Hashcash on mu, only on Pages of a blog (home and posts didn't get the error) and this fixed the issue.

    Thanks for the fix!

About this Topic