Support the new url format for Vimeo. The old format still working too.
parent
80dcdc66ba
commit
a05e8a4336
|
|
@ -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) {
|
||||
if(substr_count($videoUrl,"clip:")==1)
|
||||
return array_pop(explode("clip:",$videoUrl));
|
||||
else
|
||||
return array_pop(explode("/",$videoUrl));
|
||||
}
|
||||
|
||||
function isYoutubeVideo($videoUrl) {
|
||||
|
|
|
|||
|
|
@ -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]."&doc=".$id_video[1]."&inContest=0&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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue