1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

More Menu-Manager Enhancements. - easier to find those menu-config pages now.

This commit is contained in:
CaMer0n 2009-07-12 10:11:35 +00:00
parent 8fa5d97fde
commit 28f2146f1e
6 changed files with 153 additions and 38 deletions

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/menus.php,v $
| $Revision: 1.26 $
| $Date: 2009-07-11 01:48:40 $
| $Revision: 1.27 $
| $Date: 2009-07-12 10:11:34 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@ -115,6 +115,7 @@ class menuManager{
$this->dragDrop = $dragdrop;
if($this->dragDrop)
{
@ -169,17 +170,19 @@ class menuManager{
$menu_array = $this->parseheader($HEADER.$FOOTER, 'check');
sort($menu_array, SORT_NUMERIC);
$menu_check = 'set';
foreach ($menu_array as $menu_value)
if($menu_array)
{
if ($menu_value != $menu_check)
sort($menu_array, SORT_NUMERIC);
$menu_check = 'set';
foreach ($menu_array as $menu_value)
{
$this->menu_areas[] = $menu_value;
if ($menu_value != $menu_check)
{
$this->menu_areas[] = $menu_value;
}
$menu_check = $menu_value;
}
$menu_check = $menu_value;
}
}
$this->menuModify();
@ -202,6 +205,8 @@ class menuManager{
$this->menuSetPreset();
}
$this->menuSetConfigList(); // Update Active MenuConfig List.
}
// -------------------------------------------------------------------------
@ -1165,6 +1170,51 @@ class menuManager{
}
function menuSetConfigList()
{
global $sql,$pref;
$sql -> db_Select("menus", "*", "menu_location != 0 ORDER BY menu_path");
while($row = $sql-> db_Fetch())
{
$link = "";
extract($row);
$id = substr($menu_path,0,-1);
if (file_exists(e_PLUGIN."{$menu_path}{$menu_name}_menu_config.php"))
{
$link = "{$menu_path}{$menu_name}_menu_config.php";
}
if(file_exists(e_PLUGIN."{$menu_path}config.php"))
{
$link = "{$menu_path}config.php";
}
if($link)
{
$tmp[$id]['name'] = ucwords(str_replace("_menu","",$menu_name));
if($prev == $id)
{
$tmp[$id]['name'] .= ":".$prev_name;
}
$tmp[$id]['link'] = $link;
$prev = $id;
$prev_name = $tmp[$id]['name'];
}
}
$pref['menuconfig_list'] = $tmp;
save_prefs();
}
} // end of Class.
require_once("footer.php");
@ -1271,6 +1321,14 @@ function headerjs()
*/
return $ret;
}
function menus_adminmenu()
{
}
?>

View File

@ -1,7 +1,7 @@
<?php
/*
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id: admin_shortcodes.php,v 1.2 2009-01-10 11:42:19 secretr Exp $
* $Id: admin_shortcodes.php,v 1.3 2009-07-12 10:11:35 e107coders Exp $
*
* Admin shortcode batch - registration
*/
@ -30,6 +30,7 @@ $codes = array(
'admin_status',
'admin_update',
'admin_userlan',
'admin_menumanager',
);
register_shortcode('admin_shortcodes', $codes, e_FILE.'shortcode/batch/admin_shortcodes_class.php');

View File

@ -1,7 +1,7 @@
<?php
/*
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id: admin_shortcodes_class.php,v 1.7 2009-07-09 08:31:37 e107coders Exp $
* $Id: admin_shortcodes_class.php,v 1.8 2009-07-12 10:11:35 e107coders Exp $
*
* Admin shortcode batch - class
*/
@ -436,9 +436,11 @@ class admin_shortcodes
if (ADMIN)
{
global $ns, $pref;
ob_start();
//Show upper_right menu if the function exists
$tmp = explode('.',e_PAGE);
$adminmenu_func = $tmp[0].'_adminmenu';
if(function_exists($adminmenu_func))
{
@ -923,7 +925,7 @@ class admin_shortcodes
{
/*
* e107 website system (c) 2001-2008 Steve Dunstan (e107.org)
* $Id: admin_shortcodes_class.php,v 1.7 2009-07-09 08:31:37 e107coders Exp $
* $Id: admin_shortcodes_class.php,v 1.8 2009-07-12 10:11:35 e107coders Exp $
*/
if (ADMIN)
@ -1281,6 +1283,40 @@ class admin_shortcodes
return e_admin_menu('', '', $menu_vars, $$tmpl, false, false);
}
function get_admin_menumanager() // List all menu-configs for easy-navigation
{
global $pref;
$var['menumanager']['text'] = ADLAN_151; // Main
$var['menumanager']['link'] = e_ADMIN_ABS."menus.php";
foreach($pref['menuconfig_list'] as $name=>$val)
{
$var[$name]['text'] = str_replace(":"," / ",$val['name']);
$var[$name]['link'] = e_PLUGIN_ABS.$val['link'];
}
foreach($var as $key=>$link)
{
if(strpos(e_SELF,$link['link']))
{
$action = $key;
}
}
if(!$action)
{
return;
}
// $keys = array_keys($var);
// $action = (in_array($this->action,$keys)) ? $this->action : "installed";
e_admin_menu(ADLAN_6, $action, $var);
}
}

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $
| $Revision: 1.32 $
| $Date: 2009-07-10 14:25:22 $
| $Revision: 1.33 $
| $Date: 2009-07-12 10:11:35 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@ -644,7 +644,7 @@ class themeHandler{
$itext .= "</td>
<td style='vertical-align:top'>";
$itext .= ($pref['sitetheme_deflayout'] != $key) ? "<input type='text' style='width:97%' name='custompages[".$key."]' value=\"".implode(" ",$pref['sitetheme_custompages'][$key])."\" />\n" : TPVLAN_55; // Default
$itext .= ($pref['sitetheme_deflayout'] != $key) ? "<input type='text' style='width:97%' name='custompages[".$key."]' value=\"".(isset($pref['sitetheme_custompages'][$key]) ? implode(" ",$pref['sitetheme_custompages'][$key]) : "")."\" />\n" : TPVLAN_55; // Default
$itext .= "</td>
</tr>";

View File

@ -9,9 +9,9 @@
* Plugin Administration - Online menu
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/online/config.php,v $
* $Revision: 1.2 $
* $Date: 2008-12-21 12:53:48 $
* $Author: e107steved $
* $Revision: 1.3 $
* $Date: 2009-07-12 10:11:35 $
* $Author: e107coders $
*
*/
$eplug_admin = TRUE;
@ -53,54 +53,71 @@ function defaultpref(){
}
$text = "<div style='text-align:center'>
<form method='post' action='".e_SELF."' name='menu_form'>
<table style='".ADMIN_WIDTH."' class='fborder' >
<form method='post' action='".e_SELF."' id='menu_form'>
<fieldset id='core-menu-config-lastseen'>
<legend>".LAN_ONLINE_ADMIN_1."</legend>
<table cellpadding='0' cellspacing='0' class='adminform'>
<colgroup span='2'>
<col class='col-label' />
<col class='col-control' />
</colgroup>
<tr><td class='fcaption' colspan='2'>".LAN_ONLINE_ADMIN_1."</td></tr>
<tr>
<td style='width:40%' class='forumheader3'>".LAN_ONLINE_ADMIN_2."</td>
<td style='width:60%' class='forumheader3'>
<td >".LAN_ONLINE_ADMIN_2."</td>
<td class='forumheader3'>
<input class='tbox' type='text' name='online_ls_caption' size='30' value='".$tp->toHTML($menu_pref['online_ls_caption'],"","defs")."' maxlength='200' />
</td>
</tr>
<tr>
<td style='width:40%' class='forumheader3'>".LAN_ONLINE_ADMIN_3."</td>
<td style='width:60%' class='forumheader3'>
<td>".LAN_ONLINE_ADMIN_3."</td>
<td>
<input class='tbox' type='text' name='online_ls_amount' size='3' value='".intval($menu_pref['online_ls_amount'])."' maxlength='3' />
</td>
</tr>
</table>
</fieldset>
<fieldset id='core-menu-config-online'>
<legend>".LAN_ONLINE_ADMIN_4."</legend>
<table cellpadding='0' cellspacing='0' class='adminform'>
<colgroup span='2'>
<col class='col-label' />
<col class='col-control' />
</colgroup>
<tr><td class='fcaption' colspan='2'>".LAN_ONLINE_ADMIN_4."</td></tr>
<tr>
<td style='width:40%' class='forumheader3'>".LAN_ONLINE_ADMIN_5."</td>
<td style='width:60%' class='forumheader3'>
<td>".LAN_ONLINE_ADMIN_5."</td>
<td>
<input class='tbox' type='text' name='online_caption' size='30' value='".$tp->toHTML($menu_pref['online_caption'],"","defs")."' maxlength='200' />
</td>
</tr>
<tr>
<td style='width:40%' class='forumheader3'>".LAN_ONLINE_ADMIN_6."</td>
<td style='width:60%' class='forumheader3'>
<td>".LAN_ONLINE_ADMIN_6."</td>
<td>
<input type='radio' value='1' id='online_show_memberlist1' name='online_show_memberlist' ".(varsettrue($menu_pref['online_show_memberlist']) ? "checked='checked'" : "")." /> ".LAN_ONLINE_ADMIN_ENABLED."
<input type='radio' value='0' id='online_show_memberlist0' name='online_show_memberlist' ".(varsettrue($menu_pref['online_show_memberlist']) ? "" : "checked='checked'")." /> ".LAN_ONLINE_ADMIN_DISABLED."
</td>
</tr>
<tr>
<td style='width:40%' class='forumheader3'>".LAN_ONLINE_ADMIN_7."</td>
<td style='width:60%' class='forumheader3'>
<td>".LAN_ONLINE_ADMIN_7."</td>
<td>
<input type='radio' value='1' id='online_show_memberlist_extended1' name='online_show_memberlist_extended' ".(varsettrue($menu_pref['online_show_memberlist_extended']) ? "checked='checked'" : "")." /> ".LAN_ONLINE_ADMIN_ENABLED."
<input type='radio' value='0' id='online_show_memberlist_extended0' name='online_show_memberlist_extended' ".(varsettrue($menu_pref['online_show_memberlist_extended']) ? "" : "checked='checked'")." /> ".LAN_ONLINE_ADMIN_DISABLED."
</td>
</tr>
<tr>
<td colspan='2' class='forumheader' style='text-align:center'><input class='button' type='submit' name='update_menu' value='".LAN_UPDATE."' /></td>
</tr>
</table>
<div class='buttons-bar center'>
<input class='button' type='submit' name='update_menu' value='".LAN_UPDATE."' />
</div>
</fieldset>
</form>
</div>";

View File

@ -9,9 +9,9 @@
* Admin template - _blank theme
*
* $Source: /cvs_backup/e107_0.8/e107_themes/_blank/admin_template.php,v $
* $Revision: 1.11 $
* $Date: 2009-01-15 15:42:24 $
* $Author: secretr $
* $Revision: 1.12 $
* $Date: 2009-07-12 10:11:35 $
* $Author: e107coders $
*
*/
@ -69,6 +69,7 @@ $ADMIN_FOOTER = "
{SETSTYLE=admin_menu}
{ADMIN_MENU}
{ADMIN_MENUMANAGER}
{ADMIN_PRESET}
{SETSTYLE=none}
@ -81,7 +82,9 @@ $ADMIN_FOOTER = "
{ADMIN_UPDATE}
{SETSTYLE=site_info}
{ADMIN_HELP}
</div>
</td>
</tr>