Based on a question posted by George Hotelling on his weblog ("90% Crud"), I have created an MT template to output an RSS feed which combines both comments and trackbacks iinto a single feed, using the SimpleComments plugin.
Here's the template:
<?xml version="1.0" encoding="<$MTPublishCharset$>"?>
<description>Latest comments/trackbacks for <$MTBlogName$></description>
<lastBuildDate><$MTDate format="%a, %d %b %Y %H:%M:%S"$> <$MTBlogTimezone no_colon="1"$></lastBuildDate>
<generator>Movable Type v<$MTVersion$></generator>
<MTSimpleComments lastn="20" sort_order="descend">
<title>Comment on "<MTSimpleCommentEntry><$MTEntryTitle remove_html="1" encode_xml="1"$></MTSimpleCommentEntry>"</title>
<p>- <$MTCommentAuthor encode_xml="1"$></p></description>
<guid isPermaLink="false">comment<$MTCommentID pad="1"$>@<$MTBlogURL$></guid>
<pubDate><$MTCommentDate format="%a, %d %b %Y %H:%M:%S"$> <$MTBlogTimezone no_colon="1"$></pubDate>
<title>Trackback: "<$MTPingTitle remove_html="1" encode_xml="1"$>"</title>
<description><b>Excerpt:</b> <$MTPingExcerpt encode_xml="1"$><br />
<b>Weblog:</b> <$MTPingBlogName encode_xml="1"$><br />
<b>Tracked:</b> <$MTPingDate format="%B %d, %Y %I:%M %p"$><br />
<MTSimpleCommentEntry><b>TB to post:</b> "<a href="<$MTEntryPermalink$>"><$MTEntryTitle encode_xml="1"$></a>"</MTSimpleCommentEntry></description>
<guid isPermaLink="false">tbping<$MTPingID zero_pad="6"$>@<$MTBlogURL$></guid>
<pubDate><$MTPingDate format="%a, %d %b %Y %H:%M:%S"$> <$MTBlogTimezone no_colon="1"$></pubDate>
If you would like to use this template to create your own combined comments/trackbacks RSS feed: Download and install the SimpleComments plugin if you do not already have it. Create a new index template, give it an output file name like "simplecomments.xml", and copy the above code into the template. Save the template then rebuild.
I like this idea so much that I am going to use this as my comments/trackbacks RSS feed instead of the separate comment and trackback feeds that I was using before.
Update: Before I posted the above template, I had created a combined comment/trackback RSS feed and validated it. Later, I tried to subscribe to the feed with Radio Userland's RSS news aggregator, but the aggregator did not like it - it reported an error "field '/pcdata' not defined". This string does not appear anywhere within my RSS feed, although "/p" does as well as "CDATA".
For every field I had included in my RSS template that used the encode_xml="1" attribute, MT was encoding the data by enclosing it in a CDATA block. Radio Userland's aggregator does not seem to like this method of encoding. To allow my feed to be read in Radio Userland's aggregator, I enabled the "NoCDATA 1" option in my mt.cfg file. With this option enabled, Radio Userland's aggregator now reads my RSS feed with no complaints.
Userland has their own RSS Validator where feeds can be tested to see if Radio Userland's aggregator will successfully read them.
Update 10-Jun-2004: RSS Combined Comments/Trackback Feed template updated:
- Comment at top of feed removed
ttlelement removed - not necessary