
By wellsy on
Does anyone know how to add stuff like a custom image/images, custom text, etc to the rss feeds which come from various areas of a drupal site?
I'll give a specific example of what I am hoping to be able to achieve.
See the feed from another website on my aggregator page
http://www.orchidsonline.com.au/interactive/aggregator/sources/3
See the feed which drupal produces on my test site
http://www.orchidauction.biz/interactive/aggregator/sources/5
So in the first example you will see that the feed has some explanatory text and also an image.
Drupal feed has the text but no image.
How do I train drupal to add the image and if possible add some formatting to the text?
Thanks in advance!
Comments
Nice clear example
The www.bellaonline.com example is using the good old rss/channel/image tag, which has been part of the spec since RSS began in Netscapes back yard (it used to be limited to 80x40 pixels or something, but that was a while ago)
A glance at format_rss_channel() in common.inc shows that although this is not actively done, it's POSSIBLE to insert this image, but the default node_feed() simply does not do so.
Hence, I can't see a way forward without coding. It'd be a nice optional config I could whack in quickly, but a core patch.
As for formatting in feeds, that way lies madness. Atom & Rss2.0 have got it most organised, but different readers may still disagree about how they want their embedded HTML cooked.
As you've probably seen, the feed description is your site mission. If you want to put HTML into that, give it a go and see what happens. format_rss_channel() will check_plain() on it (escape the HTML) but that's what most aggregators expect anyway. Some, OTOH, will render it as inline source and be quite ugly.
If allowing other sites to publish content on my page, I'd have to be pretty paranoid about the markup I let them sneak in - which is a good reason why free markup in feeds is badly supported.
So basically, it's a bad idea.
.dan
http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
thanks for looking
and your thoughts
the image is the more desirable of the two on the wishlist
I see the dangers with allowing markup...I did not think of that.
actually the feed description is the term description I have found....I tried for quite a while to work that out and found a reference in a new or modified handbook page which just appeared on the forums today or yesterday. Can't find it just now.
So is this something you may consider coding?
wellsy
orchidsonline.com.au