Esempio n. 1
0
	function _getClonerOptions(&$node)
	{
		$attrs = $node->attributes();
		$optAttrs = array();
		foreach ($attrs as $key => $value)
		{
			if (strpos($key, 'opt_') !== 0)
				continue;
				
			$optAttrs[$key] = JText::_($value);
		}

		$params = AriParametersHelper::flatParametersToArray($optAttrs);
		$clonerOptions = AriParametersHelper::getUniqueOverrideParameters(
			array(
				'numFormat' => '#{$num}.',
				'enableNumFormat' => true,
				'defaultItemCount' => 3,
				'message' => array(
					'removeConfirm' => 'Are you sure you want to remove this item?',
					'removeAllConfirm' => 'Are you sure you want to remove all items?'
				)
			), 
			isset($params['opt']) ? $params['opt'] : array(),
			true);
			
		return count($clonerOptions) > 0 ? $clonerOptions : new stdClass();
	}
AriKernel::import('Web.HtmlHelper');
AriKernel::import('Web.JSON.JSONHelper');
AriKernel::import('Parameters.ParametersHelper');
AriKernel::import('SexyLightbox.SexyLightbox');

$params->set('key', 'arisexybox_mod_' . $module->id);
$params->set('checkSum', md5($module->params));
$groupName = $params->get('groupName');
$thumbQuality = intval($params->get('thumbQuality', 80), 10);
if (!defined('ASIDO_GD_JPEG_QUALITY'))
	define('ASIDO_GD_JPEG_QUALITY', $thumbQuality);

if (empty($groupName)) $params->set('groupName', uniqid('asexy_'));
$autoShow = $params->get('autoShow');
$showOnClose = $params->get('showOnClose');
$mParams = AriParametersHelper::flatParametersToArray($params);
AriSexyLightboxHelper::includeAssets(
	AriUtils2::parseValueBySample($params->get('includeJQuery'), true),
	AriUtils2::parseValueBySample($params->get('noConflict'), true),
	AriUtils2::parseValueBySample($params->get('jQueryVer', '1.4.4'), '1.4.4'),
	AriUtils2::getParam($mParams, 'opt', array()));

AriSexyLightboxHelper::activateAutoShow(
	trim($params->get('groupName', '')), 
	$autoShow, 
	$params->get('unique', 'aslmod_' . $module->id),
	AriUtils2::getParam($mParams, 'cookie'));
	
AriSexyLightboxHelper::activateAutoShowOnClose(
	trim($params->get('groupName', '')),
	$params->get('onCloseMessage'),