How to setup blog comments with recaptcha

Topics: General
Feb 10, 2013 at 12:02 PM
I need blog comments with recaptcha bot protection without any spam filters. Is there some documentation how to enable it?
Also I'm planing to use custom capcha service for comments module, but it is not clear for me how can I extend comments module without this module source changing.
What are ways to extend comments functionality?
Coordinator
Feb 10, 2013 at 8:52 PM
This is only implemented in 1.x. You should look at that.
May 28, 2013 at 10:44 PM
Hey Bertrand...I wrote a blog post on how to add reCaptcha to Orchard.Comments in 1.6 that unfortunately requires modifying the source. I had someone ask me why I couldn't use the captcha part that currently comes in 1.6. Obviously, I tried that adding that to the Comments type and it didn't work, which is why I wrote the tutorial on modifying the source, but I'm not sure how to answer the gentleman who asked the question about why it can't be used in 1.6. Do you have a really brief explanation that I can tell him? Thanks =)
Coordinator
May 29, 2013 at 12:00 AM
I do use it on 1.6 on nwazet.com, so I'm a little confused. I don't remember what I did at the time to make it work. I have the following Views/EditorTemplates/Parts.ReCaptcha.Fields.cshtml file in my theme:
@model Orchard.AntiSpam.ViewModels.ReCaptchaPartEditViewModel
    <script type="text/javascript">
        var RecaptchaOptions = {
            theme: "clean"
        };
    </script>
  <script type="text/javascript" src="//www.google.com/recaptcha/api/challenge?k=@Model.PublicKey"></script>
  <noscript>
     <iframe src="//www.google.com/recaptcha/api/noscript?k=@Model.PublicKey" height="300" width="500" frameborder="0"></iframe><br>
     <textarea name="recaptcha_challenge_field" rows="3" cols="40">
     </textarea>
     <input type="hidden" name="recaptcha_response_field" value="manual_challenge">
  </noscript>