MTSimpleComments
You may have noticed the site gnomes at work. They have implemented MTSimpleComments across the site, which means that Trackbacks and Comments appear seamlessly.
The only bit which didn't quite work was the recent trackback/comments. I wanted something like recently_commented_on for MTEntries but for both trackbacks and comments.
After fiddling for a bit, I have figured out a way to do this.
> Backup files. Use at your own risk #### Prerequisites First off you have to hack simplecomments.pm:122 local $ctx->{current_timestamp} = $comment->created_on; You will also need a copy of MTCollate. #### Usage
The following is code you can put into a template.
<MTCollateCollect>
<MTSimpleComments lastn="30">
<MTSimpleCommentEntry>
<MTCollateRecord>
<MTCollateSetField name="entry_date"><$MTEntryDate$></MTCollateSetField>
<MTCollateSetField name="id"><$MTEntryID$></MTCollateSetField>
<MTCollateSetField name="title"><$MTEntryTitle$></MTCollateSetField>
<MTCollateSetField name="url"><$MTEntryPermalink$></MTCollateSetField>
<MTCollateSetField name="count"><$MTSimpleCommentCount$></MTCollateSetField>
<MTSimpleCommentIfTrackback>
<MTCollateSetField name="type">Ping</MTCollateSetField>
<MTCollateSetField name="date"><$MTPingDate format="%Y%m%d%H%M"$></MTCollateSetField>
</MTSimpleCommentIfTrackback>
<MTSimpleCommentIfComment>
<MTCollateSetField name="type">Comment</MTCollateSetField>
<MTCollateSetField name="date"><$MTCommentDate format="%Y%m%d%H%M"$></MTCollateSetField>
</MTSimpleCommentIfComment>
</MTCollateRecord>
</MTSimpleCommentEntry>
</MTSimpleComments>
</MTCollateCollect>
<div class="side">
<ul>
<MTCollateList sort="date:- id:d" limit="5">
<li><a title="<$MTCollateField name="count"$> Comments & Trackbacks" href="<$MTCollateField name="url" regex="stripFile"$>#comments"><$MTCollateField name="title"$></a></li>
</MTCollateList>
</ul>
</div>
Add a comment
Nice site...