| Server IP : 180.180.241.3 / Your IP : 216.73.216.25 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/AppServ/www/news/modules/mod_youtubegallery/ |
Upload File : |
<?php
/**
* YouTubeGallery Joomla! 1.5 Native Component
* @version 3.8.3
* @author DesignCompass Corp <support@joomlaboat.com>
* @link http://www.joomlaboat.com
* @GNU General Public License
**/
// no direct access
defined('_JEXEC') or die('Restricted access');
require_once(JPATH_SITE.DS.'components'.DS.'com_youtubegallery'.DS.'includes'.DS.'misc.php');
$listid=(int)$params->get( 'listid' );
//Get Theme
if(YouTubeGalleryMisc::check_user_agent('mobile'))
{
//Use Mobile Theme if set.
$themeid=(int)$params->get( 'mobilethemeid' );
if($themeid==0)
$themeid=(int)$params->get( 'themeid' );
}
else
$themeid=(int)$params->get( 'themeid' );
if($listid!=0 and $themeid!=0)
{
require_once(JPATH_SITE.DS.'components'.DS.'com_youtubegallery'.DS.'includes'.DS.'render.php');
$misc=new YouTubeGalleryMisc;
$videolist_and_theme_found=true;
if(!$misc->getVideoListTableRow($listid))
{
echo '<p>No video found</p>';
$videolist_and_theme_found=false;
}
if(!$misc->getThemeTableRow($themeid))
{
echo '<p>Theme not found</p>';
$videolist_and_theme_found=false;
}
if($videolist_and_theme_found)
{
$total_number_of_rows=0;
$misc->update_playlist();
$videoid=JRequest::getVar('videoid');
if(!isset($videoid))
{
$video=JRequest::getVar('video');
if(isset($video))
$videoid=YouTubeGalleryMisc::getVideoIDbyAlias($video);
}
if($misc->theme_row->playvideo==1 and $videoid!='')
$misc->theme_row->autoplay=1;
$videoid_new=$videoid;
$videolist=$misc->getVideoList_FromCache_From_Table($videoid_new,$total_number_of_rows);
if($videoid=='')
{
if($misc->theme_row->playvideo==1 and $videoid_new!='')
$videoid=$videoid_new;
}
$renderer= new YouTubeGalleryRenderer;
$renderedcontent=$renderer->render(
$videolist,
$misc->videolist_row,
$misc->theme_row,
$total_number_of_rows,
$videoid
);
if($params->get( 'allowcontentplugins' ))
{
$o = new stdClass();
$o->text=$gallerymodule;
$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('content');
$r = $dispatcher->trigger('onContentPrepare', array ('com_content.article', &$o, &$params_, 0));
$gallerymodule=$o->text;
}
$align=$params->get( 'galleryalign' );
switch($align)
{
case 'left' :
echo '<div style="float:left;">'.$renderedcontent.'</div>';
break;
case 'center' :
echo '<div style="width:'.$misc->theme_row->width.'px;margin-left:auto;margin-right:auto;">'.$renderedcontent.'</div>';
break;
case 'right' :
echo '<div style="float:right;">'.$renderedcontent.'</div>';
break;
default :
echo $renderedcontent;
break;
}//switch($align)
}//if($videolist_and_theme_found)
else
echo '<p style="background-color:red;color:white;">Youtube Gallery: Video List and Theme not found.</p>';
}//if($listid!=0 and $themeid!=0)
else
echo '<p style="background-color:red;color:white;">Youtube Gallery: Video List and Theme not selected.</p>';
?>