CDB cat dog-egories:

August 18, 2004

Note: CogDogBlog has a new WordPress powered home at All entries from this version have been moved there, so as a guide dog service try finding this article in its new home by title search.

RSS Feeds for Comments/Trackbacks Per Blog Post

I cannot remember why I started down this MT template path, but it was a fun journey. Somehow I stumbled into Phil Ringnalda's explanation on how to create RSS feeds for individual entries and comments.

This seemed interesting- often when you write a comment to someone else's blog, there is no way to follow a discussion unless you remember to return to the comment (some blogs have email notifiers). Comments end up being tossed like darts with no followup.

I began addressing this on CDB by including a link to the RSS feed for all comments from this blog. Not good enough.

With a bit of wrangling and quite a bit of modifications from Phil's original template, I got it going. Every individual entry on this blog has its own RSS feed that includes as items:

  • The entry "excerpt" (a short summary. Phil's script stuck the entire entry in there, but with a link it seemed to be overkill.

  • Next are items for all comments posted to that entry. Links for these point to named anchors already in the individual entries.

  • Finally are items for all trackback pings recorded for the entry.

For example, this recent entry is nice because it has 2 comments and 2 Trackback pings:

it has its own individual RSS feed with just the comments and pings from the entry:

Unfortunately, I am now tired and perhaps unable to explain the magic...

The template below is what I conjured up for my blog. There is a bit more mess for constructing the entry URLs since I create archives based on the published date and a keyword naming for the archive file, rather than individual entries with meaningless URLs like 000456.html. Phil's actual entries use the same convention, so somewhere he changed his own template.

I also could not understand why Phil's original directions had one create links on the comments posting time. So I skipped that. Also, the example provided was a skimpy RSS 0.91 format, so I dug around some other templates I had and created the feeds as RSS 2.0.

Anyhow, I had to create a new archive template named (well it can be whatever you want, I called it Phil's original directions">Individual Entry RSS).

<?xml version="1.0" encoding="<$MTPublishCharset$>"?>
 <rss version="2.0">
     <title><$MTBlogName$>: <$MTEntryTitle$> 
Comments and Trackbacks</title>
     <lastBuildDate><$MTDate format="%a, %d %b %Y %H:%M:%S"$> 
     <$MTBlogTimezone no_colon="1"$></lastBuildDate>
     <generator>Movable Type v<$MTVersion$></generator>
      <title>CDB Entry: <$MTEntryTitle$></title>
      <description><$MTEntryExcerpt encode_html="1"$></description>
       <pubDate><$MTEntryDate format="%a, %d %b %Y %H:%M:%S"$> 
       <$MTBlogTimezone no_colon="1"$></pubDate>
     <title>comment by: <$MTCommentAuthor$></title>
     <description><$MTCommentBody encode_html="1"$></description>
$><$MTArchiveDate format="%Y/%m/%d"$>/<
MTIfEmpty var="EntryKeywords"><$MTEntryTitle dirify="1" trim_to="20"$>
</MTIfEmpty><MTIfNotEmpty var="EntryKeywords">
<$MTEntryKeywords dirify="1"$>
      <pubDate><$MTCommentDate format="%a, %d %b %Y %H:%M:%S"$> 
<$MTBlogTimezone no_colon="1"$></pubDate>

<MTPings sort_order="descend">
<title>Trackback from
"<$MTPingTitle remove_html="1" encode_xml="1"$>"</title>
<b>Excerpt:</b> <$MTPingExcerpt encode_xml="1"$><br />
<$MTPingBlogName encode_xml="1"$><br />
<$MTPingDate format="%B %d, %Y %I:%M %p"$></description>
<pubDate><$MTPingDate format="%a, %d %b %Y %H:%M:%S"$>
<$MTBlogTimezone no_colon="1"$></pubDate>

You have to go into the MT Config, then Archiving, and create a new archive-- the archive type should be Individual, and the template should be the one you just created above.

Then rebuild. And wait if you have 400+ entries like me.

It's interesting and shows that MT has quite a bit of depth when you rummage around the template tags-- not sure if anyone in their right mind would subscribe to a feed for a single entry, but there is always something learned in a process like this.

blogged August 18, 2004 11:52 PM :: category [ rss , using mt ]
Comments About "RSS Feeds for Comments/Trackbacks Per Blog Post"
RSS Feed for comments on this entry
RSS Feed for all CDB comments


Now I want the world. I want to be able to put feeds together in one RSS list. Then I want to, using a check box approach, select particular items, and produce an RSS feed from my edited list...Then embed that in my course.

Sounds odd, but I am noticing that in all the feeds I might find a few per feed that are useful..

And I don't want to overwhelm my students...

I am a pretty greedy kind of RSS kinda person, tho...

Dare I dream?

Commented by: Michelle Lamberson on August 19, 2004 09:37 PM


Why not whipped cream? a Cherry on top? low gas mileage?

I may not follow you exactly, so let me walk it through again.

You have a big list of RSS feed URLs. You want them to spit their contents out on a page, a screen where you check of particular *items* (e.g. one blog posting from Brian Lamb, two from Bruce Landon, one from the guy wioth the funny hat from Bulgaria, and spit *those* back as a feed?

It would seem a lot of editing review work, especially as the feeds change and morph over time.

However, if that is your desire, to mix and match tracks from different bloggers, then your answer is.... Furl It!

You can create a folder in Furl for your advanced crytallography class and another one for that Bolivian Folk Dancing course. As you scan your blogs in something like bloglines you can Furl directly the interesting items into the appropriate Furl Folder using a one click bookmarklet

From an RSS reader, you'd have to follow the link to the web site, then Furl it. You can then use RSS feeds from those folders whereever you want, with your favorite Feed to JavaScript tool. As you add new things, the feed does to.

Would you like to supersize that?

Commented by: Alan Levine on August 19, 2004 10:24 PM

Spammers Have Force Our Hands...
Note: Those nasty blog-spamming roaches have forced us to take action to prevent their spread- all entries made to this blog will remain open for comments for 30 days after the original posting date. After that, it is old news anyhow, correct?

If you really need to make contact with the chief dog around here, please submit a request via our feedback center