Ejemplo n.º 1
0
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;
}
Ejemplo n.º 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>";
}