Example #1
0
function doClickMenu($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('_click_defined')) {
        $headtag = "<script type=\"text/javascript\" src=\"" . $live_site . "/modules/mod_swmenupro/ClickShowHideMenu_Packed.js\"></script>\n";
        $GLOBALS['mainframe']->addCustomHeadTag($headtag);
        define('_click_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 .= ClickMenuStyle($swmenupro, $ordered);
        $str .= "\n-->\n";
        $str .= "</style>\n";
        $GLOBALS['mainframe']->addCustomHeadTag($str);
    }
    $str = ClickMenu($ordered, $swmenupro, $active_menu, $expand);
    return $str;
}
Example #2
0
function doClickMenuPreview($ordered, $swmenupro, $css_load, $active_menu, $expand, $padding_hack)
{
    global $mosConfig_live_site;
    echo previewHead();
    echo '<script type="text/javascript" src="../modules/mod_swmenupro/ClickShowHideMenu_Packed.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 ClickMenuStyle($swmenupro, $ordered);
            echo "\n-->\n";
            echo "</style>\n";
        }
    }
    echo "</head><body>";
    echo ClickMenu($ordered, $swmenupro, $active_menu, $expand);
    echo changeBgColor();
    echo "</body></html>";
}