1
0
mirror of https://github.com/e107inc/e107.git synced 2025-06-04 09:54:56 +02:00

Restored phpinfo link in jayya theme. Added 'home' sub-links in admin.

This commit is contained in:
CaMer0n 2011-05-05 08:21:04 +00:00
parent 4b5e9dfc3f
commit f0f20dae7a
3 changed files with 123 additions and 64 deletions

View File

@ -503,6 +503,8 @@ if(varsettrue($pref['admin_separate_plugins']))
$admin_cat['img'][6] = E_16_CAT_PLUG; $admin_cat['img'][6] = E_16_CAT_PLUG;
$admin_cat['lrg_img'][6] = E_32_CAT_PLUG; $admin_cat['lrg_img'][6] = E_32_CAT_PLUG;
$admin_cat['sort'][6] = false; $admin_cat['sort'][6] = false;
} }
else else
{ {
@ -532,11 +534,11 @@ attribute 5 = category
2 - users 2 - users
3 - content 3 - content
4 - tools (maintenance) 4 - tools (maintenance)
5 - plugins/misc 5 - manage
6 - manage 6 - plugins/misc
7 - user-category 7 - user-category ?
8 - user-category etc. 8 - user-category etc. ?
20 - help 20 - help

View File

@ -439,7 +439,7 @@ if ($e107_popup != 1)
*/ */
function e_admin_menu($title, $active_page, $e107_vars, $tmpl = array(), $sub_link = false, $sortlist = false) function e_admin_menu($title, $active_page, $e107_vars, $tmpl = array(), $sub_link = false, $sortlist = false)
{ {
global $E_ADMIN_MENU,$e107; global $E_ADMIN_MENU;
if (!$tmpl) if (!$tmpl)
$tmpl = $E_ADMIN_MENU; $tmpl = $E_ADMIN_MENU;
@ -555,7 +555,8 @@ if ($e107_popup != 1)
if ($sub_link || empty($title)) if ($sub_link || empty($title))
return $text; return $text;
$e107->ns->tablerender($title, $text, array('id'=>$id, 'style'=>'button_menu')); $ns = e107::getRender();
$ns->tablerender($title, $text, array('id'=>$id, 'style'=>'button_menu'));
return ''; return '';
} }

View File

@ -982,14 +982,21 @@ class admin_shortcodes
*/ */
} }
/**
* Legacy Admin Menu Routine.
* Currently Used by Jayya admin.
*/
function sc_admin_alt_nav($parm) function sc_admin_alt_nav($parm)
{ {
if (ADMIN) if (ADMIN)
{ {
global $sql, $pref, $tp; global $sql, $pref, $tp;
parse_str($parm); parse_str($parm);
require(e_ADMIN.'ad_links.php'); require(e_ADMIN.'ad_links.php');
require_once(e_HANDLER.'admin_handler.php'); require_once(e_HANDLER.'admin_handler.php');
function adnav_cat($cat_title, $cat_link, $cat_img, $cat_id=FALSE) function adnav_cat($cat_title, $cat_link, $cat_img, $cat_id=FALSE)
{ {
$cat_link = ($cat_link ? $cat_link : "javascript:void(0);"); $cat_link = ($cat_link ? $cat_link : "javascript:void(0);");
@ -1002,6 +1009,8 @@ class admin_shortcodes
return $text; return $text;
} }
function adnav_main($cat_title, $cat_link, $cat_img, $cat_id=FALSE, $cat_highlight='') function adnav_main($cat_title, $cat_link, $cat_img, $cat_id=FALSE, $cat_highlight='')
{ {
@ -1019,6 +1028,8 @@ class admin_shortcodes
$text .= "</a>"; $text .= "</a>";
return $text; return $text;
} }
if (file_exists(THEME.'nav_menu.js')) if (file_exists(THEME.'nav_menu.js'))
{ {
$text = "<script type='text/javascript' src='".THEME_ABS."nav_menu.js'></script>"; $text = "<script type='text/javascript' src='".THEME_ABS."nav_menu.js'></script>";
@ -1032,9 +1043,10 @@ class admin_shortcodes
<tr><td> <tr><td>
<div class='menuBar' style='width: 100%'>"; <div class='menuBar' style='width: 100%'>";
$text .= adnav_cat(ADLAN_151, e_ADMIN.'admin.php', E_16_NAV_MAIN); $text .= adnav_cat(ADLAN_151, e_ADMIN.'admin.php', E_16_NAV_MAIN); // Main Link.
for ($i = 1; $i < 6; $i++) // Render Settings, Users, Content, Tools, Manage.
for ($i = 1; $i < 7; $i++)
{ {
$ad_tmpi = 0; $ad_tmpi = 0;
@ -1109,25 +1121,33 @@ class admin_shortcodes
$text .= "</div>"; $text .= "</div>";
} }
$text .= adnav_cat(ADLAN_CL_8, '', E_16_CAT_ABOUT, 'docsMenu'); //E_16_NAV_DOCS
$text .= "<div id='docsMenu' class='menu' onmouseover=\"menuMouseover(event)\">"; // Render the "About" Menu - Phpinfo, Credits and Docs.
if (!is_readable(e_DOCS.e_LANGUAGE."/")) // warning killed $text .= adnav_cat(ADLAN_CL_20, '', E_16_CAT_ABOUT, $admin_cat['id'][20]); //E_16_NAV_DOCS
$text .= "<div id='".$admin_cat['id'][20]."' class='menu' onmouseover=\"menuMouseover(event)\">";
foreach($ad_links_array as $key=>$nav_extract)
{ {
$handle=opendir(e_DOCS.'English/'); $text .= ($nav_extract[4]==20) ? adnav_main($nav_extract[1], $nav_extract[0], $nav_extract[5]) : "";
}
$i=1;
if(varset($handle))
{
while ($file = readdir($handle))
{
if ($file != '.' && $file != '..' && $file != 'CVS')
{
$text .= adnav_main(str_replace('_', ' ', $file), e_ADMIN_ABS.'docs.php?'.$i, E_16_DOCS);
$i++;
}
}
closedir($handle);
} }
// if (!is_readable(e_DOCS.e_LANGUAGE."/")) // warning killed
// {
// $handle=opendir(e_DOCS.'English/');
// }
// $i=1;
// if(varset($handle))
// {
// while ($file = readdir($handle))
// {
// if ($file != '.' && $file != '..' && $file != 'CVS')
// {
// $text .= adnav_main(str_replace('_', ' ', $file), e_ADMIN_ABS.'docs.php?'.$i, E_16_DOCS);
// $i++;
// }
// }
// closedir($handle);
// }
$text .= '</div>'; $text .= '</div>';
@ -1154,14 +1174,18 @@ class admin_shortcodes
} }
} }
/**
* New Admin Navigation Routine.
*/
function sc_admin_navigation($parm) function sc_admin_navigation($parm)
{ {
if (!ADMIN) return ''; if (!ADMIN) return '';
global $admin_cat, $array_functions, $array_sub_functions, $pref; global $admin_cat, $array_functions, $array_sub_functions, $pref;
$e107 = &e107::getInstance(); $tp = e107::getParser();
$sql = &$e107->sql; $e107 = e107::getInstance();
$sql = e107::getDb();
parse_str($parm, $parms); parse_str($parm, $parms);
$tmpl = strtoupper(varset($parms['tmpl'], 'E_ADMIN_NAVIGATION')); $tmpl = strtoupper(varset($parms['tmpl'], 'E_ADMIN_NAVIGATION'));
@ -1233,6 +1257,7 @@ class admin_shortcodes
if($tmp) $menu_vars[$catid]['sub'][$key] = $tmp; if($tmp) $menu_vars[$catid]['sub'][$key] = $tmp;
} }
//PLUGINS //PLUGINS
require_once(e_HANDLER.'plugin_class.php'); require_once(e_HANDLER.'plugin_class.php');
$plug = new e107plugin; $plug = new e107plugin;
@ -1340,6 +1365,34 @@ class admin_shortcodes
$menu_vars['home']['image'] = "<img src='".E_16_NAV_LEAV."' alt='".ADLAN_151."' class='icon S16' />"; $menu_vars['home']['image'] = "<img src='".E_16_NAV_LEAV."' alt='".ADLAN_151."' class='icon S16' />";
$menu_vars['home']['image_src'] = ADLAN_151; $menu_vars['home']['image_src'] = ADLAN_151;
$menu_vars['home']['perm'] = ''; $menu_vars['home']['perm'] = '';
$menu_vars['home']['sort'] = 1;
$menu_vars['home']['sub_class'] = 'sub';
// Sub Links for 'home'.
require_once(e_HANDLER."sitelinks_class.php");
$slinks = new sitelinks;
$slinks->getlinks(1);
$tmp = array();
$c= 0;
foreach($slinks->eLinkList['head_menu'] as $k=>$lk)
{
$subid = 'home_'.$k;
$subid = $c;
$link = (substr($lk['link_url'],0,1)!="/" && substr($lk['link_url'],0,3)!="{e_" && substr($lk['link_url'],0,4)!='http') ? "{e_BASE}".$lk['link_url'] : $lk['link_url'];
$tmp[$c]['text'] = $tp->toHtml($lk['link_name'],'','defs');
$tmp[$c]['description'] = $tp->toHtml($lk['link_description'],'','defs');
$tmp[$c]['link'] = $tp->replaceConstants($link,'full');
$tmp[$c]['image'] = "<img class='icon S16' src='".$tp->replaceConstants($lk['link_button'])."' alt='' />"; ;
$tmp[$c]['image_large'] = '';
$tmp[$c]['image_src'] = '';
$tmp[$c]['image_large_src'] = '';
$tmp[$c]['perm'] = '';
$c++;
}
$menu_vars['home']['sub'] = $tmp;
// --------------------
$menu_vars['logout']['text'] = ADLAN_46; $menu_vars['logout']['text'] = ADLAN_46;
$menu_vars['logout']['link'] = e_ADMIN_ABS.'admin.php?logout'; $menu_vars['logout']['link'] = e_ADMIN_ABS.'admin.php?logout';
@ -1348,9 +1401,12 @@ class admin_shortcodes
$menu_vars['logout']['perm'] = ''; $menu_vars['logout']['perm'] = '';
} }
return e_admin_menu('', '', $menu_vars, $$tmpl, false, false); // print_a($menu_vars);
return e_admin_menu('', '', $menu_vars, $$tmpl, FALSE, FALSE);
} }
function sc_admin_menumanager() // List all menu-configs for easy-navigation function sc_admin_menumanager() // List all menu-configs for easy-navigation
{ {
global $pref; global $pref;