SimplePie

alayham's picture

Displaying RSS feeds on the fly in alayham.net

I wanted to display RSS feeds on this site, and wanted to be able to display just the links, without storing the feed in my DB or being able to show the the description or the content. I checked the available RSS modules for drupal, but did not find any module that can do what I need. After all, I found that my experience with Drupal feed readers is worth sharing as my first article in my site.

The core aggregator module displays automatic blocks with links, but it stores items in a flat table making them searchable, I could live with that, but after some testing, I discovered it fails with a mysterious "http request status fails" error on some feeds. Drupal team acknowledged the issue, and there is a module that tried to reset the flag. I tried it, and it did not work, possibly because Drupal really could not consume blogger feeds on my server. So the core aggregator module is not what I need.

The other aggregator modules, including FeedApi, will not only store the items in my DB, they will create them as nodes, and this is what I really hate. I can not imagine why I have to store partial content and links from other sites as content items in my site.

After hours of testing all the modules, I concluded that if I really want what I want, I have to do some coding. Two years ago, that would be fine. but today, the problem is that I have not written any php line since 2006. I don't have the Dev platform at my work laptop.

While experimenting with SimplePie I watched a small tutorial video, and I liked it. SimplePie can download and parse the feed on the fly, and it can expose the feed items as an array so that I can display the number of links i want in a simple loop, SimplePie can also cache the downloaded feeds, and it can merge multiple feeds and sort them by time. this is AWESOME.

Syndicate content