YouTube thumbnails
Posted: Mon Oct 15, 2007 3:59 pm
Is there any way of displaying the thumbnails from a YouTube-RSS-feed in the sidebar?
Thanks in advance,
Thanks in advance,
See for example http://www.youtube.com/rss/user/youtube/videos.rssgarvinhicking wrote:How does a youtube RSS feed look like? I'm sure it can be done.
Code: Select all
<item>
<author>rss@youtube.com (YouTube)</author>
<title>Bill Clinton talks about the YouTube Nonprofit Program</title>
<link>http://youtube.com/?v=fvfumQ0_0_Q</link>
<description>
<![CDATA[
<img src="http://img.youtube.com/vi/fvfumQ0_0_Q/default.jpg" align="right" border="0" width="120" height="90" vspace="4" hspace="4" />
<p>
With Chad, Steve and Larry, President Clinton talks about the YouTube Nonprofit Program.
http://youtube.com/nonprofits
Thanks to YouTuber theresident for shooting this footage!
http://youtube.com/theresident
</p>
<p>
Author: <a href="http://youtube.com/profile?user=YouTube">YouTube</a><br/>
Keywords: <a href="/results?search_query=youtube">youtube</a> <a href="/results?search_query=nonprofit">nonprofit</a> <a href="/results?search_query=program">program</a><br/>
Added: September 28, 2007<br/>
</p>
]]>
</description>
<guid isPermaLink="true">http://youtube.com/?v=fvfumQ0_0_Q</guid>
<pubDate>Fri, 28 Sep 2007 16:08:36 -0700</pubDate>
<media:player url="http://youtube.com/?v=fvfumQ0_0_Q" />
<media:thumbnail url="http://img.youtube.com/vi/fvfumQ0_0_Q/default.jpg" width="120" height="90" />
<media:title>Bill Clinton talks about the YouTube Nonprofit Program</media:title>
<media:category label="Tags">youtube nonprofit program</media:category>
<media:credit>YouTube</media:credit>
<enclosure url="http://youtube.com/v/fvfumQ0_0_Q.swf" duration="179" type="application/x-shockwave-flash"/>
</item>
Code: Select all
foreach($rss_elements AS $rss_element) {
$rss_element = trim($rss_element);
if ($escape_rss) {
$content .= $this->decode($item[$rss_element]);
} else {
$content .= htmlspecialchars($this->decode($item[$rss_element]));
}
}
Code: Select all
<media:thumbnail><![CDATA[<img src="/blabla.jpg" />]]></media:thumbnail>
Sadly not,because of the same reasons: You would need conditional logic to insert text. You would either need to edit the PHP plugin file for that (and add the extra 'img' parameter) or use an external RSS-modification service.Any way to change this and use the unmodified version?