function doGosuMenuFree($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 = "";
    $headtag = "<script type=\"text/javascript\" src=\"" . $live_site . "/modules/mod_swmenufree/DropDownMenuX.js\"></script>\n";
    $doc =& JFactory::getDocument();
    $doc->addCustomTag($headtag);
    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 .= gosuMenuStyleFree($swmenufree);
        $str .= "\n-->\n";
        $str .= "</style>\n";
        $doc =& JFactory::getDocument();
        $doc->addCustomTag($str);
    }
    $str = GosuMenuFree($ordered, $swmenufree);
    return $str;
}
示例#2
0
function doGosuMenuPreview($ordered, $swmenufree)
{
    echo '<script type="text/javascript" src="../modules/mod_swmenufree/DropDownMenuX_Packed.js"></script>';
    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 gosuMenuStyleFree($swmenufree);
        echo "\n-->\n";
        echo "</style>\n";
    }
    // echo "</head><body>";
    echo GosuMenuFree($ordered, $swmenufree);
    echo changeBgColor();
    // echo "</body></html>";
}