Added Support to SlideShare presentations
parent
b71af30441
commit
8a07840394
|
|
@ -170,11 +170,26 @@ if(!defined('entry') || !entry) die('Not a valid page');
|
|||
return $params2[0];
|
||||
}
|
||||
|
||||
function isSlideSharePresentation($videoUrl) {
|
||||
if (beginsWith($videoUrl, "[slideshare id="))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSlideSharePresentationCode($videoUrl) {
|
||||
$videoUrl = str_replace("[slideshare id=", "", $videoUrl);
|
||||
$videoUrl = str_replace("&doc=", " ", $videoUrl);
|
||||
$videoUrl = str_replace("&w=", " ", $videoUrl);
|
||||
return explode(" ",$videoUrl);
|
||||
}
|
||||
|
||||
function isVideo($url) {
|
||||
if (isYoutubeVideo($url)) { return true; }
|
||||
elseif (isVimeoVideo($url)) { return true; }
|
||||
elseif (isDailymotionVideo($url)) { return true; }
|
||||
elseif (isYahooVideo($url)) { return true; }
|
||||
elseif (isSlideSharePresentation($url)) { return true; }
|
||||
else { return false; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -172,11 +172,13 @@ class gelato extends Conexion_Mysql {
|
|||
} elseif (isYahooVideo($url)) {
|
||||
$id_video = getYahooVideoCode($url);
|
||||
return "\t\t\t<object type=\"application/x-shockwave-flash\" style=\"width:500px;height:393px\" data=\"http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf\"><param name=\"quality\" value=\"high\" /><param name=\"FlashVars\" value=\"event_function=YAHOO.yv.Player.SWFInterface&id=".$id_video[1]."&vid=".$id_video[0]."&onsite=1&site=video.yahoo.com&page=792730258&lang=en-US&intl=us\" /></object>\n";
|
||||
} elseif (isSlideSharePresentation($url)) {
|
||||
$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)";
|
||||
}
|
||||
}
|
||||
|
||||
function getMp3Player($url) {
|
||||
if (isMP3($url)) {
|
||||
$playerUrl = $this->conf->urlGelato."/admin/scripts/player.swf?soundFile=".$url;
|
||||
|
|
|
|||
Loading…
Reference in New Issue