Enabling spam protection for blog comments

I just finished adding spam protection to the commenting system used on this blog. By adding a CAPTCHA field to the comment form, bots can no longer automatically add spam comments.

Enabling this feature turned out to be fairly simple. Just install sr_freecap, which is an extension for TYPO3 that can generate the CAPTCHA fields. The guestbook extension (ve_guestbook) which is used for comments has support sr_freecap by default, so the only thing you need to do is update the guestbook template used by TIMTAB (default is: EXT:timtab\res\kubrick\kubrick_ve_guestbook.tmpl).

Update the template by adding the following lines:

<!--###CAPTCHA_INSERT### this subpart is removed if CAPTCHA is not enabled! -->
        <input type="text" name="tx_veguestbook_pi1[captcha_response]" title="###SR_FREECAP_NOTICE###" value="" />
        <label for="email">
                ###SR_FREECAP_NOTICE### ###SR_FREECAP_CANT_READ###
        <br />
        <br />

That's it! Your blog is now protected from comment spam.

7 Responses to “Enabling spam protection for blog comments”

  1. Gravatar: Fabian Fabian Says:

    This is a test.

  2. Gravatar: Fabian Fabian Says:

    Another test

  3. Gravatar: disturbed mp3 download do disturbed mp3 download do Says:

    disturbed mp3 download down with sickness ringtones

  4. Gravatar: Chris Samuel Chris Samuel Says:

    Well it looks like at least one spammer (the ringtone one above) managed to get through it.. :-(

  5. Gravatar: Fabian Fabian Says:

    Yeah, but it's a bit strange that it is just one message and only in this post which makes me think that maybe it was just someone messing around.

  6. Gravatar: Fabian Fabian Says:

    Just a little update, I upgraded ve_guestbook (which is used for blog comments) to 2.0, this caused captcha not to work anymore and I received quite some spam (which is deleted now) so it is working even if it does not catch everything.

    To fix the captcha I didn't really have time to look through the code thoroughly so I just did a compare between the old and new class.tx_veguestbook_pi1.php and manually replaced the new captcha parts with the old ones.

  7. Gravatar: Software that manage my w Software that manage my wordpress website" rel="external">Software that manage my w Says:

    Enabling spam protection for blog comments

Leave a Reply

remember my information