Home Random Sh17cast Forums

Embedded Video Plugin Modified to show videos in feeds

Friday, March 30, 2007

It’s been slightly annoying me that videos weren’t showing up in The Sh17’s RSS feed, so I decided to modify the plugin I’ve been using.

From the author’s page: jovelblog » Embedded Video with Link

V3.0 – 30.01.2007

* plugin ready for WordPress 2.1!
* removed video object in feed, just a link instead
* added video portal: brightcove, aniBOOM
* added support for local media files like mov, avi, mpg, flv, swf

I guess videos showed up in feeds up until version 3.0. I started editing the embedded-video.php file and around line 132 is where my modifications start.
Lines 132 to 159. All I did was comment out the if/else statement.
//if ( !is_feed() ) {
switch ($match[1]) {
case "youtube": $output .= YOUTUBE_TARGET; break;
case "google": $output .= GOOGLE_TARGET; break;
case "myvideo": $output .= MYVIDEO_TARGET; break;
case "clipfish": $output .= CLIPFISH_TARGET; break;
case "sevenload": $output .= SEVENLOAD_TARGET; break;
case "revver": $output .= REVVER_TARGET; break;
case "metacafe": $output .= METACAFE_TARGET; break;
case "yahoo": $output .= YAHOO_TARGET; break;
case "ifilm": $output .= IFILM_TARGET; break;
case "myspace": $output .= MYSPACE_TARGET; break;
case "brightcove": $output .= BRIGHTCOVE_TARGET; break;
case "aniboom": $output .= ANIBOOM_TARGET; break;
case "vimeo": $output .= VIMEO_TARGET; break;
case "guba": $output .= GUBA_TARGET; break;
case "dailymotion": $output .= DAILYMOTION_TARGET; $match[3] = "nolink"; break;
case "garagetv": $output .= GARAGE_TARGET; $match[3] = "nolink"; break;
case "local":
if (preg_match("%([[:print:]]+).(mov|qt)$%", $match[2])) { $output .= QUICKTIME_TARGET; break; }
elseif (preg_match("%([[:print:]]+).(wmv|mpg|mpeg|mpe|asf|asx|wax|wmv|wmx|avi)$%", $match[2])) { $output .= VIDEO_TARGET; break; }
elseif (preg_match("%([[:print:]]+).(swf|flv)$%", $match[2])) { $output .= FLASHPLAYER_TARGET; break; }
default: break;
//} else {
// if a feed, overwrite nolink option
//$match[3] = "Link";

And I added this:

//add generic <noembed> so that feed readers that dont support it won't get confused
$output .= "<noembed>--There's a video here that you can't see. You should check out the blog post and watch it.--</noembed>";

Now. With any luck, video’s will start showing up in feeds. If the plugin doesn’t get updated anytime soon, I’ll extend it and just have it post a thumbnail of the video or something with a link to the post.

For a test:

posted by johntash at 6:36 pm  

28 Weeks Later

Friday, March 30, 2007

Remember back in 2002 when 28 Days Later came out? It was a badass zombie movie with rage infected monkeys and everything.

“His fear began when he woke up alone. His terror began when he realised he wasn’t.”

There’s a sequel coming May 11th called 28 Weeks Later. It has a new director and as far as I can tell, the star of the first movie isn’t in this one, or at least isn’t a star again. It takes place 28 weeks later(after the Rage Virus), and the United States thinks it’d be fun to claim they’ve won the war against infection, so begin rebuilding Britain. I can’t wait ’til it comes out. Watch the trailer below, or click here for a better quality version.

“Britain has been emptied. There’s nobody there. It’s completely dead. And six months later the Americans arrive to reboot it back up again. But, of course, something goes wrong…”

I’ve been listening to the background music on their website for a while; it’s pretty neat.

posted by johntash at 5:36 pm  

Video of the Day: Coke Bomb Prank

Tuesday, March 27, 2007

Everybody’s seen those diet coke and mentos things, right? This is probably the best use of that knowledge I’ve seen!

Coke bomb prank pulled on unsuspecting roommate Videocrazy video

posted by johntash at 8:09 pm  

Video of the Day: Potter Puppet Pals

Monday, March 26, 2007

I don’t know if I think these things are funny or annoying.. But here’s puppet versions of Harry Potter and Crew.

There’s more if you wanna search for Potter Puppet Pals and Friends on youtube or google video.

posted by johntash at 9:59 pm  

Video of the Day : Ninja Training Camp

Friday, March 23, 2007

Yeah, they’re badass.

posted by johntash at 5:10 pm  

Video of the Day: Americans Aren’t Stupid

Thursday, March 22, 2007

I really like the guy that says Al Queda is part of the Masonic Order.  Oh, and Star Wars is based on a true story(we already knew that.)

posted by johntash at 11:05 pm  

Video of the Day : A Police Dog you’d like to chase you.

Wednesday, March 21, 2007

Poor dog.

posted by johntash at 11:03 am  
Next Page »

22 queries. 0.134 seconds.
Copyright © 2007-2010 http://www.thesh17.com