JoomlaRSSFilter - Joomla and nonstandard RSS elements
November 9, 2007 11:33 AM Subscribe
How to get 'nonstandard' RSS elements working in Joomla's unfamiliar, locked-down world of modules ...
I'm trying to get an RSS feed displaying specific elements on a Joomla-driven site, but the stock RSS modules (MagpieRSS module for Joomla, Simple RSS Feed Reader) don't seem to play well with custom RSS elements.
Given a feed like
<item>
<title>Hey, look, I'm a title</title>
<link>http://server.com</link>
<cn:time>11/09/2007 12:10 am</cn:time>
<cn:thing1>Value 1</cn:thing1>
<cn:thing2>Value 2</cn:thing2>
<cn:thing3>Value 3</cn:thing3>
</item>
.. is there a module out there that'll give me access to elements cn:thing1-3 ? And perhaps do a little HTML work on them for linking, etc? Or am I stuck having to write my own module for this?
I'm trying to get an RSS feed displaying specific elements on a Joomla-driven site, but the stock RSS modules (MagpieRSS module for Joomla, Simple RSS Feed Reader) don't seem to play well with custom RSS elements.
Given a feed like
<item>
<title>Hey, look, I'm a title</title>
<link>http://server.com</link>
<cn:time>11/09/2007 12:10 am</cn:time>
<cn:thing1>Value 1</cn:thing1>
<cn:thing2>Value 2</cn:thing2>
<cn:thing3>Value 3</cn:thing3>
</item>
.. is there a module out there that'll give me access to elements cn:thing1-3 ? And perhaps do a little HTML work on them for linking, etc? Or am I stuck having to write my own module for this?
er, to be specific:
you call "proxy_script.php" which opens a cURL or other connection and grabs the XML feed, parses it, then writes a RSS file to the display.
You may need to use mod_rewrite or other means to get your feed to end in "xml" rather than php, I know some parsers can be picky about this. the other option is to have a cron job that calls a script which writes a static XML file -- actually, if you're trying to display headlines or something, this might be your best bet, because forcing the user to wait for you to make a call to a remote host for the XML can mean crappy load times or no info at all.
Also, if you're using Magpie, mind the feed caching -- more than once I've been confused about why a feed wasn't properly reflecting changes I'd made only to find that magpie had cached it.
posted by fishfucker at 1:30 PM on November 9, 2007
you call "proxy_script.php" which opens a cURL or other connection and grabs the XML feed, parses it, then writes a RSS file to the display.
You may need to use mod_rewrite or other means to get your feed to end in "xml" rather than php, I know some parsers can be picky about this. the other option is to have a cron job that calls a script which writes a static XML file -- actually, if you're trying to display headlines or something, this might be your best bet, because forcing the user to wait for you to make a call to a remote host for the XML can mean crappy load times or no info at all.
Also, if you're using Magpie, mind the feed caching -- more than once I've been confused about why a feed wasn't properly reflecting changes I'd made only to find that magpie had cached it.
posted by fishfucker at 1:30 PM on November 9, 2007
« Older What is the best way to publish a part catalog to... | Help us pick 10lbs of awesome to launch to 10,000... Newer »
This thread is closed to new comments.
oh, duh, you said as much in your post.
Ok, here's a quick hacky fix : set up a 'proxy' script whose only job is to parse that XML into a valid RSS feed, then point the Joomla RSS parser at your local script instead of that XML feed.
posted by fishfucker at 1:27 PM on November 9, 2007