function doSuperfishMenuFree($ordered, $swmenufree) { $live_site = JURI::base(); if (substr($live_site, strlen($live_site) - 1, 1) == "/") { $live_site = substr($live_site, 0, strlen($live_site) - 1); } $str = ""; //$show_shadow=1; if (!$swmenufree['cssload']) { if (substr(swmenuGetBrowserFree(), 0, 5) != "MSIE6" && $swmenufree['padding_hack']) { $swmenufree = fixPaddingFree($swmenufree); } $str .= "\n<style type='text/css'>\n"; $str .= "<!--\n"; $str .= superfishMenuStyleFree($swmenufree); $str .= "\n-->\n"; $str .= "</style>\n"; $doc =& JFactory::getDocument(); $doc->addCustomTag($str); } $headtag = ""; if (!defined('_swjquery_defined')) { $headtag .= "<script type=\"text/javascript\" src=\"" . $live_site . "/modules/mod_swmenufree/jquery-1.6.min.js\"></script>\n"; define('_swjquery_defined', 1); } //$headtag.= "<script type=\"text/javascript\" src=\"".$live_site."/modules/mod_swmenufree/jquery-1.2.6.pack.js\"></script>\n"; //$headtag.= "<script type=\"text/javascript\" src=\"".$live_site."/modules/mod_swmenufree/jquery.topzindex.min.js\"></script>\n"; $headtag .= "<script type=\"text/javascript\" src=\"" . $live_site . "/modules/mod_swmenufree/hoverIntent.js\"></script>\n"; $headtag .= "<script type=\"text/javascript\" src=\"" . $live_site . "/modules/mod_swmenufree/superfish.js\"></script>\n"; $headtag .= "<script type=\"text/javascript\" src=\"" . $live_site . "/modules/mod_swmenufree/supersubs.js\"></script>\n"; $doc =& JFactory::getDocument(); $doc->addCustomTag($headtag); $str = SuperfishMenuFree($ordered, $swmenufree); return $str; }
function doSuperfishMenuPreview($ordered, $swmenufree) { //echo previewHead(); //echo '<script type="text/javascript" src="../modules/mod_swmenufree/jquery.dropshadow.js"></script>'; // echo "<script type=\"text/javascript\" src=\"../modules/mod_swmenufree/jquery-1.2.6.pack.js\"></script>\n"; echo "<script type=\"text/javascript\" src=\"../modules/mod_swmenufree/hoverIntent.js\"></script>\n"; echo "<script type=\"text/javascript\" src=\"../modules/mod_swmenufree/superfish.js\"></script>\n"; echo "<script type=\"text/javascript\" src=\"../modules/mod_swmenufree/supersubs.js\"></script>\n"; if ($swmenufree['preview'] == "CSS") { $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 (substr(swmenuGetBrowserFree(), 0, 5) != "MSIE6" && $swmenufree['padding_hack']) { $swmenufree = fixPaddingFree($swmenufree); } echo "\n<style type='text/css'>\n"; echo "<!--\n"; echo superfishMenuStyleFree($swmenufree); echo "\n-->\n"; echo "</style>\n"; } // echo "</head><body>"; if ($swmenufree['main_width'] == 0 && $swmenufree['orientation'] == "vertical") { echo "<div align=\"center\" style=\"margin:auto;width:200px;\" >"; } else { echo "<div align=\"center\" style=\"margin:auto;\" >"; } echo SuperfishMenuFree($ordered, $swmenufree); echo "</div>"; //echo changeBgColor(); // echo "</body></html>"; }