Using reCaptcha
juliend2 edited this page Sep 10, 2010
·
11 revisions
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:
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 %>
- sign up to http://www.google.com/recaptcha and follow the instructions to get your private and public keys
- once you have your reCaptcha public and private keys, login to your blog admin at http://.com/admin and go in the Options section.
- edit the recaptcha_private_key and enter your reCaptcha private key
- edit the recaptcha_public_key and enter your reCaptcha public key
- edit the recaptcha_is_active option and tick the checkbox to activate it
- make sure that you have the following code into _comment_form.erb :
- 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.