Esempio n. 1
0
function doPopoutMenu($ordered, $swmenupro, $css_load, $active_menu)
{
    $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('_tigra_defined')) {
        $headtag = "<script type=\"text/javascript\" src=\"" . $live_site . "/modules/mod_swmenupro/menu_Packed.js\"></script>\n";
        $GLOBALS['mainframe']->addCustomHeadTag($headtag);
        define('_tigra_defined', 1);
    }
    if (!$css_load) {
        $str .= "\n<style type='text/css'>\n";
        $str .= "<!--\n";
        $str .= TigraMenuStyle($swmenupro, $ordered);
        $str .= "\n-->\n";
        $str .= "</style>\n";
        $GLOBALS['mainframe']->addCustomHeadTag($str);
    }
    $str = TigraMenu($ordered, $swmenupro, $active_menu);
    return $str;
}
Esempio n. 2
0
function doTigraMenu($ordered, $swmenufree, $active_menu, $css_load, $selectbox_hack, $overlay_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 = "";
    $headtag = "<script type=\"text/javascript\" src=\"" . $live_site . "/modules/mod_swmenufree/menu_Packed.js\"></script>\n";
    if ($overlay_hack) {
        $headtag .= "<script type=\"text/javascript\" src=\"" . $live_site . "/modules/mod_swmenufree/jquery-1.2.6.pack.js\"></script>\n";
    }
    $doc =& JFactory::getDocument();
    $doc->addCustomTag($headtag);
    if (!$css_load) {
        $str .= "\n<style type='text/css'>\n";
        $str .= "<!--\n";
        $str .= tigraMenuStyle($swmenufree);
        $str .= "\n-->\n";
        $str .= "</style>\n";
        $doc =& JFactory::getDocument();
        $doc->addCustomTag($str);
    }
    $str = TigraMenu($ordered, $swmenufree, $active_menu, $overlay_hack);
    return $str;
}
Esempio n. 3
0
function doTigraMenuPreview($ordered, $swmenufree, $active_menu, $css_load, $selectbox_hack)
{
    $live_site = JURI::base();
    echo previewHead();
    echo '<script type="text/javascript" src="../modules/mod_swmenufree/menu_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='" . $live_site . "/modules/mod_swmenufree/styles/menu.css' rel='stylesheet' />\n";
        } else {
            //if ((substr(swmenuGetBrowser(),0,5)!="MSIE6")&&$padding_hack){$swmenufree = fixPadding($swmenufree);}
            echo "\n<style type='text/css'>\n";
            echo "<!--\n";
            echo tigraMenuStyle($swmenufree);
            echo "\n-->\n";
            echo "</style>\n";
        }
    }
    echo "</head><body>";
    echo TigraMenu($ordered, $swmenufree, $active_menu, $overlay_hack = 1);
    echo changeBgColor();
    echo "</body></html>";
}
Esempio n. 4
0
function doPopoutMenuPreview($ordered, $swmenupro, $css_load, $active_menu)
{
    global $mosConfig_live_site;
    echo previewHead();
    echo '<script type="text/javascript" src="../modules/mod_swmenupro/menu.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 {
            echo "\n<style type='text/css'>\n";
            echo "<!--\n";
            echo TigraMenuStyle($swmenupro, $ordered);
            echo "\n-->\n";
            echo "</style>\n";
        }
    }
    echo "</head><body>";
    echo TigraMenu($ordered, $swmenupro, $active_menu);
    echo changeBgColor();
    echo "</body></html>";
}