RSS feed for individual entries plus comments

As Tobias notes, an RSS feed of the last 20 comments on any post can be a bit noisy, and as I’m beginning to notice from subscribing to the EmptyBottle comments feed, comments tend to need context even more than weblog posts. Right now, while I remember the post that got the comment, I know why Shannon would be saying “Actually, if you’ve got a fat pipe, I’m free this evening”, but in another day or two I would have to check back to see what she was commenting about (and with no link from the feed to the comment thread or the post, I’d probably just blow it off).

While I still think that there are blogs and blog readers for whom a feed of all comments on all posts is a good fit, there are also blogs and readers who would be better served by a feed that consists of an individual post, and the comments on that post. So, if you use Movable Type’s individual entry archives, a template and instructions for using it are over yonder.

The template:

<?xml version="1.0"?>
<!-- generator="MovableType/<$MTVersion$>" -->
<rss version="0.92">
  <channel>
    <title><$MTBlogName$>: <$MTEntryTitle$></title>
    <link><$MTEntryLink$></link>
    <description><$MTEntryExcerpt$></description>
    <language>en-us</language>
    <item>
      <title><$MTEntryTitle$></title>
      <description><$MTEntryBody encode_html="1"$></description>
      <link><$MTEntryLink$></link>
    </item>
    <MTComments>
    <item>
     <title><$MTCommentAuthor$></title>
     <description><$MTCommentBody encode_html="1"$></description>
     <link><$MTBlogArchiveURL$><$MTCommentEntryID pad="1"$>.php#<$MTCommentID pad="1"$></link>
     </item>
    </MTComments>
  </channel>
</rss>

Instructions:

  • First, you’ll need permalinks for individual comments:
    • In your individual entry template, add <a name=”<$MTCommentID pad=”1″$>”></a> just before <$MTCommentBody$>
    • Turn the comment date into a permalink with <a href=”<$MTBlogArchiveURL$><$MTCommentEntryID pad=”1″$>.php#<$MTCommentID pad=”1″$>”><$MTCommentDate$></a> (note the “.php”, which you’ll need to change to the file extension for your individual entry archives)
  • Then, create a new archive template (Templates -> Create new archive template), name it something useful like Individual post RSS feed, paste in the template code above and save the template
  • Tell MT what sort of archive template it should be (Blog Config -> Archiving -> Add New…): Archive Type should be Individual, and the Template should be the one you just created
  • Tell MT how to name the new files: in the input area in the Archive File Template by your newly created entry, add <$MTEntryID pad=”1″$>.xml so that the filename for your RSS feed for entry 666 (which has a filename like 000666.php or 000666.html) will be 000666.xml
  • Save your changes, and then Rebuild Individual Archives Only, and you should have RSS feeds for each entry and its comments. If it worked, and adding a new comment rebuilds the feed, you just need to add a link to the feed (in your individual entry template at least, possibly also in the comment popup template), and then sit back and enjoy the increase in comments once people discover that they can keep track of replies

11 Comments

Comment by taing #
2002-06-11 08:58:21

Phil,

Have you taken a look at ScriptyGoddess’s Subscribe to Comments?

 
Comment by Phil Ringnalda #
2002-06-11 23:21:40

Yup, posted a link to it five posts ago, but I personally don’t like the idea of subscribing to a comment thread by email. For people with enough sense to keep a steady supply of throwdown email addresses handy, it’s only a hassle (they did the best they could with an awkward task of fitting it into the comments, but it’s still not elegant or obvious, and IIRC you still have to come back to unsubscribe). Whereas if I could remember where I saw instructions for a link to auto-subscribe in Amphetadesk, then the RSS feed would be one click to subscribe, and one click on the X in Amphetadesk to unsubscribe when you get bored with it.

 
2003-01-23 12:13:40

Individual Entry RSS feeds

With a little help from this post by Phil Ringnalda and a lot of customization, I have now implemented RSS

 
Trackback by nf0's Life #
2003-01-30 06:49:28

RSS Feed Changes

I read Kevin’s plea to MT blog owners a while back. Well this morning i followed through, i have modifed my feeds to be valid. I should have done this sooner. While i’m making changes, i added a Recent Comments feed here based of on Bill Kearney’s idea…

 
Trackback by Design-A-Blog #
2003-06-09 17:51:49

Ongoing Projects

On my to-do list: Figure out how to do an RSS feed for comments. I found a useful MT template

 
Trackback by Confetti Falling #
2003-08-02 17:21:34

RSS ”Subscribe to Comments”

RSS feed for individual entries plus comments Essentially, this is a ”subscribe to comments” feature using RSS rather than email. I think it’s very interesting, considering so many of us are using RSS nowdays anyway. Of course, he wrote this…

 
Trackback by Pressepapiers.net #
2003-08-21 16:59:36

RSS feed for individual entries

Some feeds I subscribe to put comments in their main news feed. (e.g. Unsanity or Toomuchsexy) I can understand why…

 
Trackback by Don't Back Down #
2003-10-21 08:17:54

Researching Dynamic Feeds

I’ve recently been tossing around some ideas about dynamically creating syndication feeds for the blog. Most specifically I’ve been trying to figure out how to best keep up with comments on a particular entry. By default, the only solution is to come b…

 
Trackback by The Eric Rice Journal #
2004-04-24 12:53:48

Newly Added: RSS Feeds for Comments

One of my biggest pet peeves is having to remember to visit sites that I’m following the comments on–whether the conversation is one I’m a part of, or simply one I’m just following.

 
Trackback by cogdogblog #
2004-08-18 23:52:59

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…

 
2005-07-01 21:01:49

RSS feed of trackbacks for entries

Some people are interested in creating RSS feeds for each of their entries to show comments to that entry; this is an easy way for people to subscribe to see when new comments are added. Phil Ringnalda has a template…

 

Sorry, the comment form is closed at this time.