revjim.net

how to add a comments feed

NOTE: This template has been updated.

I’ve added a Comments RSS Feed to revjim.net. Those of you who use RSS aggregators and wish to keep up with all of the latest revjim.net comments can subscribe to it.

I HIGHLY recommend installing similar functionality on your own MovableType installations. It isn’t that important if your site has the ability to subscribe to email notifications of each post. However, if it doesn’t, keeping up with conversations (thanks to Movable Type’s horrible comment system) is very difficult. This should make it a little bit easier.

It’s actually quite simple to do. I stole Phil Ringnalda’s template and modified it so that it doesn’t require any plugins to use and still has the same functionality. Here are the steps.

  1. Log into your MovableType install.
  2. Select “Manage Blog” underneath the blog you wish to add a Comments Feed for.
  3. Choose “TEMPLATES” in the navigation bar onthe left.
  4. Click on “Create new Index Template” at the top right hand corner.
  5. Type “Comments Feed” in the “Template Name” box.
  6. Type “comments.rdf” in the “Output File” box.
  7. Paste this under “Template Body”:
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        xmlns:dc="http://purl.org/dc/elements/1.1/"
        xmlns:admin="http://webns.net/mvcb/"
        xmlns="http://purl.org/rss/1.0/">
        <channel rdf:about="<$MTBlogURL$>">
            <title><$MTBlogName encode_xml="1"$> - recent comments</title>
            <link><$MTBlogURL$></link>
            <description><$MTBlogDescription encode_xml="1"$></description>
            <dc:language>en-us</dc:language>
            <dc:date><$MTDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></dc:date>
            <admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=<$MTVersion$>" />
            <items>
                <rdf:Seq>
                    <MTComments lastn="15">
                        <rdf:li rdf:resource="<$MTCommentEntryLink$>#<$MTCommentID pad="1"$>" />
                    </MTComments>
                </rdf:Seq>
            </items>
        </channel>
        <MTComments lastn="15">
            <MTCommentEntry>
                <item rdf:about="<$MTEntryLink$>#<$MTCommentID pad="1"$>">
                    <title><$MTCommentAuthor$> comments on &quot;<$MTEntryTitle$>&quot;</title>
                    <description><$MTCommentBody encode_xml="1"$></description>
                    <link><$MTEntryLink$>#<$MTCommentID pad="1"$></link>
                    <dc:contributor><$MTCommentAuthor$></dc:contributor>
                    <dc:date><$MTCommentDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></dc:date>
                </item>
            </MTCommentEntry>
        </MTComments>
    </rdf:RDF>
  8. Click “SAVE”.
  9. Click “REBUILD”.
  10. Wait for the window to pop-up.
  11. Click “REBUILD” on that new window.
  12. Announce in your blog that you now have a comments feed.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>