<?php
defined('_JEXEC') or die( 'Restricted access' );
class highslide {
/**
* Import files to header
*
* @return array
*/
function importFiles() {
return array(
'highslide-full.min.js',
'highslide.css'
);
}
/**
* Script declaration
*
* @param $params
* @return string
*/
function scriptDeclaration($params = null) {
// define database parameters
$outlineType = $params->get('outlineType', 'rounded-white');
$outlineWhileAnimating = (int) $params->get('outlineWhileAnimating', 1);
$expandDuration = (int) $params->get('expandDuration', 250);
$anchor = $params->get('anchor', 'auto');
$align = $params->get('align', 'auto');
$transitions = $params->get('transitions', 'expand');
$dimmingOpacity = $params->get('dimmingOpacity', '0');
// end
// define script parameters
switch ($outlineWhileAnimating)
{
case 1:
$outlineWhileAnimating = 'true';
break;
case 0:
$outlineWhileAnimating = 'false';
break;
default:
$outlineWhileAnimating = 'true';
break;
}
switch ($transitions)
{
case 'expand':
$transitions = '["expand"]';
break;
case 'fade':
$transitions = '["fade"]';
break;
case 'expand+fade':
$transitions = '["expand", "fade"]';
break;
case 'fade+expand':
$transitions = '["fade", "expand"]';
break;
default:
$transitions = '["expand"]';
break;
}
// end
$script = "
<!--
hs.graphicsDir = '" . JScriptegrator::folder(). "/libraries/highslide/graphics/';
hs.outlineType = '" . $outlineType . "';
hs.outlineWhileAnimating = " . $outlineWhileAnimating . ";
hs.expandDuration = " . $expandDuration . ";
hs.anchor = '" . $anchor . "';
hs.align = '" . $align . "';
hs.transitions = " . $transitions . ";
hs.dimmingOpacity = " . $dimmingOpacity . ";
hs.lang = {
loadingText : '" . JText::_('CDS_LOADING', true). "',
loadingTitle : '" . JText::_('CDS_CANCELCLICK', true). "',
focusTitle : '" . JText::_('CDS_FOCUSCLICK', true). "',
fullExpandTitle : '" . JText::_('CDS_FULLEXPANDTITLE', true). "',
fullExpandText : '" . JText::_('CDS_FULLEXPANDTEXT', true). "',
previousText : '" . JText::_('CDS_PREVIOUSTEXT', true). "',
previousTitle : '" . JText::_('CDS_PREVIOUSTITLE', true). "',
nextText : '" . JText::_('CDS_NEXTTEXT', true). "',
nextTitle : '" . JText::_('CDS_NEXTTITLE', true). "',
moveTitle : '" . JText::_('CDS_MOVETITLE', true). "',
moveText : '" . JText::_('CDS_MOVETEXT', true). "',
closeText : '" . JText::_('CDS_CLOSETITLE', true). "',
closeTitle : '" . JText::_('CDS_CLOSETEXT', true). "',
resizeTitle : '" . JText::_('CDS_RESIZETITLE', true). "',
playText : '" . JText::_('CDS_PLAYTEXT', true). "',
playTitle : '" . JText::_('CDS_PLAYTITLE', true). "',
pauseText : '" . JText::_('CDS_PAUSETEXT', true). "',
pauseTitle : '" . JText::_('CDS_PAUSETITLE', true). "',
number : '" . JText::_('CDS_NUMBER', true). "',
restoreTitle : '" . JText::_('CDS_RESTORETITLE', true). "'
};
//-->
";
return $script;
}
}
?>