$param = $config->attributes()->backgroundColor; $params->set('backgroundColor', $param); } else { // Background for config file .xml $backgroundColor = $params->get('backgroundColor'); $backgroundColor = preg_replace("/^#/", "0x", $backgroundColor); $params->set('backgroundColor', $backgroundColor); if ($config_custom == "-1") { modVinaoraSlickshowHelper::createConfig($config_name, $params); } } // Add SWFObject Library to <head> tag modVinaoraSlickshowHelper::addSWFObject($params->get('swfobject_source'), $params->get('swfobject_version')); // Initialize variables $media = modVinaoraSlickshowParam::getPath('media/mod_vinaora_slickshow/'); $config_path = modVinaoraSlickshowParam::getPath($config_name); $stage_path = $media . 'flash/vinaora_slickshow.swf'; $expressInstall_path = $media . 'js/swfobject/expressInstall.swf'; $flash_version = '9.0.124'; // Get flash params $flash_wmode = $params->get('flash_wmode'); $width = $params->get('width'); $height = $params->get('height'); // Background for script $backgroundColor = $params->get('backgroundColor'); $backgroundColor = preg_replace("/^0x/", "#", $backgroundColor); $container = 'vinaora-slick-slideshow' . $module_id; // Get border parameters $border_width = intval($params->get('border_width', 0)); $border_color = $params->get('border_color', '#ffffff'); $border_style = $params->get('border_style', 'solid');
private static function &_createItem(&$node, $params, $path, $position = 1) { // Create Element - <banner>.<items>.<item> $nodeL1 =& $node->addChild('item'); // Create Element - <banner>.<items>.<item>.<title> $param = $params->get('item_title'); $param = str_replace('|', "\r\n", $param); $param = modVinaoraSlickshowParam::getParam($param, $position, "\n"); $param = trim($param); // $param = '<![CDATA[' .$param . ']]>'; $nodeL2 =& $nodeL1->addChild('title', $param); // Create Element - <banner>.<items>.<item>.<path> $param = $path; $nodeL2 =& $nodeL1->addChild('path', $param); // Create Element - <banner>.<items>.<item>.<url> $param = $params->get('item_url'); $param = str_replace("|", "\r\n", $param); $param = modVinaoraSlickshowParam::getParam($param, $position, "\n"); $param = trim($param); $nodeL2 =& $nodeL1->addChild('url', $param); // Create Element - <banner>.<items>.<item>.<target> $param = $params->get('item_target'); $param = str_replace("|", "\r\n", $param); $param = modVinaoraSlickshowParam::getParam($param, $position, "\n"); $param = trim($param); $param = modVinaoraSlickshowParam::validTarget($param); $nodeL2 =& $nodeL1->addChild('target', $param); // Create Element - <banner>.<items>.<item>.<bar_color> $param = $params->get('item_bar_color'); $param = str_replace("|", "\r\n", $param); $param = modVinaoraSlickshowParam::getParam($param, $position, "\n"); $param = trim($param); if (empty($param)) { $param = $params->get('barColor'); } else { $param = modVinaoraSlickshowParam::validColor($param, substr($params->get("barColor"), -6, 6), "0x"); } $nodeL2 =& $nodeL1->addChild('bar_color', $param); // Create Element - <banner>.<items>.<item>.<bar_transparency> $param = $params->get('item_bar_transparency'); $param = str_replace("|", "\r\n", $param); $param = modVinaoraSlickshowParam::getParam($param, $position, "\n"); $param = trim($param); if (empty($param)) { $param = $params->get("barTransparency"); } else { $param = modVinaoraSlickshowParam::validTransparency($param); } $nodeL2 =& $nodeL1->addChild('bar_transparency', $param); // Create Element - <banner>.<items>.<item>.<slideShowTime> $param = $params->get('item_slideShowTime'); $param = str_replace("|", "\r\n", $param); $param = modVinaoraSlickshowParam::getParam($param, $position, "\n"); $param = trim($param); if ($param == "") { $param = $params->get("slideShowTime"); } else { $param = abs(intval($param)); } $nodeL2 =& $nodeL1->addChild('slideShowTime', $param); return $node; }