The Shifted Librarian - Shifting Libraries at the speed of byte

How to Display Which RSS Feeds You're Subscribed to

Written for Radio 8 using the Transmitter template, although you should be able to adapt it to other templates as well. You should also be able to add almost any Javascript code using this same process. Send me your comments and suggestions for improving it!

Note: these instructions are courtesy of Jon Udell! Don't forget to drop him a note of thanks. You can read more about why he did this here.

1.  The code to display which RSS feeds you're subscribed to runs as a Web Service, so you need to be running Radio 8.05 or higher. When I first tried the following instructions, they didn't work for me because I was still on Radio 8.0, so this is first-hand advice to update before you go any further. To do this, check the Radio download page for the most current instructions. Once you've updated, or if you're already current, proceed to the next step.

2.  Copy the following text and paste it into a text file. Save it as subs.txt in your Web Services directory in the Radio Userland folder. Make sure you change the URL in the code below to your Web address!

on subs()


local (t);

new (tableType, @t);

for adr in (


local(title = adr^.compilation.channeltitle);

local(channelUrl = adr^.compilation.channellink);

local(rssUrl = nameOf(adr^));

local (l);

new (listType, @l);

l[0] = channelUrl;

l[0] = rssUrl;

t[title] = l;





local(s = "<p class='realsmall'>currently subscribed to:</p>"); for adr in (@t)


local(title = string.replace(nameOf(adr^),"'","'"));

local(l = adr^);

local(channelUrl = l[1]);

local(rssUrl = l[2]);

s = s + "<p class='realsmall'><a href='" + string.urlEncode(rssUrl) + "'><img border='0' src='' alt='Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel.'></a> <a href='" + channelUrl + "'>" + title + "</a> (<a href='" + rssUrl + "'>rss</a>)</p>";


s = s + "<p class='realsmall'>Here's <a href=''>how this works</a>.</p>";

return (s);


Make sure you save subs.txt in the "Web Services" directory.

screenshot of the web services directory

3.  Choose one of the following commands to put in your template. Decide where you want it to go, copy it, and paste it into your Home Page Template in the Radio Prefs. They're all roughly equivalent, so you can just close your eyes and point your finger to one to choose.

<%params = {}; xml.rpc ("", 5335, "radio.subs", @params)%>

or, equivalently,

<% ["xmlrpc://"].radio.subs () %>

or, in fact:

<% ["soap://"].radio.subs () %>

Here's where I put mine, underneath my categories in the right-hand column.

screenshot of the macro in the home page template

You can also put this bit of code underneath your calendar in the right-hand column. To do this, look for the calendar macro in your template (<%radio.weblog.drawcalendar ()%>) and paste this code beneath it.

4.  If you want to change the headline text to something other than "currently subscribed to", change the following line in the code.

local(s = "<p class='realsmall'>currently subscribed to:</p>");

5.  By default, the script displays the small coffee cup image next to each feed. Any Radio user can click on that coffee cup to subscribe to that particular feed. In order for the graphic to display on your site though, you need to save the following image into your www/images directory in the Radio Userland folder.

To do this, right-click on the image below and save it to that directory.

image of coffee cup

Note, though, that characters like apostrophes, ampersands, and semicolons will be interpreted as part of the script and will throw back an error! Again, first-hand advice here.

6.  Pat yourself on the back because you've just accomplished your first DIY Web Service. Congratulations!