コード例 #1
0
ファイル: preview.php プロジェクト: enjoy2000/smcd
function doTransMenuPreview($ordered, $swmenufree, $active_menu, $sub_indicator, $parent_id, $css_load, $selectbox_hack, $show_shadow, $auto_position, $padding_hack, $overlay_hack = 0)
{
    global $mosConfig_live_site;
    echo previewHead();
    echo '<script type="text/javascript" src="../modules/mod_swmenufree/transmenu_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='" . $mosConfig_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 transMenuStyle($swmenufree, $show_shadow);
            echo "\n-->\n";
            echo "</style>\n";
        }
    }
    echo "</head><body>";
    echo transMenu($ordered, $swmenufree, $active_menu, $sub_indicator, $parent_id, $selectbox_hack, $auto_position, $overlay_hack = 0);
    echo changeBgColor();
    echo "</body></html>";
}
コード例 #2
0
ファイル: functions.php プロジェクト: vnishukov/agere
function doTransMenu($ordered, $swmenupro, $active_menu, $sub_indicator, $parent_id, $css_load, $selectbox_hack, $show_shadow, $padding_hack, $auto_position)
{
    $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('_trans_defined')) {
        $headtag = "<script type=\"text/javascript\" src=\"" . $live_site . "/modules/mod_swmenupro/transmenu_Packed.js\"></script>\n";
        $GLOBALS['mainframe']->addCustomHeadTag($headtag);
        define('_trans_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 .= transMenuStyle($swmenupro, $ordered, $show_shadow);
        $str .= "\n-->\n";
        $str .= "</style>\n";
        $GLOBALS['mainframe']->addCustomHeadTag($str);
    }
    $str = transMenu($ordered, $swmenupro, $active_menu, $sub_indicator, $parent_id, $selectbox_hack, $auto_position);
    return $str;
}
コード例 #3
0
ファイル: mod_swmenufree.php プロジェクト: enjoy2000/smcd
function doTransMenu($ordered, $swmenufree, $active_menu, $sub_indicator, $parent_id, $css_load, $selectbox_hack, $show_shadow, $auto_position, $padding_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/transmenu_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) {
        if (substr(swmenuGetBrowser(), 0, 5) != "MSIE6" && $padding_hack) {
            $swmenufree = fixPadding($swmenufree);
        }
        $str .= "\n<style type='text/css'>\n";
        $str .= "<!--\n";
        $str .= transMenuStyle($swmenufree, $show_shadow);
        $str .= "\n-->\n";
        $str .= "</style>\n";
        $doc =& JFactory::getDocument();
        $doc->addCustomTag($str);
    }
    $str = transMenu($ordered, $swmenufree, $active_menu, $sub_indicator, $parent_id, $selectbox_hack, $auto_position, $overlay_hack);
    return $str;
}