Share » Learn » eZ Publish » How to Import and Export RSS Feeds

How to Import and Export RSS Feeds

Wednesday 20 August 2008 12:14:00 pm

  • Currently 5 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

The explanations in this article focus on importing only one feed to eZ Publish; it is of course possible to import multiple feeds.

Items from different RSS feeds can be imported to either the same or different locations in the eZ Publish content structure. For example, consider sourcing multiple tennis news feeds from, say, the BBC as well as American and Australian news sources. You could aggregate all items in one eZ Publish location, so that they are all displayed in the same combined list on your site. Or, you can create multiple folders and import the different feeds to different locations, displaying them separately. (Technically, you could also use eZ Publish template logic to display items together from different locations.

It is also important to note that eZ Publish is not currently able to handle different RSS import tasks at different times. For example, suppose you want to import the following RSS feeds:

  1. BBC Tennis News (which updates, say, every 3 hours)
  2. ABC Australia Tennis News (which updates, say, every hour)
  3. CNN Tennis News (which updates, say, every 6 hours)

Although you can run different eZ Publish cronjob scripts at different times, there is currently no way to run separate RSS import tasks for each of these RSS feeds. eZ Publish will attempt to import every RSS feed every time its runcronjobs.php script is called by a cronjob on your web server. Therefore, in the example above, you would need to pick a cronjob frequency that runs at least some of the RSS imports more or less frequently than they are refreshed. Functionally this does not matter (any items already imported will be ignored), but it will mean some extra unnecessary work for your server for each additional feed you import.

Over time, unless you manually delete them, the imported RSS items could potentially number in the thousands. Having a large number of RSS objects may eventually become a burden on your server. There are posts on the eZ Publish forums that discuss ways to archive older RSS items, such as one titled Best way to remove old RSS files.

Printable

Printer Friendly version of the full article on one page with plain styles

Author(s)