Note: CogDogBlog has a new WordPress powered home at http://cogdogblog.com/. 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.
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:
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"> <channel> <title><$MTBlogName$>: <$MTEntryTitle$> Comments and Trackbacks</title> <link><$MTEntryLink$></link> <description><$MTEntryExcerpt$></description> <language>en-us</language> <lastBuildDate><$MTDate format="%a, %d %b %Y %H:%M:%S"$> <$MTBlogTimezone no_colon="1"$></lastBuildDate> <generator>Movable Type v<$MTVersion$></generator> <ttl>60</ttl> <item> <title>CDB Entry: <$MTEntryTitle$></title> <description><$MTEntryExcerpt encode_html="1"$></description> <link><$MTEntryLink$></link> <pubDate><$MTEntryDate format="%a, %d %b %Y %H:%M:%S"$> <$MTBlogTimezone no_colon="1"$></pubDate> </item> <MTComments> <item> <title>comment by: <$MTCommentAuthor$></title> <description><$MTCommentBody encode_html="1"$></description> <link><$MTBlogArchiveURL $><$MTArchiveDate format="%Y/%m/%d"$>/< MTIfEmpty var="EntryKeywords"><$MTEntryTitle dirify="1" trim_to="20"$> </MTIfEmpty><MTIfNotEmpty var="EntryKeywords"> <$MTEntryKeywords dirify="1"$> </MTIfNotEmpty>.php#<$MTCommentID$></link> <pubDate><$MTCommentDate format="%a, %d %b %Y %H:%M:%S"$> <$MTBlogTimezone no_colon="1"$></pubDate> </item> </MTComments>
"<$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"$>
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 ]