AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.94
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/amisdesseniors-fr/valence/components/com_djmediatools/layouts/nivoSlider/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/amisdesseniors-fr/valence/components/com_djmediatools/layouts/nivoSlider//helper.php
<?php
/**
 * @version $Id$
 * @package DJ-MediaTools
 * @copyright Copyright (C) 2017 DJ-Extensions.com, All rights reserved.
 * @license http://www.gnu.org/licenses GNU/GPL
 * @author url: http://dj-extensions.com
 * @author email contact@dj-extensions.com
 * @developer Szymon Woronowski - szymon.woronowski@design-joomla.eu
 *
 * DJ-MediaTools is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * DJ-MediaTools is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with DJ-MediaTools. If not, see <http://www.gnu.org/licenses/>.
 *
 */

// no direct access
defined('_JEXEC') or die ('Restricted access');

class NivoSliderDJMediatoolsLayoutHelper extends DJMediatoolsLayoutHelper {
	
public function getParams(&$params) {
		
		$params = parent::getParams($params);
		
		if(!is_numeric($params->get('thumb_width'))) $params->set('thumb_width', 100);
		if(!is_numeric($params->get('thumb_height'))) $params->set('thumb_height', 100);
		
		return $params;
	}
		
	public function addScripts(&$params) {
		
		$mid = $params->get('gallery_id');
		
		$document = JFactory::getDocument();		
		
		if($params->get('link_image',1)==2) $this->addLightbox($params->get('lightbox','picbox'));
		
		$document->addStyleSheet('components/com_djmediatools/layouts/nivoSlider/css/nivo-slider.css');
		$version = new JVersion;
		if (version_compare($version->getShortVersion(), '3.0.0', '<')) {
			$document->addScript('//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js');
		} else {
			JHtml::_('jquery.framework');
		}
		
		//$canDefer = preg_match('/(?i)msie [6-9]/',$_SERVER['HTTP_USER_AGENT']) ? false : true;
		
		$document->addScript('components/com_djmediatools/layouts/nivoSlider/js/jquery.nivo.slider.pack.js', array('mime'=>'text/javascript', 'defer'=>self::canDefer()));
		//$animationOptions = "{".implode(',', $this->getAnimationOptions($params))."}";
		
		//$js = "jQuery(window).on('load',function() { jQuery('#nivoSlider$mid').nivoSlider({effect: 'random'}); }); ";
		//$document->addScriptDeclaration($js);
	}
	
	public function getStyleSheetParams(&$params) {
		
		$options = parent::getStyleSheetParams($params);
		
		$slide_width = $params->get('image_width');
		$desc_width = $params->get('desc_width');
		$desc_position = $params->get('desc_position');
        $desc_width = (($desc_width / $slide_width) * 100);


		if($desc_position == 'over') {
			$desc_left = $params->get('desc_horizontal');
            $desc_left = (($desc_left / $slide_width) * 100);
            $options['dl'] = $desc_left;
		}


		
		$thumb_width = $params->get('thumb_width');
		//$thumb_height = $params->get('thumb_height');
		
		$options['w'] = $slide_width;
		$options['dw'] = $desc_width;
		

		$options['tw'] = $thumb_width;
		//$options['th'] = $thumb_height;
		
		return $options;
	}
	
}


Anon7 - 2022
AnonSec Team