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! -->
    <p>
        <input type="text" name="tx_veguestbook_pi1[captcha_response]" title="###SR_FREECAP_NOTICE###" value="" />
        <label for="email">
            <small>
                ###SR_FREECAP_NOTICE### ###SR_FREECAP_CANT_READ###
            </small>
        </label>
        <br />
        <br />
        ###SR_FREECAP_IMAGE###
    </p>
<!--###CAPTCHA_INSERT###-->

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

Reageer

herinner mij