Give Your Joomla 1.5 RSS Some HTML Lovin’
The quick guide to buffing up your Joomla 1.5 RSS feeds.
First of all, do the things it says to do in these 10 Simple Steps to Joomla RSS.
Namely, install RD-RSS, add feeds, set up Feedburner.
To turn on HTML, you’re going to need to edit the RD-RSS source code. The file you’re interested in is [JOOMLA_ROOT]/components/com_rd_rss/rd_rss.php. Find it via FTP or in a terminal session.
You’ll probably want to make a copy of the original unedited file at this point just in case something dreadful happens and you need to restore it. Don’t say I didn’t warn you: screwing around with the Joomla source can quite easily cause catastrophic site failure.
Having said that, this operation is pretty basic. All you need to do is pop that bad boy open in a text editor, and comment out these lines (221-222):
$item_description = mosHTML::cleanText( $item_description );
$item_description = html_entity_decode( $item_description );
They should then look like this:
// $item_description = mosHTML::cleanText( $item_description );
// $item_description = html_entity_decode( $item_description );
Then just save the file and re-upload it (if you’re using FTP.) It might take a little while to see the effects because RD-RSS has caching enabled by default, but eventually your feeds should show up in all their HTML glory.
Note that if you want to see your images, you will have to make them into absolute links, or create a further hack to make sure that relative paths get translated into absolute ones. I suggest something along the lines of this, pasted just underneath the lines you just commented out:
$item_description = preg_replace( ‘#(href|src)=”([^:”]*)(“|(?:(?:%20|\s|\+)[^”]*”))#’, ‘$1=”http://www.YOURSITE.com/$2$3’, $item_description );
Leave a comment