function doTransMenuFree($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/transmenu_Packed.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 .= transMenuStyleFree($swmenufree);
        $str .= "\n-->\n";
        $str .= "</style>\n";
        $doc =& JFactory::getDocument();
        $doc->addCustomTag($str);
    }
    $str = transMenuFree($ordered, $swmenufree);
    return $str;
}
Exemple #2
0
function doTransMenuPreview($ordered, $swmenufree)
{
    echo '<script type="text/javascript" src="../modules/mod_swmenufree/transmenu_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 transMenuStyleFree($swmenufree);
        echo "\n-->\n";
        echo "</style>\n";
    }
    echo "<center>";
    echo transMenuFree($ordered, $swmenufree);
    echo changeBgColor();
    echo "</center>";
}