April 03, 2012



CAPTCHA is a tool to help distinguish a commenter as either computer or human, reducing the amount of spam that can reach your blog via the comment form.

You can enable the randomly generated verification code option in your Comment settings, which will force unauthenticated commenters to pass the CAPTCHA before their comment can be published.

Typepad has integrated Google's reCAPTCHA tool, which offers readers the option to refresh harder to read CAPTCHA words. The tool also comes with the ability to hear an audio version of the CAPTCHA should the reader not be able to read the words at all.

Using reCAPTCHA with Advanced Templates

All new Advanced Template sets will automatically have the reCAPTCHA code included, but for any templates created before its release, the code will need to be updated.

There are two templates that need to be updated to include the reCAPTCHA: Individual Archives and Pages. (Note: if you have put your comment form into separate template modules, you may have to make your edits in them rather than in the two templates previously mentioned.)

In both templates, scroll to the <MTEntryIfCommentsOpen> tag, then look for, and replace, the following items:

  • generateCaptcha with generateReCaptcha
  • submitWithCaptcha with submitWithReCaptcha
  • interceptPost() with interceptPost(1)

After those three edits you will need to remove some unnecessary code.

In the same template, locate and remove the following line:

<p class=""><img id="captchaImg" /></p>

Then locate and remove the following lines:

<input type="hidden" name="captcha_chal" id="comment-captcha-chal" value="" />
        <input id="comment-captcha-text" name="captcha_text" size="10" />

After removing the above, you'll need to add a line.

Locate the following section:

<form id="comment-captcha-form"
        onsubmit="atpComments.submitWithReCaptcha(); return false;">

Just below that, add this line:

<script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=6Ldg1s4SAAAAAEvvZX2ILFkWp7KB-jjdL4v0JV2e"></script>

Then save your template changes and repeat for the next template. Once both the Individual Archives template, and Pages template, are updated, the reCAPTCHA will appear for unauthenticated commenters.


Need design help?

Looking to launch a new blog? Have an itch to tweak your design or layout? Want a superior banner or design custom made specifically for your blog? We've got you covered!

Typepad Services badge