MUniversity of Minnesota

October 10, 2006

Captcha installed and a word about comments

Hello everyone! If there is one thing bloggers have to put up with it is blog spam. Well, hopefully we have made it a little easier here at UThink: we have just added the Captcha plugin to the system. What is a Captcha, you ask? According to the Wikipedia entry on Captcha:

A captcha (an acronym for "completely automated public Turing test to tell computers and humans apart") is a type of challenge-response test used in computing to determine whether or not the user is human. The term was coined in 2000 by Luis von Ahn, Manuel Blum, and Nicholas J. Hopper of Carnegie Mellon University, and John Langford of IBM. ...

In other words, a Captcha enabled system usually makes you type in characters in an image before it allows you to interact with the system. A Captcha might look like this:

captcha.jpg

So, what we've done with UThink is put these types of images into the comments forms. If you are being bothered by spam you can choose to enable this plugin and hopefully kiss spam goodbye.

How do you enable this plugin? Good question. Unfortunately, Captchas by themselves usually aren't that accessible for people with vision problems. So, we couldn't just automatically install it on everyone's blogs. Sorry. There are two ways you can enable this plugin.

The easiest way is to create a new blog. One thing we did do is put the proper code into all new blogs (as of today at 1:00 pm) so that if you do choose to enable the Captcha plugin it is as easy as clicking a box to turn it on. If you have a blog older than today, things are a little more tricky.

Please note: If you have created your blog after October 10, 2006 at 1:00 PM, skip down to step 2! You already have the code in place in step 1!

  1. First of all, you have to take this piece of code:

    <script type="text/javascript" src="<$MTCaptchaJsURL$>"></script>

    And put it into three templates: the Individual Entry Archive, the Comment Preview Template, and the Comment Listing Template. To get to these templates login to UThink, click on your blog, click on Templates in the left hand navigation menu, and then click on the "Archive" tab to get to the Individual Entry Archive, and the "System" tab to get to the Comment Preview and Comment Listing templates. From there, you need to put the code inside the Comments form on each of these templates. Look for code like this:

    ...
    <textarea id="comment-text" name="text" rows="10" cols="30"></textarea>
    </p>
    <div>
    <script type="text/javascript" src="<$MTCaptchaJsURL$>"></script>
    <div id="comments-open-footer" class="comments-open-footer">
    <input type="submit" name="preview" id="comment-preview" accesskey="v" value=" Preview " />
    <input type="submit" name="post" id="comment-post" accesskey="s" value=" Post " />
    ...

    See the bolded text? That is where you need to put code above on each of these three templates. With me so far? Good. Let's do the last two steps now.


  2. The next step is to turn the Captcha Plugin "on." To do this click on Settings in the left hand nav menu of your blog administration, then click on the "Plugins" tab. From there, look for the Captcha plugin and the "Show Settings" link on the right hand side...

    captcha2.jpg

    Click on "Show Settings" and then click the checkbox next to "Enable Captcha." Then click "Save Changes." Be prepared to wait for a bit. The configuration file for the Captcha plugin is a text file, and it is huge. So, to make a simple change like this takes a bit of time.


  3. Now "Rebuild" your entire blog. Click "Rebuild Site" in the left hand navigation menu and "Rebuild All Files."

And now you are finished. Go to one of your previous entries and click on the Comments link. You should now see a Captcha image! If you don't see a Captcha image ... well, something didn't go quite right. Feel free to email me at snackeru@umn.edu. I'll probably just ask you to give me access to your blog. I'd be happy to help you out!

Finally, just as a reminder, UThink blogs are set to moderate comments by default. This means if you create a new blog, by default your blog won't publish a comment unless you give it the OK. A lot of users prefer to turn this feature off and allow comments from anyone at anytime, but I suspect most people leave comment moderation in place. If that is the case, you can still hook up this Captcha functionality, but it will only reinforce a pretty good spam blocking tool already in place. (To turn off comment moderation, see this post)

That's it for now. As always, let me know if you have any questions!

Posted by snackeru at October 10, 2006 02:50 PM