function doSlideClick($ordered, $swmenupro, $css_load, $active_menu, $expand, $padding_hack) { $live_site = JURI::base(); if (substr($live_site, strlen($live_site) - 1, 1) == "/") { $live_site = substr($live_site, 0, strlen($live_site) - 1); } $str = ""; if (!defined('_accordian_defined')) { $headtag = "<script type=\"text/javascript\" src=\"" . $live_site . "/modules/mod_swmenupro/prototype.lite.js\"></script>\n"; $headtag .= "<script type=\"text/javascript\" src=\"" . $live_site . "/modules/mod_swmenupro/moo.fx.js\"></script>\n"; $headtag .= "<script type=\"text/javascript\" src=\"" . $live_site . "/modules/mod_swmenupro/moo.fx.pack.js\"></script>\n"; $GLOBALS['mainframe']->addCustomHeadTag($headtag); define('_accordian_defined', 1); } if (!$css_load) { if (substr(swmenuGetBrowser(), 0, 5) != "MSIE6" && $padding_hack) { $swmenupro = fixPadding($swmenupro); } $str .= "\n<style type='text/css'>\n"; $str .= "<!--\n"; $str .= SlideClickStyle($swmenupro, $ordered); $str .= "\n-->\n"; $str .= "</style>\n"; $GLOBALS['mainframe']->addCustomHeadTag($str); } $str = SlideClick($ordered, $swmenupro, $active_menu, $expand); return $str; }
function doSlideClickPreview($ordered, $swmenupro, $css_load, $active_menu, $expand, $padding_hack) { global $mosConfig_live_site; echo previewHead(); echo '<script type="text/javascript" src="../modules/mod_swmenupro/prototype.lite.js"></script>'; echo '<script type="text/javascript" src="../modules/mod_swmenupro/moo.fx.js"></script>'; echo '<script type="text/javascript" src="../modules/mod_swmenupro/moo.fx.pack.js"></script>'; $manual = JRequest::getVar("preview", 0); if ($manual == 1) { $css = JRequest::getVar("filecontent", ''); echo "\n<style type='text/css'>\n"; echo "<!--\n"; echo str_replace("\\", "", $css); echo "\n-->\n"; echo "</style>\n"; } else { if ($css_load) { echo "<link type='text/css' href='../modules/mod_swmenupro/styles/menu" . $swmenupro['id'] . ".css' rel='stylesheet' />\n"; } else { if (substr(swmenuGetBrowser(), 0, 5) != "MSIE6" && $padding_hack) { $swmenupro = fixPadding($swmenupro); } echo "\n<style type='text/css'>\n"; echo "<!--\n"; echo SlideClickStyle($swmenupro, $ordered); echo "\n-->\n"; echo "</style>\n"; } } echo "</head><body>"; if ($swmenupro['orientation'] != "vertical") { echo "<div align='left'>"; } else { echo "<div align='center'>"; } echo SlideClick($ordered, $swmenupro, $active_menu, $expand); echo "</div>" . changeBgColor(); echo "</body></html>"; }