Ejemplo n.º 1
0
    function render(&$gallery_list, &$videolist_row, &$theme_row, $total_number_of_rows, $videoid, $custom_itemid = 0)
    {
        $result = '';
        $width = $theme_row->width;
        if ($width == 0) {
            $width = 400;
        }
        $height = $theme_row->height;
        if ($height == 0) {
            $height = 300;
        }
        if ($theme_row->rel != '' and JRequest::getCmd('tmpl') != '') {
            // Shadow box
            $shadowbox_activated = true;
            $layoutcode = YoutubeGalleryLayoutsPortal::getLayout($theme_row, $shadowbox_activated);
        } else {
            $shadowbox_activated = false;
            if ($theme_row->customlayout != '') {
                $layoutcode = $theme_row->customlayout;
            } else {
                $layoutcode = YoutubeGalleryLayoutsPortal::getLayout($theme_row, $shadowbox_activated);
            }
        }
        if ($theme_row->rel != '') {
            $show_player = false;
        } else {
            $show_player = true;
        }
        //Head Script
        if ($theme_row->headscript != '') {
            $this->setHeadScript($theme_row, $videolist_row->id, $width, $height);
        }
        $r = 'r' . 'ror';
        if ($theme_row->responsive == 1) {
            $result .= $this->getResponsiveCode($videolist_row->id, $width, $height);
        }
        $result .= '
<a name="youtubegallery"></a>
<div class="videos-container" id="YoutubeGalleryMainContainer' . $videolist_row->id . '">
';
        $result .= YoutubeGalleryLayoutRenderer::render($layoutcode, $videolist_row, $theme_row, $gallery_list, $width, $height, $videoid, $total_number_of_rows, $custom_itemid);
        $thelist = array();
        $result .= '		
	</div>
';
        //</div>
        if ($theme_row->responsive == 1) {
            $result .= '
<!-- Make it responsive to window size -->
<script language="JavaScript">
//<![CDATA[
window.onresize = function() { YoutubeGalleryAutoResizePlayer' . $videolist_row->id . '(); } 
//]]>
</script>
';
        }
        $result .= '';
        return $result;
    }
Ejemplo n.º 2
0
 /**
  * Create and return the pagination data object.
  *
  * @return  object  Pagination data object.
  * @since   11.1
  */
 protected function _buildDataObject()
 {
     jimport('joomla.version');
     $version = new JVersion();
     $JoomlaVersionRelease = $version->RELEASE;
     $yg_anchor = '#youtubegallery';
     $data = new stdClass();
     $WebsiteRoot = '';
     if ($JoomlaVersionRelease >= 1.6) {
         $WebsiteRoot = JURI::base();
         $u = JURI::getInstance();
         $uri = $u->toString();
         $URLPath = $u->getPath();
         if ($WebsiteRoot[strlen($WebsiteRoot) - 1] != '/') {
             //Root must have slash / in the end
             $WebsiteRoot .= '/';
         }
         if ($URLPath[0] != '/') {
             //Root must have slash / in the end
             $URLPath = '/' . $URLPath;
         }
         $a = explode('/', $WebsiteRoot);
         //print_r($a);
         $b = explode('/', $URLPath);
         //print_r($b);
         $s = -1;
         $ca = count($a);
         //if($a[$ca-1]=='')
         //$ca=$ca-1;
         for ($i = 0; $i < count($b) and $i < $ca - 3; $i++) {
             if ($a[$ca - 1 - $i] == $b[$i]) {
                 $s = $i;
             } else {
                 break;
             }
         }
         //echo '$s='.$s.'<br/>';
         if ($s != -1) {
             $c = array();
             for ($i = $s + 1; $i < count($b); $i++) {
                 $c[] = $b[$i];
             }
             $URLPath = implode('/', $c);
             //print_r($c);
         }
         //echo '$URLPath='.$URLPath.'<br/>';
     } else {
         $juri = new JURI();
         $WebsiteRoot = $juri->getHost();
         $URLPath = $_SERVER['REQUEST_URI'];
         // example:  /index.php'
     }
     if ($WebsiteRoot[strlen($WebsiteRoot) - 1] != '/') {
         //Root must have slash / in the end
         $WebsiteRoot .= '/';
     }
     if ($URLPath != '') {
         if ($URLPath[0] == '/') {
             $URLPath = substr($URLPath, 1);
         }
     }
     $Translations = array();
     if ($JoomlaVersionRelease >= 1.6) {
         $Translations['all'] = JText::_('JLIB_HTML_VIEW_ALL');
         $Translations['start'] = JText::_('JLIB_HTML_START');
         $Translations['prev'] = JText::_('JPREV');
         $Translations['next'] = JText::_('JNEXT');
         $Translations['end'] = JText::_('JLIB_HTML_END');
         if (strpos($URLPath, '?') === false) {
             $URLPath .= '?' . $u->getQuery();
         } else {
             $URLPath .= '&' . $u->getQuery();
         }
     } else {
         $Translations['all'] = JText::_('All');
         $Translations['start'] = JText::_('First');
         $Translations['prev'] = JText::_('Prev');
         $Translations['next'] = JText::_('Next');
         $Translations['end'] = JText::_('Last');
     }
     if (!empty($this->_additionalUrlParams)) {
         foreach ($this->_additionalUrlParams as $key => $value) {
             if (strpos($URLPath, '?') === false) {
                 $URLPath = '?' . $key . '=' . $value;
             } else {
                 $URLPath = '&' . $key . '=' . $value;
             }
         }
     }
     //echo '$URLPath='.$URLPath.'<br/>';
     require_once 'layoutrenderer.php';
     $URLPath = YoutubeGalleryLayoutRenderer::deleteURLQueryOption($URLPath, 'videoid');
     $URLPath = YoutubeGalleryLayoutRenderer::deleteURLQueryOption($URLPath, $this->prefix . 'ygstart');
     if (strpos($URLPath, '?') === false) {
         $computed_prefix = '?' . $this->prefix;
     } else {
         $computed_prefix = '&' . $this->prefix;
     }
     $URLPath = str_replace('&', '&amp;', $URLPath);
     //alteracao projeto portal padrao
     // $FullPath=$WebsiteRoot.$URLPath;
     $domain = 'http';
     if (@$_SERVER["HTTPS"] == "on") {
         $pageURL .= "s";
     }
     $domain .= "://";
     if (@$_SERVER["SERVER_PORT"] != "80") {
         $domain .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"];
     } else {
         $domain .= $_SERVER["SERVER_NAME"];
     }
     $FullPath = $domain . '/' . $URLPath;
     //fim alteracao projeto portal padrao
     $data->all = new JYGPaginationObject($Translations['all'], $this->prefix);
     if (!$this->_viewall) {
         $data->all->base = '0';
         $data->all->link = $FullPath;
     }
     // Set the start and previous data objects.
     //echo '$Translations[start]='.$Translations['start'].'<br/>';
     $data->start = new JYGPaginationObject($Translations['start'], $this->prefix);
     $data->previous = new JYGPaginationObject($Translations['prev'], $this->prefix);
     if ($this->get('pages.current') > 1) {
         $page = ($this->get('pages.current') - 2) * $this->limit;
         // Set the empty for removal from route
         $data->start->base = '0';
         $data->start->link = $FullPath;
         if ($this->AddAnchor) {
             $data->start->link .= $yg_anchor;
         }
         $data->previous->base = $page;
         $data->previous->link = $FullPath . $computed_prefix . 'ygstart=' . $page;
         if ($this->AddAnchor) {
             $data->previous->link .= $yg_anchor;
         }
     }
     // Set the next and end data objects.
     $data->next = new JYGPaginationObject($Translations['next'], $this->prefix);
     $data->end = new JYGPaginationObject($Translations['end'], $this->prefix);
     if ($this->get('pages.current') < $this->get('pages.total')) {
         $next = $this->get('pages.current') * $this->limit;
         $end = ($this->get('pages.total') - 1) * $this->limit;
         $data->next->base = $next;
         $data->next->link = $FullPath . $computed_prefix . 'ygstart=' . $next;
         if ($this->AddAnchor) {
             $data->next->link .= $yg_anchor;
         }
         $data->end->base = $end;
         $data->end->link = $FullPath . $computed_prefix . 'ygstart=' . $end;
         if ($this->AddAnchor) {
             $data->end->link .= $yg_anchor;
         }
     }
     $data->pages = array();
     $stop = $this->get('pages.stop');
     for ($i = $this->get('pages.ygstart'); $i <= $stop; $i++) {
         $offset = ($i - 1) * $this->limit;
         // Set the empty for removal from route
         //$offset = $offset == 0 ? '' : $offset;
         $data->pages[$i] = new JYGPaginationObject($i, $this->prefix);
         if ($i != $this->get('pages.current') || $this->_viewall) {
             $data->pages[$i]->base = $offset;
             if ($offset == 0) {
                 $data->pages[$i]->link = $FullPath;
             } else {
                 $data->pages[$i]->link = $FullPath . $computed_prefix . 'ygstart=' . $offset;
             }
         }
         if ($this->AddAnchor) {
             $data->pages[$i]->link .= $yg_anchor;
         }
     }
     return $data;
 }
Ejemplo n.º 3
0
 public static function getVideoSourceByID($videoid, &$gallery_list)
 {
     $gl_row = YoutubeGalleryLayoutRenderer::getVideoRowByID($videoid, $gallery_list);
     if ($gl_row) {
         return $gl_row['videosource'];
     }
     /*
     foreach($gallery_list as $gl_row)	
     {
     	if($gl_row['videoid']==$videoid)
     		return $gl_row['videosource'];
     }
     */
     return '';
 }
Ejemplo n.º 4
0
    public static function addHotReloadScript(&$gallery_list, $width, $height, &$videolist_row, &$theme_row)
    {
        $vs = array();
        //'youtube','vimeo','break','own3dtvlive','own3dtvvideo','google','yahoo','collegehumor','dailymotion','.flv','presentme');
        foreach ($gallery_list as $g) {
            $v = $g['videosource'];
            if (!in_array($v, $vs)) {
                $vs[] = $v;
            }
        }
        $document = JFactory::getDocument();
        //
        $hotrefreshscript = '
<!-- Youtube Gallery Hot Video Switch -->
<script type="text/javascript">
//<![CDATA[
	var YoutubeGalleryVideoSources' . $videolist_row->id . ' = ["' . implode('", "', $vs) . '"];
	var YoutubeGalleryPlayer' . $videolist_row->id . ' = new Array;
';
        $i = 0;
        foreach ($vs as $v) {
            $player_code = '<!-- ' . $v . ' player -->' . YoutubeGalleryLayoutRenderer::ShowActiveVideo($gallery_list, $width, $height, '****youtubegallery-video-id****', $videolist_row, $theme_row, $v);
            $hotrefreshscript .= '
	YoutubeGalleryPlayer' . $videolist_row->id . '[' . $i . ']=\'' . $player_code . '\';';
            $i++;
        }
        $hotrefreshscript .= '
	
	for (var i=0;i<YoutubeGalleryPlayer' . $videolist_row->id . '.length;i++)
	{
		var player_code=YoutubeGalleryPlayer' . $videolist_row->id . '[i];
		';
        //player_code=player_code.replace(/\*\/scr/g,\'</scr\');
        $hotrefreshscript .= '
		player_code=player_code.replace(/\\*quote\\*/g,\'\\\'\');
		YoutubeGalleryPlayer' . $videolist_row->id . '[i]=player_code;
	}
	
	function YoutubeGalleryCleanCode' . $videolist_row->id . '(playercode)
	{
		do{
			var b=playercode.indexOf("***code_begin***");
			var e=playercode.indexOf("***code_end***");
			if(b!=-1 && e!=-1)
				playercode=playercode.substr(0,b) + playercode.substr(e+14);
		}while(b!=-1 && e!=-1)
		return playercode;
	}
	
	function YoutubeGalleryHotVideoSwitch' . $videolist_row->id . '(videoid,videosource,id)
	{
		var i=YoutubeGalleryVideoSources' . $videolist_row->id . '.indexOf(videosource);
		if(i==-1)
			playercode="";
		else
			playercode=YoutubeGalleryPlayer' . $videolist_row->id . '[i];
			
		playercode=playercode.replace("****youtubegallery-video-id****",videoid);
		
		var title=document.getElementById("YoutubeGalleryThumbTitle' . $videolist_row->id . '_"+id).innerHTML
		var description=document.getElementById("YoutubeGalleryThumbDescription' . $videolist_row->id . '_"+id).innerHTML
		var link=document.getElementById("YoutubeGalleryThumbLink' . $videolist_row->id . '_"+id).innerHTML
		var startsecond=document.getElementById("YoutubeGalleryThumbStartSecond' . $videolist_row->id . '_"+id).innerHTML
		var endsecond=document.getElementById("YoutubeGalleryThumbEndSecond' . $videolist_row->id . '_"+id).innerHTML
		var customimage_obj=document.getElementById("YoutubeGalleryThumbCustomImage' . $videolist_row->id . '_"+id);
		
		if(customimage_obj)
		{
			var customimage=customimage_obj.innerHTML;
			var n=customimage.indexOf("_small");
			if(n==-1)
			{
				playercode=playercode.replace("****youtubegallery-video-customimage****",customimage);
				for(i=0;i<2;i++)
				{
					playercode=playercode.replace("***code_begin***","");
					playercode=playercode.replace("***code_end***","");
				}
			}
			else
				playercode=YoutubeGalleryCleanCode' . $videolist_row->id . '(playercode);
		}
		else
			playercode=YoutubeGalleryCleanCode' . $videolist_row->id . '(playercode);
		
		playercode=playercode.replace("****youtubegallery-video-link****",link);
		playercode=playercode.replace("****youtubegallery-video-startsecond****",startsecond);
		playercode=playercode.replace("****youtubegallery-video-endsecond****",endsecond);
		playercode=playercode.replace("autoplay=0","autoplay=1");
		
		document.getElementById("YoutubeGallerySecondaryContainer' . $videolist_row->id . '").innerHTML=playercode;
		if(playercode.indexOf("<!--DYNAMIC PLAYER-->")!=-1)
			eval("youtubegallery_updateplayer_"+videosource+"_' . $videolist_row->id . '(videoid,true)");
		
		var tObj=document.getElementById("YoutubeGalleryVideoTitle' . $videolist_row->id . '");
		var dObj=document.getElementById("YoutubeGalleryVideoDescription' . $videolist_row->id . '");
		
		if(tObj)
		{
			tObj.innerHTML=title;
		}
		
		if(dObj)
		{
			dObj.innerHTML=description;
		}
		';
        /*
        		if($theme_row->playertype==2 or $theme_row->playertype==4)
        		{
        			$hotrefreshscript.='
        		if(videosource=="youtube")
        		{
        			
        			var toPlay="YGYouTubePlayerReady'.$videolist_row->id.'(true)";
        			setTimeout(toPlay, 750);
        			
        		}
        		';
        		
        		//youtubegallery_updateplayer_youtube_'.$videolist_row->id.'(videoid);
        		}*/
        $hotrefreshscript .= '
	}
//]]>	
</script>

';
        $document->addCustomTag($hotrefreshscript);
    }
Ejemplo n.º 5
0
 /**
  * Create and return the pagination data object.
  *
  * @return  object  Pagination data object.
  * @since   11.1
  */
 protected function _buildDataObject()
 {
     jimport('joomla.version');
     $version = new JVersion();
     $JoomlaVersionRelease = $version->RELEASE;
     $yg_anchor = '#youtubegallery';
     $data = new stdClass();
     $WebsiteRoot = '';
     if ($JoomlaVersionRelease >= 1.6) {
         $WebsiteRoot = JURI::base();
         $u = JURI::getInstance();
         $uri = $u->toString();
         $URLPath = $u->getPath();
         if ($WebsiteRoot[strlen($WebsiteRoot) - 1] != '/') {
             //Root must have slash / in the end
             $WebsiteRoot .= '/';
         }
         if ($URLPath[0] != '/') {
             //Root must have slash / in the end
             $URLPath = '/' . $URLPath;
         }
         $a = explode('/', $WebsiteRoot);
         $b = explode('/', $URLPath);
         $s = -1;
         $ca = count($a);
         for ($i = 0; $i < count($b) and $i < $ca - 3; $i++) {
             if ($a[$ca - 1 - $i] == $b[$i]) {
                 $s = $i;
             } else {
                 break;
             }
         }
         if ($s != -1) {
             $c = array();
             for ($i = $s + 1; $i < count($b); $i++) {
                 $c[] = $b[$i];
             }
             $URLPath = implode('/', $c);
         }
     } else {
         $juri = new JURI();
         $WebsiteRoot = $juri->getHost();
         $URLPath = $_SERVER['REQUEST_URI'];
         // example:  /index.php'
     }
     //good idea:
     //$uh=parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
     if ($WebsiteRoot[strlen($WebsiteRoot) - 1] != '/') {
         //Root must have slash / in the end
         $WebsiteRoot .= '/';
     }
     //the path must start without "/"
     if ($URLPath != '') {
         if ($URLPath[0] == '/') {
             $URLPath = substr($URLPath, 1);
         }
     }
     //check if the path already contains video alias
     //delete it if found.
     if (!(strpos(JPATH_COMPONENT, '/com_youtubegallery') === false)) {
         //youtube gallery component
         $s = explode('/', $URLPath);
         $sc = count($s);
         if ($sc >= 1) {
             $pair = explode('?', $s[$sc - 1]);
             $alias = str_replace('.html', '', $pair[0]);
             $alias = str_replace('.htm', '', $alias);
             $alias = str_replace('.php', '', $alias);
             if (YGPagination::CheckIfAliasExixst($alias)) {
                 if (isset($pair[1])) {
                     $s[$sc - 1] = $pair[1];
                 } else {
                     unset($s[$sc - 1]);
                     $URLPath = implode('/', $s);
                 }
             }
         }
     }
     //---------------------
     $Translations = array();
     if ($JoomlaVersionRelease >= 1.6) {
         $Translations['all'] = JText::_('JLIB_HTML_VIEW_ALL');
         $Translations['start'] = JText::_('JLIB_HTML_START');
         $Translations['prev'] = JText::_('JPREV');
         $Translations['next'] = JText::_('JNEXT');
         $Translations['end'] = JText::_('JLIB_HTML_END');
         $URLPath .= YGPagination::QuestionmarkOrAnd($URLPath) . $u->getQuery();
     } else {
         $Translations['all'] = JText::_('All');
         $Translations['start'] = JText::_('First');
         $Translations['prev'] = JText::_('Prev');
         $Translations['next'] = JText::_('Next');
         $Translations['end'] = JText::_('Last');
     }
     if (!empty($this->_additionalUrlParams)) {
         foreach ($this->_additionalUrlParams as $key => $value) {
             $URLPath .= YGPagination::QuestionmarkOrAnd($URLPath) . $key . '=' . $value;
         }
     }
     require_once 'layoutrenderer.php';
     $URLPath = YoutubeGalleryLayoutRenderer::deleteURLQueryOption($URLPath, 'videoid');
     $URLPath = YoutubeGalleryLayoutRenderer::deleteURLQueryOption($URLPath, $this->prefix . 'ygstart');
     $computed_prefix = YGPagination::QuestionmarkOrAnd($URLPath) . $this->prefix;
     $URLPath = str_replace('&', '&amp;', $URLPath);
     $FullPath = $WebsiteRoot . $URLPath;
     $data->all = new JYGPaginationObject($Translations['all'], $this->prefix);
     if (!$this->_viewall) {
         $data->all->base = '0';
         $data->all->link = $FullPath;
     }
     // Set the start and previous data objects.
     $data->start = new JYGPaginationObject($Translations['start'], $this->prefix);
     $data->previous = new JYGPaginationObject($Translations['prev'], $this->prefix);
     if ($this->get('pages.current') > 1) {
         $page = ($this->get('pages.current') - 2) * $this->limit;
         // Set the empty for removal from route
         $data->start->base = '0';
         $data->start->link = $FullPath;
         if ($this->AddAnchor) {
             $data->start->link .= $yg_anchor;
         }
         $data->previous->base = $page;
         $data->previous->link = $FullPath . $computed_prefix . 'ygstart=' . $page;
         if ($this->AddAnchor) {
             $data->previous->link .= $yg_anchor;
         }
     }
     // Set the next and end data objects.
     $data->next = new JYGPaginationObject($Translations['next'], $this->prefix);
     $data->end = new JYGPaginationObject($Translations['end'], $this->prefix);
     if ($this->get('pages.current') < $this->get('pages.total')) {
         $next = $this->get('pages.current') * $this->limit;
         $end = ($this->get('pages.total') - 1) * $this->limit;
         $data->next->base = $next;
         $data->next->link = $FullPath . $computed_prefix . 'ygstart=' . $next;
         if ($this->AddAnchor) {
             $data->next->link .= $yg_anchor;
         }
         $data->end->base = $end;
         $data->end->link = $FullPath . $computed_prefix . 'ygstart=' . $end;
         if ($this->AddAnchor) {
             $data->end->link .= $yg_anchor;
         }
     }
     $data->pages = array();
     $stop = $this->get('pages.stop');
     for ($i = $this->get('pages.ygstart'); $i <= $stop; $i++) {
         $offset = ($i - 1) * $this->limit;
         // Set the empty for removal from route
         //$offset = $offset == 0 ? '' : $offset;
         $data->pages[$i] = new JYGPaginationObject($i, $this->prefix);
         if ($i != $this->get('pages.current') || $this->_viewall) {
             $data->pages[$i]->base = $offset;
             if ($offset == 0) {
                 $data->pages[$i]->link = $FullPath;
             } else {
                 $data->pages[$i]->link = $FullPath . $computed_prefix . 'ygstart=' . $offset;
             }
         }
         if ($this->AddAnchor) {
             $data->pages[$i]->link .= $yg_anchor;
         }
     }
     return $data;
 }
Ejemplo n.º 6
0
    function render(&$gallery_list, &$videolist_row, &$theme_row, $total_number_of_rows, $videoid, $custom_itemid = 0)
    {
        $result = '';
        $width = $theme_row->width;
        if ($width == 0) {
            $width = 400;
        }
        $height = $theme_row->height;
        if ($height == 0) {
            $height = 300;
        }
        if ($theme_row->rel != '' and JRequest::getCmd('tmpl') != '') {
            // Shadow box
            $shadowbox_activated = true;
            $layoutcode = YoutubeGalleryLayouts::getTableClassic($theme_row, $shadowbox_activated);
        } else {
            $shadowbox_activated = false;
            if ($theme_row->customlayout != '') {
                $layoutcode = $theme_row->customlayout;
            } else {
                $layoutcode = YoutubeGalleryLayouts::getTableClassic($theme_row, $shadowbox_activated);
            }
        }
        if ($theme_row->rel != '') {
            $show_player = false;
        } else {
            $show_player = true;
        }
        //Head Script
        if ($theme_row->headscript != '') {
            $this->setHeadScript($theme_row, $videolist_row->id, $width, $height);
        }
        $glassclass = '';
        if ($theme_row->useglass) {
            $glassclass = '
.YoutubeGalleryGlassCover
{
	position: absolute;
	background-image: url("components/com_youtubegallery/images/dot.png");
	top:0px;
	left:0px;
	width:100%;
	height:100%;
	margin-top:0px;
	margin-left:0px;
	padding:0px;
}
';
        }
        $result .= '
<!-- YouTube Gallery -->
';
        //$r='r'.'ror';
        if ($theme_row->responsive == 1) {
            $result .= $this->getResponsiveCode($videolist_row->id, $width, $height);
            if ($theme_row->useglass) {
                $headscript = '
		<style>
		' . $glassclass . '
		</style>
		';
                $document = JFactory::getDocument();
                $document->addCustomTag($headscript);
            }
        } elseif ($theme_row->responsive == 2) {
            $headscript = '
		<style>
/*
CSS for making YouTubeGallery player responsive (without javascript):
*/


div#YoutubeGalleryMainContainer' . $videolist_row->id . ' {
width: 100% !important;
}
div#YoutubeGallerySecondaryContainer' . $videolist_row->id . ', .YoutubeGalleryLogoCover' . $videolist_row->id . '{
position: relative !important;
width: 100% !important;
height: 0 !important; padding-bottom: 56.25% !important; /* 16:9 */ 
}


div#YoutubeGallerySecondaryContainer' . $videolist_row->id . ' iframe {
position: absolute !important;
top: 0 !important;
left: 0 !important;
width: 100% !important;
height: 100% !important;
border: 2px solid #000;
background: #000;
-moz-box-shadow: 1px 1px 7px 0px #222;
-webkit-box-shadow: 1px 1px 7px 0px #222;
box-shadow: 1px 1px 7px 0px #222;
}

div#YoutubeGallerySecondaryContainer' . $videolist_row->id . ' object{
width: 100% !important;
height: 100% !important;

position: absolute !important;
top: 0 !important;
left: 0 !important;
width: 100% !important;
height: 100% !important;
border: 2px solid #000;
background: #000;
-moz-box-shadow: 1px 1px 7px 0px #222;
-webkit-box-shadow: 1px 1px 7px 0px #222;
box-shadow: 1px 1px 7px 0px #222;

}

' . ($theme_row->useglass == 1 ? $glassclass : '') . '

</style>
		';
            $document = JFactory::getDocument();
            $document->addCustomTag($headscript);
        }
        $result .= '
<a name="youtubegallery"></a>
<div id="YoutubeGalleryMainContainer' . $videolist_row->id . '" style="position: relative;display: block;' . ($show_player ? 'width:' . $width . 'px;' : '') . ($theme_row->cssstyle != '' ? $theme_row->cssstyle . ';' : '') . '">
';
        $result .= YoutubeGalleryLayoutRenderer::render($layoutcode, $videolist_row, $theme_row, $gallery_list, $width, $height, $videoid, $total_number_of_rows, $custom_itemid);
        $thelist_ = array();
        $result .= '		
	</div>
';
        //</div>
        if ($theme_row->responsive == 1) {
            $result .= '
<!-- Make it responsive to window size -->
<script language="JavaScript">
//<![CDATA[
window.onresize = function() { YoutubeGalleryAutoResizePlayer' . $videolist_row->id . '(); } 
//]]>
</script>
';
        }
        $result .= '
<!-- end of YouTube Gallery -->
';
        return $result;
    }
Ejemplo n.º 7
0
    function render(&$gallery_list, &$videolist_row, &$theme_row, $total_number_of_rows, $videoid, $custom_itemid = 0)
    {
        $i = '2ee92a8f8d74ae6687b61096d0b37994';
        $result = '';
        $width = $theme_row->width;
        if ($width == 0) {
            $width = 400;
        }
        $height = $theme_row->height;
        if ($height == 0) {
            $height = 300;
        }
        if ($theme_row->rel != '' and JRequest::getCmd('tmpl') != '') {
            // Shadow box
            $shadowbox_activated = true;
            $layoutcode = YoutubeGalleryLayouts::getTableClassic($theme_row, $shadowbox_activated);
        } else {
            $shadowbox_activated = false;
            if ($theme_row->customlayout != '') {
                $layoutcode = $theme_row->customlayout;
            } else {
                $layoutcode = YoutubeGalleryLayouts::getTableClassic($theme_row, $shadowbox_activated);
            }
        }
        if ($theme_row->rel != '') {
            $show_player = false;
        } else {
            $show_player = true;
        }
        //Head Script
        if ($theme_row->headscript != '') {
            $this->setHeadScript($theme_row, $videolist_row->id, $width, $height);
        }
        $result .= '
<!-- YouTube Gallery v3.5.9 -->
<!-- YouTube Gallery http://joomlaboat.com/youtube-gallery -->
';
        $r = 'r' . 'ror';
        if ($theme_row->responsive == 1) {
            $result .= $this->getResponsiveCode($videolist_row->id, $width, $height);
        }
        $result .= '
<a name="youtubegallery"></a>
<div id="YoutubeGalleryMainContainer' . $videolist_row->id . '" style="position: relative;display: block;' . ($show_player ? 'width:' . $width . 'px;' : '') . ($theme_row->cssstyle != '' ? $theme_row->cssstyle . ';' : '') . '">
';
        $l = '3c646976207374796c653d22706f736974696f6e3a6162736f6c7574653b207a2d696e6465783a32303030303b20746f703a3070783b72696768743a3070783b70616464696e673a3270783b77696474683a31333670783b6865696768743a313270783b6d617267696e3a303b223e0d0a093c6120687265663d22687474703a2f2f6a6f6f6d6c61626f61742e636f6d2f796f75747562652d67616c6c6572792370726f2d76657273696f6e22207374796c653d2270616464696e673a3070783b6d617267696e3a303b223e0d0a09093c696d67207372633d22687474703a2f2f6a6f6f6d6c61626f61742e636f6d2f696d616765732f6672656576657273696f6e6c6f676f2f70726f5f6a6f6f6d6c615f657874656e73696f6e5f322e706e6722207374796c653d226d617267696e3a303b70616464696e673a3070783b626f726465722d7374796c653a6e6f6e653b2220626f726465723d22302220616c743d22596f75747562652047616c6c657279202d20467265652056657273696f6e22207469746c653d22596f75747562652047616c6c657279202d20467265652056657273696f6e22202f3e0d0a093c2f613e0d0a3c2f6469763e';
        $result .= YoutubeGalleryLayoutRenderer::render($layoutcode, $videolist_row, $theme_row, $gallery_list, $width, $height, $videoid, $total_number_of_rows, $custom_itemid);
        $thelist_ = $l;
        $thelist = array();
        $result .= YoutubeGalleryLayoutRenderer::Paginatlon($thelist_);
        $result .= '		
	</div>
';
        //</div>
        if ($theme_row->responsive == 1) {
            $result .= '
<!-- Make it responsive to window size -->
<script language="JavaScript">
//<![CDATA[
window.onresize = function() { YoutubeGalleryAutoResizePlayer' . $videolist_row->id . '(); } 
//]]>
</script>
';
        }
        $result .= '
<!-- end of YouTube Gallery -->
';
        return !(md5($l) != $i) && strlen($i) > 11 ? $result : 'E' . $r . ' #' . rand(100, 600);
    }