30 $xoTheme->addStylesheet( XOOPS_URL .
'/xoops.css');
31 $xoTheme->addStylesheet( XOOPS_URL .
'/modules/system/themes/legacy/css/style.css');
35 $xoTheme->addScript(XOOPS_URL .
'/include/layersmenu.js');
36 $xoTheme->addScript(
'',
'',
'
37 var thresholdY = 15; // in pixels; threshold for vertical repositioning of a layer
38 var ordinata_margin = 20; // to start the layer a bit above the mouse vertical coordinate');
40 $xoTheme->addScript(
'',
'',
41 $xoops_admin_menu_js .
'
42 function moveLayers() { '. $xoops_admin_menu_ml .
' }
43 function shutdown() { ' . $xoops_admin_menu_sd .
' }
45 document.onmousedown = function() { shutdown(); }
47 document.onclick = function() { shutdown(); }
49 foreach (array_keys($xoops_admin_menu_ft) as $adm ) {
50 if (in_array($adm, $admin_mids) ) {
51 $admin_menu[
'content'] = $xoops_admin_menu_ft[$adm];
53 $tpl->append_by_ref(
'admin_menu', $admin_menu );
64 echo $xoops_admin_menu_dv;
82 $firstleveltable =
"";
92 foreach ($mods as $mod) {
93 $mid = $mod->getVar(
'mid');
94 $module_name = $mod->getVar(
'name');
95 $module_url =
"\".XOOPS_URL.\"/modules/".$mod->getVar(
'dirname').
"/".trim($mod->getInfo(
'adminindex'));
96 $module_img =
"<img class='admin_layer_img' src='\".XOOPS_URL.\"/modules/".$mod->getVar(
'dirname').
"/".$mod->getInfo(
'image').
"' alt='' />";
97 $module_desc =
"<strong>\"._VERSION.\":</strong> ".round($mod->getVar(
'version')/100 , 2).
"<br /><strong>\"._DESCRIPTION.\":</strong> ".$mod->getInfo(
'description');
101 $js .=
"\nfunction popUpL" .
$mid .
"() {\n shutdown();\n popUp('L" .
$mid .
"',true);}";
102 $moveLayers .=
"\n setleft('L" .
$mid .
"'," . $left .
");\n settop('L" .
$mid .
"'," . $top .
");";
103 $shutdown .=
"\n popUp('L" .
$mid .
"',false);";
104 $firstleveltable .=
"$" .
"xoops_admin_menu_ft[".$mid.
"] = \"<a href='" . $module_url .
"' title='" . $module_name .
"' onmouseover='moveLayerY(\\\"L" .
$mid .
"\\\", currentY, event) ; popUpL" .
$mid .
"(); ' >" . $module_img .
"</a><br />\";\n";
105 $menu_layers .=
"\n<div id='L" .
$mid .
"' style='position: absolute; visibility: hidden; z-index:1000;' >\n<table class='admin_layer' cellpadding='0' cellspacing='0'>\n<tr><th nowrap='nowrap'>" . $module_name .
"</th></tr>\n<tr><td class='even' nowrap='nowrap'>";
109 if ($mod->getVar(
'hasnotification') || ($mod->getInfo(
'config') && is_array($mod->getInfo(
'config'))) || ($mod->getInfo(
'comments') && is_array($mod->getInfo(
'comments')))) {
110 $adminmenu[] = array(
'link' =>
'".XOOPS_URL."/modules/system/admin.php?fct=preferences&op=showmod&mod='.
$mid,
'title' =>
_PREFERENCES,
'absolute' =>
true);
115 $menu_link = trim($menuitem[
'link']);
116 $menu_title = trim($menuitem[
'title']);
117 $menu_target = isset($menuitem[
'target']) ?
" target='" . trim($menuitem[
'target']) .
"'" :
'';
118 if (isset($menuitem[
'absolute']) && $menuitem[
'absolute']) {
119 $menu_link = (empty($menu_link)) ?
"#" : $menu_link;
121 $menu_link = (empty($menu_link)) ?
"#" :
"\".XOOPS_URL.\"/modules/".$mod->getVar(
'dirname').
"/".$menu_link;
124 $menu_layers .=
"\n<img src='\".XOOPS_URL.\"/images/pointer.gif' width='8' height='8' alt='' /> <a href='" . $menu_link .
"'" . $menu_target .
" onmouseover='popUpL" .
$mid .
"' >" .$menu_title.
"</a><br />\n";
128 $menu_layers .=
"\n<div style='margin-top: 5px; font-size: smaller; text-align: right;'><a href='#' onmouseover='shutdown();'>["._CLOSE.
"]</a></div></td></tr><tr><th style='font-size: smaller; text-align: left;'>" . $module_img .
"<br />" . $module_desc .
"</th></tr></table></div>\n";
131 $menu_layers .=
"\n<script language='JavaScript' type='text/javascript'>\n<!--\nmoveLayers();\nloaded = 1;\n// -->\n</script>\n";
134 $content .=
"\$xoops_admin_menu_js = \"".$js.
"\n\";\n\n";
135 $content .=
"\$xoops_admin_menu_ml = \"".$moveLayers.
"\n\";\n\n";
136 $content .=
"\$xoops_admin_menu_sd = \"".$shutdown.
"\n\";\n\n";
137 $content .= $firstleveltable .
"\n";
138 $content .=
"\$xoops_admin_menu_dv = \"".$menu_layers.
"\";\n";
147 if (!
$file = fopen($filename,
"w") ) {
148 echo
'failed open file';
152 echo
'failed write file';