| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /inetpub/wwwroot/icd/plugins/content/sigplus/engines/ |
Upload File : |
<?php
/**
* @file
* @brief sigplus Image Gallery Plus boxplus mouse-over caption engine
* @author Levente Hunyadi
* @version 1.3.1
* @remarks Copyright (C) 2009-2010 Levente Hunyadi
* @remarks Licensed under GNU/GPLv3, see http://www.gnu.org/licenses/gpl-3.0.html
* @see http://hunyadi.info.hu/projects/sigplus
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once JPATH_PLUGINS.DS.'content'.DS.'sigplus'.DS.'params.php';
/**
* Support class for jQuery-based boxplus mouse-over caption engine.
* @see http://hunyadi.info.hu/projects/boxplus/
*/
class SIGPlusBoxPlusCaptionEngine extends SIGPlusCaptionsEngine {
public function getIdentifier() {
return 'boxplus.caption';
}
public function addStyles() {
$document =& JFactory::getDocument();
$document->addStyleSheet(JURI::base(true).'/plugins/content/sigplus/engines/boxplus/caption/css/boxplus.caption.css');
// include style sheet in HTML head section to target Internet Explorer
$this->addCustomTag('<!--[if IE]><link rel="stylesheet" href="'.JURI::base(true).'/plugins/content/sigplus/engines/boxplus/caption/css/boxplus.caption.ie.css" type="text/css" /><![endif]-->');
$this->addCustomTag('<!--[if lt IE 8]><link rel="stylesheet" href="'.JURI::base(true).'/plugins/content/sigplus/engines/boxplus/caption/css/boxplus.caption.ie7.css" type="text/css" /><![endif]-->');
}
public function addScripts($id, $params) {
$this->addJQuery();
$this->addScript('/plugins/content/sigplus/engines/boxplus/caption/js/'.$this->getScriptFilename());
$this->addScript('/plugins/content/sigplus/engines/boxplus/lang/'.$this->getScriptFilename('boxplus.lang'));
$engineservices =& SIGPlusEngineServices::instance();
if ($params->metadata) {
$metadatabox = $engineservices->getMetadataEngine($params->lightbox);
if ($metadatabox) {
$metadatabox->addStyles();
$metadatafun = $metadatabox->getMetadataFunction();
}
}
$language =& JFactory::getLanguage();
list($lang, $country) = explode('-', $language->getTag());
$script =
'__jQuery__("#'.$id.'").boxplusCaptionGallery(__jQuery__.extend('.$this->getCustomParameters($params).', { '.
'caption: function (image) { var c = __jQuery__("#" + image.attr("id") + "_caption"); return c.size() ? c.html() : image.attr("alt"); }, '.
'download:'.($params->download ? 'function (image) { var d = __jQuery__("#" + image.attr("id") + "_metadata a[rel=download]"); return d.size() ? d.attr("href") : false; }' : 'false').', '.
'metadata:'.(isset($metadatafun) ? 'function (image) { var m = __jQuery__("#" + image.attr("id") + "_iptc"); return m.size() ? m : false; }' : 'false').', '.
'dialog:'.(isset($metadatafun) ? $metadatafun : 'false').
' })); '.
'__jQuery__.boxplusLanguage("'.$lang.'", "'.$country.'");';
$this->addOnReadyScript($script);
}
}