Extend RSS Feed block to display item image

Extend RSS Feed block to display item image

by Matthew Terentjevs -
Number of replies: 1

Hi all,

I am just wondering if anyone looked at extending RSS Block. It pulls item title, link, description, publish date. However quite a few modern rss feeds have <media:thumbnail url="#"> tag... 

It would be cool to pull item's thumbnail image and display RSS feed results as cards. 

I am trying to work out rss_client block and the way it works... but after spending quite a bit of time, struggling to figure out sequence of functions and modify the block to pull media thumbnail from RSS feed into mustache template for the item!

Would appreciate anyone's advice if anyone had similar experience? 

Average of ratings: -
In reply to Matthew Terentjevs

Re: Extend RSS Feed block to display item image

by Matthew Terentjevs -
Had a bit of a progress. 
Worked out the block is using SimplePie library, so in public function get_feed in the block_rss_client.php , I have added -  $simplepieitem->get_enclosure(), this pulls RSS enclosure that contains media thumbnail to the $feed variable. 

Now need to work out, how to parse this further to the template file.  
Average of ratings: Useful (1)