Tuesday, April 20, 2004

I've recently added a small cosmos link to each footer section of this weblog's posts. It seems to be the latest fashion trend, at least among Movable Type publishers who are ready to customize their publishing templates. What about Radio Userland? Well, it doesn't seem to be possible to do it with the current (8.0.8) Radio version, unless you are ready and able to modify a small piece your Radio source code.

The trick is to modify the item template (#itemTemplate.txt file) to include an HTML link tag making a call to the Technorati Cosmos service. The Cosmos Service http GET request expects a 'url' argument specifying the permalink of the post:

where permalink is the URI of the published item, suitably encoded to fit into the arguments component of a GET request.

This is where Radio cannot currently deliver: the <%permalink%> macro referenced for use in the item template does not provide a straight or encoded URL, but an image HTML tag encapsulating the URL instead.

However, if you're confident enough to modify Radio's source scripts, there's nothing preventing you from adding a new <%encodedPermalinkUrl%> macro. Template level macros are defined in the system.verbs.builtins.radio.weblog.render script.

To add a new 'encodedPermalinkUrl' pseudo-macro, locate the //set permalink bundle in the code, and add a single line at the end of that bundle's content:

t.encodedPermalinkUrl = string.urlEncode ( url )
Compile and save the modified script. Keep in mind of course that your modification will be wiped out the next time Userland publishes an update to the radio.weblog.render script.

The full HTML tag to add to the item template then looks like this:

<a href="http://www.technorati.com/cosmos/search.html?url=<%encodedPermalinkUrl%>" title="technorati cosmos link" target="_blank">cosmos</a>
Since this a very simple modification, let's hope the <%encodedPermalinkUrl%> macro will become part of the next Radio release.

Update: If you don't feel confident enough to update your Radio source code, Matt Mower has released a Technorati Radio macro that you may download from Lilia Efimova's Mathemagenic site.

Permalink 9:27:50 AM - cosmos

In Brief view RSS
 Howell Raines: The Times's image as a bastion of quality had become even more important as tabloid television, Britain's declining newspaper values, and the unsourced ranting of Internet bloggers polluted the journalistic mainstream of the United States.
 Dave Winer: There are a lot of folk legends about the evolution of RSS - Here's the scoop, the sequence of events in the life of RSS, as told by the designer of most of the formats.
 Mikel Maron: Web Services, RIA, Semantic Web, the Blogosphere, are coming together to enable an Internet OS, built on amateur application programming in recombinant growth.
 Jon Udell: In theory a CSS attribute could say: "Don't index this element" - Parsing it would likely be more work than search engines are currently willing or able to do.
 John Robb: P2P tools should be as invisible as plumbing.
 Rogers Cadenhead: Creating text date links in Radio.

activeRenderer News view RSS
 Elections Demo Page Updated
 activeRenderer For Movable Type Progress
 Gallery: Gwénaël Le Dréan
 activeRenderer version 2.2 released at last
 Release delayed
 Gallery: Gerald Gleason

April 2004
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
Mar   May

© copyright 2002-2004
Precision IT Mgmt, Inc
check out Mozilla Firebird
Click to see the XML version of this web page. rss 2.0
feedback: Click here to send feedback.
last updated
4/23/04; 3:35:56 PM