With a little side of applesauce...

Thursday, February 1, 2007

PEAR XML_RSS and content:encoded

I am currently working on a project with the PEAR package XML_RSS. This project has need of the ‘content:encoded’ element, but the current STABLE version of XML_RSS (v 1.14) doesn’t grab ‘content:encoded’. To fix this, open /usr/share/php/XML/RSS.php (on Debian) in your favourite editor and change:


/**
* @var array
*/
var $itemTags = array('TITLE', 'LINK', 'DESCRIPTION', 'PUBDATE');

/**
* @var array
*/
var $imageTags = array('TITLE', 'URL', 'LINK');

To:

/**
* @var array
*/
var $itemTags = array('TITLE', 'LINK', 'DESCRIPTION', 'CONTENT:ENCODED', 'PUBDATE');

/**
* @var array
*/
var $imageTags = array('TITLE', 'URL', 'LINK');

The newest version in CVS ( http://cvs.php.net/viewcvs.cgi/pear/XML_RSS/ ) (v 1.26) does contain this element, so I have contacted the maintainer about when the next release will be.

No comments: