« Testing thread safety revisited | Main | Testing thread safety - updated »

Adding a comment feed

Listen to this articleListen to this article

I found an article detailing how to add a comment feed to a Movable Type blog. I made a few changes (as one does) and now you can subscribe to the comments on this blog as well as the main feed. So for anyone who's interested, here's the template:

<?xml version="1.0" encoding="<$MTPublishCharset$>"?>
<rss version="2.0" 
  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:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

    <channel>
        <title><$MTBlogName remove_html="1" encode_xml="1"$> - Comments
        <link><$MTBlogURL$></link>
        <description>Latest comments on <$MTBlogDescription remove_html="1" encode_xml="1"$></description>
        <dc:language>en-us
        <dc:lastBuildDate><$MTDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></dc:lastBuildDate>
        <admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=<$MTVersion$>" />
        <sy:updatePeriod>hourly
        <sy:updateFrequency>1
        <sy:updateBase>2000-01-01T12:00+00:00
        <MTComments lastn="20">
            <item>
                <title>Comment on &quot;<MTCommentEntry><$MTEntryTitle remove_html="1" encode_xml="1"$></MTCommentEntry>&quot;</title>
                <link><MTCommentEntry><$MTEntryLink$></MTCommentEntry>#comments
                <description><$MTCommentBody remove_html="1" encode_xml="1"$>
                    &lt;p&gt;- <$MTCommentAuthor remove_html="1" encode_xml="1"$>&lt;/p&gt;
                </description>
                <guid isPermaLink="false">comment<$MTCommentID pad="1"$>@<$MTBlogURL$></guid>
                <dc:pubDate><$MTCommentDate format="%Y-%m-%dT%H:%M:%S"$> <$MTBlogTimezone no_colon="1"$></dc:pubDate>
            </item>
        </MTComments>
    </channel>
</rss>

Comments

Innouncement!!!

Post a comment