Some updates for folks that have implemented their own versions of this:
A few early versions had a typo where the MAGPIE_CACHE_DIR was defined (it said MAGPIE_DIR). Most problems with cache files not being created are permissions related- the web server must be able to write to the directory where you want cache files stored. If it cannot find this directory, it tries to create a new one named “cache” within the same directory the magpie include libraries reside. The easiest thing to do is to create a directory inside here named “cache” and make sure its privileges are set to the web server can create new files inside of it.
Also, it was pointed out that WordPress puts “‘|” before quote characters in its published feeds (“escaping quotes”) so a slight tweak in the strip_returns function is able to cleanse these. Just change:
$subquotes = ereg_replace("'", "'", $text);
$subquotes = ereg_replace("'", "'", stripslashes($text));
Finally, I am not sure where the root of this problem lies, but it looks like the RSS 2.0 feeds oublished by WordPress are not being picked up by the Magpie parese, so our script in turn cannot display these. It looks like to me (not an expert) that WordPress is not publishing a correctly formatted time stamp (it lacks a time zone), e.g.:
<pubDate>Wed, 02 Jun 2004 01:34:27 +0000</pubDate>
<pubDate>Sat, 07 Sep 2002 00:00:01 GMT</pubDate>
I do not know if this is an issue that the Magpie code can circumvent (a request has been made) or it is something that WordPress needs to change, or that WordPress authors need to change in their templates. But until then, our code is unable to generate published dates for WordPress RSS feeds.
Update: June 3, 2004 Until I can figure this out, I have modified the latest versions of feed2js.php so that it sniffs the item arrays for either a date in the formation of $item[‘dc’][‘date’] or $item[‘pubdate’]– I guess I assumed wrongly that Magpie would find the date and always stuff it into the first variable. Each date format requires a different method to convert to a presentable date.