«« RSS Feed Changes iTunes and Rendezvous »»
blog header image
RSS 1.0 Template for MoveableType Comments

I made an RSS 1.0 feed for my comments with MoveableType. Now I can read my comments in a feed reader too, along with the blog. Here's the MoveableType template:

<?xml version="1.0" encoding="<$MTPublishCharset$>"?>

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  xmlns:admin="http://webns.net/mvcb/"
  xmlns:cc="http://web.resource.org/cc/"
  xmlns="http://purl.org/rss/1.0/">

<channel rdf:about="<$MTBlogURL$>">
<title>Comments for <$MTBlogName encode_xml="1"$></title>
<link><$MTBlogURL$></link>
<description>Comments for <$MTBlogName encode_xml="1"$></description>
<dc:language>en-us</dc:language>
<dc:creator></dc:creator>
<dc:date><MTComments lastn="1"><$MTCommentDate format="%Y-%m-%dT%H:%M:%S" language="en"$><$MTBlogTimezone$></MTComments></dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=<$MTVersion$>" />
<MTBlogIfCCLicense>
<cc:license rdf:resource="<$MTBlogCCLicenseURL$>" />
</MTBlogIfCCLicense>

</channel>

<MTComments lastn="15" sort_order="descend">
<item rdf:about="<MTCommentEntry><$MTEntryPermalink encode_xml="1"$></MTCommentEntry>">
<title>Comment by <$MTCommentAuthor encode_xml="1"$></title>
<link><MTCommentEntry><$MTEntryPermalink encode_xml="1"$>#<$MTCommentID$></MTCommentEntry></link>
<description><$MTCommentBody encode_xml="1"$></description>
<dc:subject><MTCommentEntry><$MTEntryTitle encode_xml="1"$></MTCommentEntry></dc:subject>
<dc:creator><$MTCommentAuthor encode_xml="1"$></dc:creator>
<dc:date><$MTCommentDate format="%Y-%m-%dT%H:%M:%S" language="en"$><$MTBlogTimezone$></dc:date>
</item>
</MTComments>

</rdf:RDF>

Updated Tuesday 14:47 added a descending sort order.

Posted at November 14, 2003 at 07:41 PM EST
Last updated November 14, 2003 at 07:41 PM EST
Comments

I'd recommend changing the comment's link field to:

#

That way, each item has a unique URL associated with it, which helps with database-driven RSS readers like Bloglines.

Rod.

» Posted by: Rod at November 15, 2003 04:00 AM

Erm, that should have been:

<link><MTCommentEntry><$MTEntryPermalink encode_xml="1"$>#<$MTCommentID$></MTCommentEntry></link>

Rod.

» Posted by: Rod at November 15, 2003 04:01 AM

Good idea, I've changed my post ...

» Posted by: Ryan at November 15, 2003 12:55 PM
Google
 
Search scope: Web ryanlowe.ca