Skip to content
juliend2 edited this page Sep 10, 2010 · 11 revisions

Activate reCaptcha

Once you installed your Lennon blog, it’s a good idea to do an immediate next step to prevent spambots from flooding your comments with spammy comments. To achieve this, there is a reCaptcha module that comes by default with Lennon. Here is how you configure it:

Prerequisites

Make sure you have something like the following code in the _comment_form.erb of the theme you’re using (inside views/themes/[name_of_theme]/) :

<% if options.conf.recaptcha_is_active %>
   <p><%= recaptcha %></p>
   <% end %>

Activation

  1. sign up to http://www.google.com/recaptcha and follow the instructions to get your private and public keys
  2. once you have your reCaptcha public and private keys, login to your blog admin at http://.com/admin and go in the Options section.
  3. edit the recaptcha_private_key and enter your reCaptcha private key
  4. edit the recaptcha_public_key and enter your reCaptcha public key
  5. edit the recaptcha_is_active option and tick the checkbox to activate it
  6. make sure that you have the following code into _comment_form.erb :
  7. restart your server with touch tmp/restart.txt (on passenger)

Now you should see a reCaptcha field in the view that displays the comment form.