<li><a href="#TinyTuring">About the TinyTuring Plugin</a></li>
<li><a href="#templates">Implementing TinyTuring on Your Templates</a></li>
<li><a href="#settings">Plugin Settings</a></li>
<li><a href="#MTTinyTuring">MTTinyTuring</a></li>
<li><a href="#MTTinyTuringStart">MTTinyTuringStart</a></li>
<li><a href="#MTTinyTuringLetter">MTTinyTuringLetter</a></li>
<li><a href="#MTTinyTuringWord">MTTinyTuringWord</a></li>
<li><a href="#MTTinyTuringField">MTTinyTuringField</a></li>
<li><a href="#MTTinyTuringHiddenField">MTTinyTuringHiddenField</a></li>
<li><a href="#VersionHistory">Version History</a></li>
</ul>

<h2><a name="TinyTuring"></a>About the TinyTuring Plugin</h2>
<p>This <a href="http://www.sixapart.com/movabletype/">Movable Type</a> plugin implements a simple approach to help prevent <a href="http://www.sixapart.com/pronet/comment_spam">comment spam</a> on weblogs with public commenting enabled.</p>
<p>One way to try to prevent automated scripts from posting comments to a weblog is to implement a simple <a href="http://www.sixapart.com/pronet/comment_spam#turing">Turing test</a> that asks the user to follow written instructions and correctly enter some input based on those instructions. A couple of years ago, Stefan Geens published a <a href="http://www.stefangeens.com/000381.html">hack for Movable Type</a> that allowed you to create just about the most rudimentary possible version of such a test: The user is required to type a single letter in order to post a comment. Simple, yet those who used it found it to be remarkably effective.</p>
<p>However, this method had several drawbacks. It required hacking some of the Movable Type source code; it would ask for the same letter across all entries (meaning it would be relatively easy for a spam script to circumvent); and it was never updated for current versions of MT, which now includes its own built-in anti-spam measures.</p>
<p>TinyTuring expands upon Stefan's basic idea, implementing it as an easy-to-install plugin. No hacking is required, and the letter the user is asked for will vary randomly with each entry. An encrypted key based on a private code is used as an additional safeguard, so a spam script couldn't simply try all 26 letters. For a comment where the correct letter is not provided, you have the option either to junk it using MT's junk scoring system, or to block it entirely so it never gets into your database.</p>

<div class="mtdoc_image"><img src="http://www.staggernation.com/mtplugins/doc_images/TinyTuring/tt_field.png" /></div>

<p>Obviously, this approach does nothing whatsoever to prevent actual humans from going to your weblog and manually posting spam. Its intent is entirely to block automated scripts. TinyTuring is meant to be used in conjunction with MT's other content-based filtering mechanisms, not in place of them.</p>
<p>As with all anti-spam measures, TinyTuring may be effective for a while and become ineffective at some point as spammers devise a way to work around it. If you use it and eventually find that spam is once again starting to get through, I'd appreciate it if you could report this on the <a href="http://www.staggernation.com/mtplugins/forums/viewforum.php?id=33">Plugin Forums</a> so I can see if there's a way to improve the plugin.</p>

<h3>Requirements</h3>

<p>TinyTuring requires Movable Type 3.2.</p>

<h3>Special Thanks</h3>

<p>To <a href="http://www.stefangeens.com/">Stefan Geens</a> for the original hack, and to <a href="http://www.radosh.net/">Daniel Radosh</a> for requesting this feature and serving as a guinea pig for various versions of the plugin.</p>

<h3>Installation</h3>
<p>To install TinyTuring, download <b>TinyTuring.tar.gz</b> 
and decompress it on your hard drive. This will result in a directory 
called <b>TinyTuring-[version]</b>. The directories within 
this correspond to  directories in the MT directory on your 
server.</p>

<p>Open the <b>plugins</b> directory. Upload the file <b>TinyTuring.pl</b> to the <b>plugins</b> directory on 
your server.</p>

<p>If you're using <a 
href="http://www.sixapart.com/movabletype/docs/3.2/06_publishing/enabling_dynamic_publishing.html">dynamic 
publishing</a>, open the <b>php/plugins</b> directory. Upload 
all the files in that directory to the <b>php/plugins</b> 
directory on your server.</p>

<?php include '/home/staggernation/staggernation.com/mtplugins/support.inc'; ?>

<h2><a name="templates"></a>Implementing TinyTuring on Your Templates</h2>

<p>Once the plugin is installed, you must add a bit of template code to the MT templates that contain commenting forms. Normally this will be your <b>Individual Entry Archive</b> template (under <b>Archives</b>) and your <b>Comment Preview Template</b> (under <b>System</b>).</p>

<p>You have two options for how to insert the necessary code. The simplest way is simply to insert the <a href="#MTTinyTuring">MTTinyTuring</a> tag where you want the test to appear. This will generate all the components needed to get TinyTuring to work, including the field for entering the letter, the text asking the user to enter the letter, and a hidden field with an encrypted value.</p>

<p>If you want more control over how the test looks, or what the text says, you can use the other tags provided to insert these elements individually. For example:</p>

<pre>&lt;$MTTinyTuringStart$&gt;
&lt;$MTTinyTuringHiddenField$&gt;&lt;div class="my-text-style"&gt;
Please enter the letter "&lt;$MTTinyTuringLetter$&gt;" in the field below:
&lt;/div&gt;
&lt;div class="my-field-style"&gt;
&lt;$MTTinyTuringField$&gt;
&lt;/div&gt;</pre>

<p>Either way, you can place the TinyTuring code anywhere within the comment form, but it's probably best to put it immediately above the buttons for submitting a comment. For example, if you're using the default MT templates, you might put it immediately before this code:
<pre>&lt;div id="comments-open-footer" class="comments-open-footer"&gt;</pre></p>

<p>After you've put the code on your templates, you must enable TinyTuring for your weblog in the <a href="#settings">Plugin Settings</a>.

<h3>Previewing vs. Posting</h3>

<p>TinyTuring does not actually require you to enter the validation letter in order to preview a comment, only to post the comment. And it currently does not carry over a letter you enter in the form on the entry page to the field on the comment preview template (and, in fact, it will probably ask for a different letter). This is also true when previewing multiple times.</p>

<p>Because of this, you may want to add some text to let commenters know that they don't have to enter the letter until they're finished previewing and are ready to post.</p>

<h2><a name="settings"></a>Plugin Settings</h2>

<p>To change the settings for TinyTuring for a particular weblog, go into the <b>Settings</b> area for that weblog and click the <b>Plugins</b> tab. You should see a listing for TinyTuring. Click on <b>Show Settings</b> to display the settings.</p>

<p>To change the default settings for all weblogs, go to <b>System Overview > Plugins</b> and click on <b>Show Settings</b> in the TinyTuring listing.</p>

<div class="mtdoc_image"><img src="http://www.staggernation.com/mtplugins/doc_images/TinyTuring/tt_settings.png" /></div>

<p>The available settings are as follows:</p>

<ul>
<li><b>Enable:</b> Controls whether, when a comment is submitted, the TinyTuring plugin will check to see that the correct letter has been entered. By default, TinyTuring is turned off for all weblogs.</li>
<li><b>Unverified Comments:</b> This lets you choose what will happen when a comment is submitted without the correct letter entered in the TinyTuring field. You can either <b>Junk</b> the comment, meaning it will be entered into the MT system but with a junk score of -10 (so it won't be published but can be reviewed by an administrator), or <b>Reject</b> the comment entirely.</li>
<lI><b>Salt:</b> This is a two-letter code used to generate the encrypted hidden field used by TinyTuring. The code itself is never displayed on your pages. This can (and probably should) be different for each weblog for which you have TinyTuring turned on.</li>
</ul>

<h2><a name="MTTinyTuring"></a>MTTinyTuring</h2>

<p>This tag will display all the HTML code necessary for TinyTuring to function. It will select a random letter, and a verb or phrase beginning with that letter, which it uses to begin a sentence of the following form:</p>

<pre>Terminate comment spam by typing the first letter of this sentence here:</pre>

<p>Some CSS code is included so that the letter in question will be displayed bold and slightly larger.</p>

<h2><a name="MTTinyTuringStart"></a>MTTinyTuringStart</h2>

<p>If you're not using <a href="#MTTinyTuring">MTTinyTuring</a> to generate your code, you must use this tag before any of the other tags. This will initialize the plugin and select a random letter.</p>

<h2><a name="MTTinyTuringLetter"></a>MTTinyTuringLetter</h2>

<p>This tag will display the randomly selected letter for a given page.</p>

<h2><a name="MTTinyTuringWord"></a>MTTinyTuringWord</h2>

<p>This tag will display a verb or phrase beginning with the randomly selected letter, from the following list:</p>

<p><b>a</b>void, <b>b</b>eat, <b>c</b>ancel, <b>d</b>efeat, <b>e</b>liminate, <b>f</b>orbid, <b>g</b>et rid of, <b>h</b>inder, <b>i</b>nhibit, <b>j</b>ettison, <b>k</b>ick out, <b>l</b>iquidate, <b>m</b>itigate, <b>n</b>egate, <b>o</b>bliterate, <b>p</b>revent, <b>q</b>uash, <b>r</b>educe, <b>s</b>mash, <b>t</b>erminate, <b>u</b>nload, <b>v</b>eto, <b>w</b>ipe out, <b>x</b> out, <b>y</b>ou can help stop, <b>z</b>ap</p>

<h2><a name="MTTinyTuringField"></a>MTTinyTuringField</h2>

<p>This tag will display a small input field named <code>tinyturing</code>, which is the field the plugin will look for when the comment is submitted.

<h2><a name="MTTinyTuringHiddenField"></a>MTTinyTuringHiddenField</h2>

<p>This tag will output the HTML code for a hidden form field whose name is an encrypted key based on the random letter and the private two-letter code specified in the <a href="#settings">settings</a>. This field must be submitted along with the user's one-letter entry for TinyTuring to accept the comment.</p>

<h2><a name="VersionHistory"></a>Version History</h2>

<p>10/29/06 - version 1.02
<ul>
<li>The TinyTuring junk filter was mistakenly being applied to incoming TrackBack pings, resulting in their being junked (Dave Hill)</li>
</ul>
</p>

<p>6/5/06 - version 1.01
<ul>
<li>Fixed bug where "Enabled" setting being turned off was not respected for junk filtering (Earl Fogel)</li>
</ul>
</p>

<p>5/19/06 - version 1.0 released</p>

