Using SCode with MT 3.2 and Logjamming.com


  1. Prerequisites: MT 3.2 or higher, GD library, and GD Perl Module
    all installed and working.

  2. Download plugin: href="http://www.movalog.com/plugins/wiki/SCode">http://www.movalog.com/plugins/wiki/SCode

  3. Extract to local disk, preserving directory structure.

  4. Upload contents of "php" folder to /cgi-bin/mt/php/ in ASCII mode
    (if you used Josh & Loren's MT install suggestions).


  5. Upload contents of "plugins" folder to /cgi-bin/mt/plugins/

  6. Change the attributes of /cgi-bin/mt/plugins/SCode/mt-scode.cgi
    to 755 or -rwxr-xr-x (use WS-FTP to do this).


  7. Log into you MT install and check to see if SCode is listed in
    the Plugins item on System Shortcuts.  If so, then you put the files in
    the proper places.  If not: rinse, repeat, wipe hands on pants.

  8. Open the SCode Settings and change the Temp Directory to:
    /home/httpd/vhosts/YOUR.DOMAIN.HERE/httpdocs/tmp  this is where SCode
    stores it's images, and it must be
    read & write-able by MT .  Click Save Changes to save & exit.


  9. Navigate to the blog you want to enable SCode on and go to
    Settings... Plugins.  Click Show Settings in the SCode listing and make
    sure the Enable checkbox is checked.  Save Changes to save & exit.

  10. To insert the CAPTCHA item into your comment posting templates in
    the default way:

  11. Edit the Individual Entry Archive template and add the <MTSCodeInsert>
    tag to make the section near the end read like:

    <div id="comments-open-footer"
    class="comments-open-footer">

    <MTSCodeInsert>

    <input type="image" accesskey="v"
    src="/images/static/btn-preview.png" name="preview"
    id="comment-preview" value="Preview" />

    <input type="image" accesskey="s" src="/images/static/btn-post.png"
    name="post" id="comment-post" value="Post" />

    </div>


  12. Edit the Comment Preview template and add the <MTSCodeInsert>
    tag to make the section 2/3 of the way through read like:

    <div id="comments-open-footer"
    class="comments-open-footer">

    <MTSCodeInsert>

    <input type="submit" name="preview" id="comment-preview"
    accesskey="v" value="Preview" />

    <input type="submit" name="post" id="comment-post" accesskey="s"
    value="Post" />

    <input type="button" name="cancel" id="comment-cancel"
    value="Cancel" onclick="window.location='<$MTEntryPermalink$>'"
    />

    </div>


  13. Remember to save both templates and then rebuild your site.

  14. To test the functionality of the CGI script, you can browse to http://www.YOURDOMAINHERE.com/cgi-bin/mt/plugins/SCode/mt-scode.cgi
    if everything is working, you will see a test CAPTCHA with a number of
    99999 (if you left the default length of 6).  For a further test, enter
    a bogus comment and then enter an incorrect code-- depending on where
    you have the SCode Action button set in System Overview, your comment
    will either be junked or you will receive an error on submit.  Either
    way, the only spam you'll be dealing with will be in your Mac &
    Cheese.


For further info, see James Seng's SCode site, and Tim Houghton's Digitalife site to sort out the GD stuff.