I need to display an RSS feed on my site. I could use the built in RSS_Parser add-on, however that add-on does not appear to support adding an item enclosure (image). This is a requirement for this project.
I have elected to write my own. I have loaded the SimplePie library and I have it essentially working, just like the native Add-On, but the enclosure is not working.
I'm trying to put all the attributes into an array, like so:
$items = array( 'item_title' => $item->get_title(), 'item_link' => $item->get_permalink(), 'item_date' => $item->get_date('U'), 'item_content' => $item->get_content(), 'item_img' => $item->get_enclosure(), 'item_description' => $item->get_description(), 'item_categories' => $categories, 'item_authors' => $authors ); } return $items;
However, when using the item_img tag in the template, it returns a string of gibberish. Anyone know how to get it to return the url to the enclosure?
The feed i'm trying to parse is here: http://tntoday.utk.edu/feed/
I have done this with straight-up PHP, but having it as an add-on, easily accessible to content editors throughout the site would be greatly preferred.