WhatfettleBloglines Blogroll

I’ve included a bloglines subscription list as a blogroll in my MovableType managed site.

Bloglines generates a HTML page for any channels you’ve declared public just for this purpose:
http://www.bloglines.com/help/share

My bloglines userid is ‘psd’, so here’s my subscription list is available as HTML here:
http://rpc.bloglines.com/blogroll?html=1&id=psd

You can include this using a client-side Javascript fetch, or you could use a server-side technology such as shtml or PHP but i wanted to statically embed the blogroll inoto the HTML when rebuilding the site. I was sure there must be an existing MT tag to get and include a page from a URL into a template. Unfortunately i couldn’t find one so i wrote a simple plugin: fetch.pl and saved it as a plain text file called ‘fetch.pl’ in the MT plugin folder.

The plugin provides a new ‘fetchref’ attribute so in the index template:

    <$MTFetch$ fetchref='http://rpc.bloglines.com/blogroll?html=1&id=psd'>

The attribute can be used to fetch and include any page and if the variable name (here a dummy ‘MTFetch’) actually contains a value it will include that page instead, e.g.:

    <$MTBlogURL$ fetchref=''>

All that remains is to add a style for ‘blogrollmain’ to your site stylesheet, e.g.

    .blogrollmain {
        font-family:verdana, arial, sans-serif;
        color:#333;
        font-size:x-small;
        font-weight:normal;
        background:#999;
        line-height:140%;
        padding:2px;				
    }	

You can also add a different one for ‘blogrollfolder’ style as well to change the folder titles.