Server : LiteSpeed System : Linux server 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : alsaif ( 1057) PHP Version : 7.4.33 Disable Function : show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/alsaif/public_html/components/com_allvideoshare/views/search/ |
<?php
/*
* @version $Id: view.html.php 3.5.0 2020-01-25 $
* @package All Video Share
* @copyright Copyright (C) 2012-2020 MrVinoth
* @license GNU/GPL http://www.gnu.org/licenses/gpl-2.0.html
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
class AllVideoShareViewSearch extends AllVideoShareView {
public function display( $tpl = null ) {
$app = JFactory::getApplication();
$this->config = AllVideoShareUtils::getConfig();
$model = $this->getModel();
$this->params = $app->getParams();
$this->rows = $this->params->get( 'no_of_rows', $this->config->rows );
$this->cols = $this->params->get( 'no_of_cols', $this->config->cols );
if ( $this->config->is_premium ) {
$this->popup = $this->params->get( 'popup', $this->config->popup );
if ( $this->popup < 0 ) {
$this->popup = $this->config->popup;
}
} else {
$this->popup = 0;
}
$this->player_ratio = 56.25;
if ( $this->popup ) {
$ratio = AllVideoShareUtils::getPlayer( 'ratio' );
if ( $ratio > 0 ) {
$this->player_ratio = $ratio;
}
}
$limit = (int) $this->rows * (int) $this->cols;
$this->items = $model->getItems( $limit );
$this->pagination = $model->getVideosPagination();
$this->q = $app->getUserStateFromRequest( 'com_allvideoshare.search', 'q', '', 'string' );
$this->setHeaders();
parent::display( $tpl );
}
public function setHeaders() {
$doc = JFactory::getDocument();
if ( $this->config->load_bootstrap_css ) {
$doc->addStyleSheet( AllVideoShareUtils::prepareURL( 'components/com_allvideoshare/assets/css/bootstrap.css' ), 'text/css', 'screen' );
}
if ( $this->config->load_icomoon_font ) {
$doc->addStyleSheet( JURI::root( true ) . '/media/jui/css/icomoon.css', 'text/css', 'screen' );
}
if ( $this->popup ) {
$doc->addStyleSheet( AllVideoShareUtils::prepareURL( 'components/com_allvideoshare/assets/magnific-popup/magnific-popup.css' ), 'text/css', 'screen' );
}
$doc->addStyleSheet( AllVideoShareUtils::prepareURL( 'components/com_allvideoshare/assets/css/allvideoshare.css' ), 'text/css', 'screen' );
if ( ! empty( $this->config->custom_css ) ) {
$doc->addStyleDeclaration( $this->config->custom_css );
}
if ( $this->popup ) {
JHtml::_( 'jquery.framework' );
$doc->addScript( AllVideoShareUtils::prepareURL( 'components/com_allvideoshare/assets/magnific-popup/jquery.magnific-popup.min.js' ) );
$doc->addScript( AllVideoShareUtils::prepareURL( 'components/com_allvideoshare/assets/js/allvideoshare.js' ) );
}
}
}