eZ 4.2 FeedReader
Capturing twitter streams to a sidebar in eZ just got simple.
My concept put together January 30th of 2009. It was some work. http://webportalmaster.com/index.php/eng/eZ/HowTo/Twitter-to-RSS
Now, eZ Publish developers have simplified the process with a "Feed Reader" for page layouts.
Just add the new block, specify the complete url of the feed, it is done. The feed starts off current as of current date and time.
Troubleshooting
In my first test, the php setting "register_globals gpc" was set to "on" at installation time. I could not make the Feed Reader block work. For a second test, I made certain register_globals was off before starting the eZ Publish 4.2 install. Then the block works as advertised, straight OOTB.
Automating the Feed Reader Update Cycle
Updating the feed is where a little knowledge goes a long way. There is a Paul Wilson article describing eZ rss feeds in painstaking detail at
Short list of what worked for me, kind of. Three files:
- ezpublish.cron
- settings/cronjob.ini
- settings/override/cronjob.ini.append.php
In ezpublish.cron, the first two settings, the path to htdoc root, and the path to the php executable, must be set for the specific installation. Also note, that the timing of "frequent" jobs is defined near the bottom of this file.
In the cronjob.ini file, add Scripts[]=rssimport.php into the [CronjobPart-frequent] array. Updates then occur on the "frequent" schedule described in the ezpublish.cron file, every fifteen minutes in the shipping version of eZ 4.2.
Then create or edit cronjob.ini.append.php to point the CronjobPart-rssimport to the rssimport.php file. Rssimport.php is created when eZ Publish is installed.
<?php /* #?ini charset="utf-8"?
[CronjobPart-rssimport]Scripts[]=rssimport.php
*/ ?>
Kind of
The "kind of" is because without clearing the content cache, the updates never show up to visitors of the web page.
Immediately after clearing the content cache, the feeds display almost up to the minute, definitely no older than 15 minutes.
If memory serves, tweaking ttl settings for templates is how to set the frequency of content refresh. Setting ttl too low for frequent refreshes can throw a burden on the web server.
