How to make my RSS feed display on my web page?
April 11, 2006 12:08 PM   Subscribe

I want to create a page that archives my podcasts with titles, descriptions, and (most important) links to the mp3 enclosures for downloading.

This page will be a template with the dynamic code embedded so that when I update the RSS file, the next time the HTML page is loaded it will include all the items. Or, in other words, a page that supplies the same information and options as a Yahoo Podcasts page -- but on my domain.
posted by La Cieca to Computers & Internet (9 answers total)
 
What language? You could fairly easily transform the RSS feed into XHTML via an XSL stylesheet, assuming you had a server-side language that could handle it. You could do it via JavaScript if not, but that would be client-dependent (i.e., only browsers that support JS would see it and not, for example, Google).
posted by yerfatma at 1:07 PM on April 11, 2006


"Fairly easily" being a relative thing, I know.
posted by yerfatma at 1:07 PM on April 11, 2006


Response by poster: I think "fairly easily" is not easy enough for me. I've found PHP scripts that "convert" RSS to HTML but none of them seem to support enclosures. (The whole point of the page is so that users can download the mp3s.) Ideally I am looking for something I can plug the feed information in, and either JS or an include pops out the other end to be pasted into my hard HTML.
posted by La Cieca at 1:29 PM on April 11, 2006


I've found PHP scripts that "convert" RSS to HTML but none of them seem to support enclosures.

Show us one and we'll tweak it for you.
posted by AmbroseChapel at 4:21 PM on April 11, 2006


There are a couple examples of XSLT files that will transform RSS feeds into HTML here and here. Assuming your PHP install supports XSL transformations, you could use one of these code snippets to do that. Not the simplest solution, but I'm stuck for something simpler.
posted by yerfatma at 4:26 PM on April 11, 2006


Response by poster: I was looking at this script from feedforall.com. Basically this will be a one-time setup since all my podcasts stay in the RSS file.
posted by La Cieca at 7:55 PM on April 11, 2006


Best answer: That script appears to handle enclosures just fine, however their sample template doesn't include them.

Just add another line to the template which includes this:
~~~ItemEnclosureUrl~~~
and it should work.

If it does, you're going to want
<a href="~~~ItemEnclosureUrl~~~">podcast</a>
for the finished version of course.
posted by AmbroseChapel at 9:17 PM on April 11, 2006


This might do you?

RSS to Javascript
posted by nthdegx at 8:36 AM on April 12, 2006


Response by poster: The tweak (and a few tweaklets) to the feedforall script worked. Thanks, AmbroseChapel.
posted by La Cieca at 10:07 AM on April 12, 2006


« Older Looking for parody of popular Chinese Philosophy   |   Did Kafka experience something like this before... Newer »
This thread is closed to new comments.