Upgrading to Enhanced Comment Authentication
In Movable Type 4.2 we have completely overhauled the comment authentication component of Movable Type. These changes resolve a number of problems reported by users who manage multiple blogs on multiple domains, and fulfills a number of feature requests from customers regarding having access to more of the current visitor’s profile information, like their user pic.
Upgrading your templates to take advantage of this new system requires a number of changes to your templates. These changes are outlined below.
Step 1. Upgrade your Site JavaScript
Your blog’s javascript template needs to be updated to contain the latest code from Six Apart. This can be done by refreshing this template or by manually pasting into your template the latest template source.
Step 2. Update your Comment Form
The comment form has been enhanced in a number of ways in Movable Type 4.2. Spam armor has been added to help reduce comment spam and form elements have been added in support of threaded commenting. In most circumstances you can edit your Comment Form template module, or your Entry template, or your Individual Archive Template (depending upon your setup) and look for the <mt:IfCommentsAccepted>
block and replace it with the following template code.
Note: Keep in mind that your comment form has been heavily customized you will need to take care in applying these changes as you would not want to overwrite your existing look and feel.
Tip: You can save your existing comment form by encapsulating it by <mt:ignore>
and </mt:ignore>
tags. These tags will cause Movable Type to skip over the contents of mt:ignore
as if they were not even there. This will allow you to keep a record of your old code without deleting it.
Template Source
<mt:IfCommentsAccepted>
<div id="comments-open">
<h2 class="comments-open-header">Leave a comment</h2>
<div class="comments-open-content">
<div id="comment-greeting"></div>
<form method="post" action="<$mt:CGIPath$><$mt:CommentScript$>"
name="comments_form" id="comments-form" onsubmit="return mtCommentOnSubmit(this)">
<input type="hidden" name="static" value="1" />
<input type="hidden" name="entry_id" value="<$mt:EntryID$>" />
<input type="hidden" name="__lang" value="<$mt:BlogLanguage$>" />
<input type="hidden" name="parent_id" value="<$mt:CommentParentID$>" id="comment-parent-id" />
<input type="hidden" name="armor" value="1" />
<input type="hidden" name="preview" value="" />
<input type="hidden" name="sid" value="" />
<div id="comments-open-data">
<div>
<label for="comment-author">Name</label>
<input id="comment-author" name="author" size="30" value="" onfocus="mtCommentFormOnFocus()" />
</div>
<div>
<label for="comment-email">Email Address</label>
<input id="comment-email" name="email" size="30" value="" onfocus="mtCommentFormOnFocus()" />
</div>
<div>
<label for="comment-url">URL</label>
<input id="comment-url" name="url" size="30" value="" onfocus="mtCommentFormOnFocus()" />
</div>
<div>
<input type="checkbox" id="comment-bake-cookie" name="bakecookie"
onclick="mtRememberMeOnClick(this)" value="1" accesskey="r" />
<label for="comment-bake-cookie">Remember personal info?</label>
</div>
</div>
<div id="comment-form-reply" style="display:none">
<input type="checkbox" id="comment-reply" name="comment_reply"
value="<$mt:CommentParentID$>" onclick="mtSetCommentParentID()" />
<label for="comment-reply" id="comment-reply-label"></label>
</div>
<div id="comments-open-text">
<label for="comment-text">Comments
<mt:IfAllowCommentHTML>(You may use HTML tags for style)</mt:IfAllowCommentHTML></label>
<textarea id="comment-text" name="text" rows="15" cols="50"
onfocus="mtCommentFormOnFocus()"></textarea>
</div>
<div id="comments-open-captcha"></div>
<div id="comments-open-footer">
<input type="submit" accesskey="v" name="preview_button"
id="comment-preview" value="Preview" onclick="this.form.preview.value='1';" />
<input type="submit" accesskey="s" name="post"
id="comment-submit" value="Submit" />
</div>
</form>
</div>
</div>
<script type="text/javascript">
<!--
mtAttachEvent("load", mtEntryOnLoad);
mtAttachEvent("unload", mtEntryOnUnload);
//-->
</script>
</mt:IfCommentsAccepted>