Display RSS feed in Joomla!

Better not reinvent the wheel

Last week, my boss asked me to add a module to show his latest WordPress blog post on our Joomla! site. Then I began to dig google and the Joomla! Extensions Directory for such kind of module. I’ve tried many keywords like “blog update”,”wordpress joomla”, but all with no luck.

Afterwards, I came up with a possible solution: Now that WordPress can generate the lastest post list in a RSS feeds, if there is a module to display RSS feeds like a feeds reader, then my task can be easily resolved. Then, I began my search again for such a module, however, hours of time passed, still with no luck(This may due to my poor search skill ^_^). Then I decide to wirte something myself.

I don’t want to be bothered with the detail of Joomla module, so I installed the Sourcerer plugin, so that I can concentrate on my logic of displaying RSS feeds. As a lazy boy, I don’t even like to write a little more code, and have the Magpie RSS Parser bear the burdern of parsing RSS feeds. Finally, I created a custom html module in Joomla!, got the desired result by inputting the following code:

{source}
items){
        return;
    }
    $items = array_slice($rss->items, 0, $num_items);
    echo "
    \n"; foreach($items as $item){ $title = $item['title']; $href = $item['link']; $pubdate = date("Y-m-d", $item['date_timestamp']); echo "
  • $title $pubdate
  • \n"; } echo "
\n"; ?> {/source}

This days, I’v been thinking of rewirting this to a simple Joomla module, may it could be named “RSS Show”. However, today, just before my try to get this done,I gave up.You may never know how happy I am! I google for “Joomla show rss feed”, it give me How do you display an RSS feed? as the 1st result . Following this link, I finally relize that there’s already a “Feed Display” moudle can do all what I want! So, I don’t need to reinvent the whell any more!

This entry was posted in Programming, WEB Application and tagged , . Bookmark the permalink.

Leave a Reply