Simmons Consulting, the Website of Toby Simmons

4images photo album and comment spam

23
Mar

I use the 4images – Image Gallery Management System to drive my photo album and have anonymous comments enabled. Comment spam started showing up about a week ago (I was getting lots and lots of comments about poker and drugs). I avoid comment spam in my blog (WordPress) by using Elliot Back’s plugin called wp-hashcash. Essentially, this plugin forces a commenter’s browser to perform a time-sensitive computation in order to post comments. If someone tries to post a comment using something other than a browser, their comment is refused. Since implementing this plugin, I have gotten exactly ZERO comment spams to my blog.

Since Elliot’s plugin works so well for WordPress, I decided to port it to 4images. Since implementing this mod, I have received ZERO spam comments in my photo album. Plus, I am tracking how many attempts are being made to post spam to the photo gallery and it looks like I’m blocking 20-25 attempts per day. I’ve written up the instructions on how to implement this mod.

Comments (12) »

  1. Me says:

    Very nice implimentation!
    It worked well for my 4images :)

    Now I wonder, how did u do the difference between the original and modified files? did u use some software to compare two files and saved the report as html?

  2. mike says:

    i don’t get this to wrk,

    what do you mean by
    “NOTE that the hashcash_add_hidden_tag() function on line 607 of the new file replaces text in your comment_form.html template file. You might need to modify this section of code (or your templates). “

  3. christine says:

    hey i was wondering how you enabled the anonymous commenting on 4images because we’re trying to have that option for our site. thanks

  4. Toby Simmons says:

    Christine,

    Under the control panel, edit the categories, under comments, allow from “All”. I’ve actually removed it from my site, simply because it didn’t lend itself to a commenting kind of online photo album. But it is very effective at blocking the bots!

    Cheers,

    Toby

  5. digits says:

    Can you help me , I can use the filter I got error massege
    Warning: fopen(../../spamlog.txt): failed to open stream: No such file or directory in kane-gallery/admin/plugins/spamlog_view.php on line 18
    File “../../spamlog.txt” could not be opened.

  6. Toby Simmons says:

    If you are having trouble with the fopen() part of it, you can simply comment out lines 644-646 … this will remove the logging portion. If you must have logging, you could create a spamlog.txt file in the root of your 4images directory. This file must be writable by the IUSR_MACHINE user on windows, the web user if on *nix. But commenting out the lines is the easiest fix.

  7. digits says:

    I want to use omment spam badly . I tired to ban al the spammer :(
    But I’m only a simple gal , it’s needs lots of explain before I figure out a simple script.
    If you have time help me :)
    – in the root of your 4images directory
    that’s is simple for you but not for me , where the root ???? wich directory ??? can you more specific please.
    – I don’t understand this line either
    “NOTE that the hashcash_add_hidden_tag() function on line 607 of the new file replaces text in your comment_form.html template file. You might need to modify this section of code (or your templates). “

    thanks,
    digits

  8. Ashley says:

    Hi, I was wondering if this works with newer versions of 4images? I was going to try it anyway – but then I realized you have the modded details.php file all numbered… am I supposed to go through and manually delete all the numbered lines? That’s crazy – I just wanted to copy & paste and go, lol.

    Hope you read this…

  9. Weston White says:

    Toby –

    I know I would love to have this mod as I am having the same spamming of comments that you described. The problem is that when I tested it, with a spam email I recieved, it still added the comment and showed it. What could be wrong to where it just does not work?

  10. Lee says:

    I had a hacker screw up my site that had this on. After fixing most things I thought I had modded I opened the site back up – after less than 24 hours I had 2500+ comment spams! I reinstalled this mod (the template was the same, but details.php I had to change) and it’s working again! Two comments:
    1) I can’t see the spam on the plugin in admin, but it’s ok I can download and see it (i have to delete it every now and again it gets so big!)
    2) When modifying details.php it’s a pain to go through and delete all the 560| etcs.
    But great mod, and thanks a million!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>