RecentTrackbacks

Recent Trackback template using just MovableType and the MTSQL plugin. (Did I tell you how much I liked the MTSQL plugin? Oh, I did, didn’t I.)

<ul>

<MTSQLPings query="select p.tbping_id
from mt_entry e, mt_trackback t, mt_tbping p
where e.entry_id = t.trackback_entry_id
and t.trackback_id = p.tbping_tb_id order by p.tbping_created_on limit 5">

<MTSQLEntries query="select DISTINCT e.entry_id
from mt_entry e, mt_trackback t, mt_tbping p
where e.entry_id = t.trackback_entry_id
and t.trackback_id = p.tbping_tb_id
and p.tbping_id = [MTPingID]">

<li><a href="<MTPingURL>"><MTPingTitle></a>
 on <a href="<MTEntryPermalink>"><MTEntryTitle></a>
</li>

</MTSQLEntries>
</MTSQLPings>
</ul>

Change the value after limit to however many trackbacks you want. In theory, you can use any MTEntries or MTPings tags you want in there

So, for inclusion with SimpleComments, this is my template.

<h4>Recent Comments</h4>
<ul class="recentcomments">
<MTSimpleComments lastn="15" sort_order="descend">
<MTSimpleCommentIfComment>
<li><$MTCommentAuthorLink show_email="0"$>
on <a href="<MTCommentEntry>
<$MTEntryPermalink$>
</MTCommentEntry>#comment<$MTCommentID$>"><MTCommentEntry><$MTEntryTitle$></MTCommentEntry>
</a></li>
</MTSimpleCommentIfComment>
<MTSimpleCommentIfTrackback>
<MTSQLEntries query="select DISTINCT e.entry_id
from mt_entry e, mt_trackback t, mt_tbping p
where e.entry_id = t.trackback_entry_id
and t.trackback_id = p.tbping_tb_id
and p.tbping_id = [MTPingID]">

<li>[Trackback] <a href="<MTPingURL>"><MTPingTitle></a>
 on <a href="<MTEntryPermalink>"><MTEntryTitle></a>
</li>

</MTSQLEntries>
</MTSimpleCommentIfTrackback>
</MTSimpleComments>
</ul>

Comments are closed.