« Beware of Using URL Shorteners with FacebookThe Lemon Battery Enters the New Decade Thanks to Howcast and Cinelerra »

Getting Youtube Videos to Show in Google Reader

01/10/10

Permalink 01:23:02 am, Categories: web

I was always curious why I didn't see any referrals to my Lemon Battery video from Google Reader so I subscribed to my own RSS feed using Google Reader to see what was up. I always though that b2evolution, the blogging platform I use had the proper incantation in it's RSS feed because nixiepixel.com, a blog I subscribe to had embedded videos show up in it's RSS feed. Nixiepixel has since switched her blog to Wordpress so I found another b2evolution blog to check what was different with their feed which also included Youtube videos. That feed along with a posting on the Google reader blog led me to the solution. Google Reader requires the HTML embed tag to be used if you want videos to be displayed in an RSS feed. Once I knew the solution I made a small modification to _videoplug.plugin.php in the plugins directory of b2evolution where I changed:

PHP:

$content preg_replace'#\<div class="videoblock"><object data="http://www.youtube.com/v/(.+?)" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"><param name="movie" value="http://www.youtube.com/v/(.+?)"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/(.+?)" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="350"></embed></object></div>#''<div class="videoblock"><object data="http://www.youtube.com/v/\\1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"><param name="movie" value="http://www.youtube.com/v/\\1"></param><param name="wmode" value="transparent"></param></object></div>'$content );

to

PHP:

$content preg_replace'#\<div class="videoblock"><object data="http://www.youtube.com/v/(.+?)" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"><param name="movie" value="http://www.youtube.com/v/(.+?)"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/(.+?)" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="350"></embed></object></div>#''<div class="videoblock"><object data="http://www.youtube.com/v/\\1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"><param name="movie" value="http://www.youtube.com/v/\\1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\\1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="350"></embed></object></div>'$content );
I expect some of the purists will say that the embed tag is a relic and shouldn't be used but if you want your videos to show up in Google Reader that's what you have to do. Though this example is specific to b2evolution other blogging platforms may have similar issues. Sorry to all my Google Reader fans for taking so long to figure it out. Now all I have to do is get Google Reader to add support for Howcast.com videos.

PermalinkPermalinkLeave a comment »

No feedback yet

Leave a comment


Your email address will not be revealed on this site.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
Zack is a penguin. Is Zack a bird or a lizard?
antispam test

Search

September 2010
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      

My Flickr Photostream

www.flickr.com
This is a Flickr badge showing public photos from w_d. Make your own badge here.
Banner
Cool web tools, EEPC tips and Linux info. Browse around, I'm sure you will find something to interest you.

Feedburner subscribe

Enter your email address:

Delivered by FeedBurner

XML Feeds

powered by b2evolution free blog software