Closed (fixed)
Project:
FeedAPI
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2008 at 18:25 UTC
Updated:
13 Mar 2008 at 20:12 UTC
Simplepie offers a good reliable Enclosure Object. Presently getting at the enclosures in ->raw isn't completely reliable, or clean. The parser_ already presents the author object. So I've coded a few lines to present appropriate object(s) in the ->options
To ease selection of the appropriate types of content I've placed these in an array keyed on mime type and subtype.
More detailed notes I made while working are here: http://wiki.transmission.cc/index.php?title=Drupal_FeedAPI_and_FeedAPI_m...
| Comment | File | Size | Author |
|---|---|---|---|
| feedapi.20080204.patch | 1.22 KB | ekes |
Comments
Comment #1
alex_b commentedGreat, thank you for posting this here. Two questions:
1) Does SimplePie expose RSS / Atom enclosures equally through get_enclosures(); ? I take it it does. ( http://en.wikipedia.org/wiki/RSS_enclosure#Similar_technologies )
2) How does Parser Common Syndication handle this? Can we (at least theoretically - no need to actually make this happen in order to make this patch go in) expose enclosure information on ->options->enclosures with parser_common_syndication the same way as this patch would do it with parser_simplepie?
Comment #2
ekes commented1) In short yes.
The note in the documentation http://simplepie.org/wiki/reference/simplepie_enclosure/start and code http://svn.simplepie.org/simplepie/trunk/simplepie.inc (line 3729), only refers only to RSS enclosures, Media RSS and iTunes RSS. But it does do the ATOM link type enclosure (http://atompub.org/rfc4287.html#element.link) as well in http://svn.simplepie.org/simplepie/trunk/simplepie.inc (lines 5404 - 5472) although it only seems to use the href, type and length attributes (like the simple RSS enclosure).
2) I believe at the moment parser_common_syndication ignores enclosures. I seen no reason not put content into a similar enclosure object. While there are quite a few variables in the object (http://php5.simplepie.org/phpDoc/SimplePie/SimplePie_Enclosure.html) the only ones for the standard RSS enclosure and ATOM link enclosure need are the href, type, length - which should not be so hard - the Media and iTunes RSS are significantly more complicated.
Comment #3
alex_b commentedCommitted,
Thank you, ekes.
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/feedapi/par...
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.