The full markup for hierarchical threading Movable Type

| No Comments | No TrackBacks
The instructions aren't bad, but they don't give you template markup that you can just copy and paste into the template editor. For those that need the full markup for Movable Type 4.2, here it is.
<mt:Ignore>
<!-- Display comments for the entry/page or commenting form if entry/page is accepting comments -->
</mt:Ignore>
<mt:IfCommentsActive>
<div id="comments" class="comments">


<mt:SetVarTemplate name="comment_detail_template">
<div id="comment-<$MTCommentID$>" class="comment<mt:IfCommentParent> comment-reply</mt:IfCommentParent>">
<div class="inner">
<div class="comment-header">
<div class="asset-meta">
<span class="byline">
<$MTCommentAuthorIdentity$>
<mt:IfCommentParent>
<span class="vcard author"><$MTCommentAuthorLink$></span> replied to <a href="<mt:CommentParent><$mt:CommentLink$></mt:CommentParent>">comment from <mt:CommentParent><$MTCommentAuthor$></mt:CommentParent></a>
<mt:else>
<span class="vcard author"><$MTCommentAuthorLink$></span>
</mt:IfCommentParent>
| <a href="<$mt:CommentLink$>"><abbr class="published" title="<$MTCommentDate format_name="iso8601"$>"><$MTCommentDate$></abbr></a>
<MTIfCommentsAccepted>
| <$MTCommentReplyToLink$>
</MTIfCommentsAccepted>
</span>
</div>
</div>
<div class="comment-content">
<$MTCommentBody$>
</div>
</div>
</div>
</mt:SetVarTemplate>


<MTComments>
<MTCommentsHeader>
<h2 class="comments-header"><$MTEntryCommentCount singular="1 Comment" plural="# Comments" none="No Comments"$></h2>
<div class="comments-content">
</MTCommentsHeader>
<mt:IfCommentParent> <!-- If comment has a parent comment. We ignore this, as we just want the top-level-parent comments -->
<mt:Else> <!-- If comment doesn't have a top-level-parent -->
<$mt:var name="comment_detail_template"$>
<mt:CommentReplies> <!-- Loop through the reply comments -->
<mt:CommentsHeader>
<div style="margin-left: 20px;">
</mt:CommentsHeader>
<$mt:var name="comment_detail_template"$>
<$mt:CommentRepliesRecurse$> <!-- For each reply comment, recursively display any reply comments -->
<mt:CommentsFooter>
</div>
</mt:CommentsFooter>
</mt:CommentReplies>
</mt:IfCommentParent>
<MTCommentsFooter>
</div>
</MTCommentsFooter>
</MTComments>



<mt:Ignore>
<!-- Display commenting form if entry/page is accepting comments -->
</mt:Ignore>
<mt:IfCommentsAccepted>
<div class="comments-open" id="comments-open">
<h2 class="comments-open-header">Leave a comment</h2>
<div class="comments-open-content">

<mt:Ignore>
<!-- Display greeting for users if blog allows users to register locally -->
</mt:Ignore>
<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 id="comment-form-name">
<label for="comment-author">Name</label>
<input id="comment-author" name="author" size="30" value="" onfocus="mtCommentFormOnFocus()" />
</div>
<div id="comment-form-email">
<label for="comment-email">Email Address</label>
<input id="comment-email" name="email" size="30" value="" onfocus="mtCommentFormOnFocus()" />
</div>
<div id="comment-form-url">
<label for="comment-url">URL</label>
<input id="comment-url" name="url" size="30" value="" onfocus="mtCommentFormOnFocus()" />
</div>
<div id="comment-form-remember-me">
<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="" 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>


</div>
</mt:IfCommentsActive>

Related Entries:

Printer-friendly version

No TrackBacks

TrackBack URL: http://www.codemonkeyramblings.com/mt/mt-tb.cgi/647

Leave a comment

June 2009

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        

Tips

OpenID accepted here Learn more about OpenID

Creative Commons License
This blog is licensed under a Creative Commons License.
Powered by Movable Type 4.261