X-Git-Url: http://git.pippins.net/embedvideo/.git/static/git-logo.png?a=blobdiff_plain;ds=sidebyside;f=ItemAddEmbedVideo.inc;fp=ItemAddEmbedVideo.inc;h=8049610d866fd38fdeae129938dea84a40d126d0;hb=ddfbcdb8e5c88fccadbc4a3af95d47792815ad50;hp=bbb941d3a6562f6d652a62af5ef336cd66f8f6a4;hpb=d0039367e0ac83082d8fd90fb1a5460cfaf8c94d;p=embedvideo%2F.git diff --git a/ItemAddEmbedVideo.inc b/ItemAddEmbedVideo.inc index bbb941d..8049610 100644 --- a/ItemAddEmbedVideo.inc +++ b/ItemAddEmbedVideo.inc @@ -92,7 +92,8 @@ class ItemAddEmbedVideo extends ItemAddPlugin { $watermarkAlignment = $this->getParameter($ItemAddEmbedVideo, 'watermarkAlignment', "left"); $wordwrapSummary = $this->getParameter($ItemAddEmbedVideo, 'wordwrapSummary', "0"); $wordwrapDescription = $this->getParameter($ItemAddEmbedVideo, 'wordwrapDescription', "0"); - + $allowFullScreen = $this->getParameter($ItemAddEmbedVideo, 'allowFullScreen', "false"); + /* Print our stored/set Parameters */ if(!strcmp($debugOutput,"true")) { print "\n
"; @@ -112,6 +113,7 @@ class ItemAddEmbedVideo extends ItemAddPlugin { print "watermarkAlignment=$watermarkAlignment
\n"; print "wordwrapSummary=$wordwrapSummary
\n"; print "wordwrapDescription=$wordwrapDescription
\n"; + print "allowFullScreen=$allowFullScreen
\n"; print "
\n"; } @@ -287,15 +289,26 @@ class ItemAddEmbedVideo extends ItemAddPlugin { $youtubeShowRelatedStr="&rel=0"; } + /* Determine if the video should show related videos or not based on the youtubeShowRelated parameter */ + $fullScreenStr=""; + $fullScreenParamStr1=""; + $fullScreenParamStr2=""; + if(!strcmp($allowFullScreen,"true")) { + $fullScreenStr="&fs=1"; + $fullScreenParamStr1=""; + $fullScreenParamStr2=" allowfullscreen=\"true\""; + } + /* Format the description to hold a reference to the embedded video */ $description = ''; $description.= ''; $description.= ''; + $description.= $fullScreenParamStr1; $description.= ''; + $description.= 'width="'.$width.'" height="'.$height.'"'.$fullScreenParamStr2.'>'; /* ********************************** @@ -335,12 +348,13 @@ class ItemAddEmbedVideo extends ItemAddPlugin { } /* Extract the thumbnail URL from the webpage contents */ - preg_match('/\'(http:\/\/.*?\/ThumbnailServer2.+?)\'/i', + preg_match('/\'.+?thumbnail.+?(http:\/\/.*?\/ThumbnailServer2.+?)\'/i', $contents, $matches); $thumbnail=$matches[1]; $thumbnail=preg_replace("/\\\\x26/","&",$thumbnail); $thumbnail=preg_replace("/\\\\x3d/","=",$thumbnail); - + $thumbnail=urldecode($thumbnail); + /* Determine what our width and height should be based on our useRemoteSize parameter */ if(!strcmp($useRemoteSize,"true")) { $width = $googleWidth; @@ -557,7 +571,7 @@ class ItemAddEmbedVideo extends ItemAddPlugin { $thumbnail=$dailymotionThumbnailUrl.$item_id; /* Format the description to hold a reference to the embedded video */ - if(preg_match('/