« Raiders of the Lost Trophy | Home | The DaVinci Code »

Individual Entry With Comments

May 20, 2006

Mixing Entries and Comments in a Feed

Filed under Blogging

If you don't know what a feed is, you should read this first.

One of the things that annoys me about blogs is how comments are handled. If I make a comment on a blog, how do I know if someone responds to it? Do I need to keep checking the blog entry to see if there is a response?

I've come up with a solution for people that subscribe to my blog feed. Now comments are posted to the feed just like entries are. Moveable Type (the software I use to do my blog) lets you do a list of entries or a list of comments, but not a single list of both. I looked through the Moveable Type forum for a solution and I found a plug-in called MTCollate that does exactly what I want. MTCollate lets you combine multiple lists into one list and then sort by any property of the list. So I combined a list of the last 15 comments with a list of the last 15 entries and output the most recent 15 comments/entries. Here is my atom template (right click and "Save Target As..." to view) for Movable Type. Clicking directly on this link won't work because the browser will try to interpret the XML tags instead of just showing you the text.

I used this site to make sure my changes to the feed were valid. It found several problems and gave enough documentation to help fix them all. Now my feed is validated. One problem that required a bit of investigating was how do give every entry/comment a unique id. This page has a good explanation on unique feed id's. The description of the atom feed format is here.

For people that don't subscribe to the blog feed, or want to know immediately when a comment has been added, I want to add a "email me when a new comment is posted to this entry" option to my blog. I haven't looked into how to do that yet. If you know how to do it, post a comment.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


This page contains a single entry from the blog posted on May 20, 2006 2:08 PM.

The previous post in this blog was Raiders of the Lost Trophy.

The next post in this blog is The DaVinci Code.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.34