Support the new url format for Vimeo. The old format still working too.

master
vbracco 2008-02-26 15:58:51 +00:00
parent 80dcdc66ba
commit a05e8a4336
2 changed files with 6 additions and 3 deletions

View File

@ -120,14 +120,17 @@ if(!defined('entry') || !entry) die('Not a valid page');
}
function isVimeoVideo($videoUrl) {
if (beginsWith($videoUrl, "http://vimeo.com/clip:") || beginsWith($videoUrl, "http://www.vimeo.com/clip:"))
if (beginsWith($videoUrl, "http://vimeo.com/") || beginsWith($videoUrl, "http://www.vimeo.com/"))
return true;
else
return false;
}
function getVimeoVideoUrl($videoUrl) {
return array_pop(explode("clip:",$videoUrl));
if(substr_count($videoUrl,"clip:")==1)
return array_pop(explode("clip:",$videoUrl));
else
return array_pop(explode("/",$videoUrl));
}
function isYoutubeVideo($videoUrl) {

View File

@ -174,7 +174,7 @@ class gelato extends Conexion_Mysql {
$id_video = getSlideSharePresentationCode($url);
return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://www.slideshare.net/swf/player.swf?presentationId=".$id_video[0]."&amp;doc=".$id_video[1]."&amp;inContest=0&amp;startSlide=1\"><param name=\"quality\" value=\"high\" /></object>\n";
} else {
return "This URL is not a supported video (YouTube, Vimeo, DailyMotion or Yahoo Video)";
return "This URL is not a supported video (YouTube, Vimeo, DailyMotion, Yahoo Video or SlideShare)";
}
}
function getMp3Player($url) {