1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02: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). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_admin/menus.php,v $ | $Source: /cvs_backup/e107_0.8/e107_admin/menus.php,v $
| $Revision: 1.26 $ | $Revision: 1.27 $
| $Date: 2009-07-11 01:48:40 $ | $Date: 2009-07-12 10:11:34 $
| $Author: e107coders $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -115,6 +115,7 @@ class menuManager{
$this->dragDrop = $dragdrop; $this->dragDrop = $dragdrop;
if($this->dragDrop) if($this->dragDrop)
{ {
@@ -169,17 +170,19 @@ class menuManager{
$menu_array = $this->parseheader($HEADER.$FOOTER, 'check'); $menu_array = $this->parseheader($HEADER.$FOOTER, 'check');
sort($menu_array, SORT_NUMERIC); if($menu_array)
$menu_check = 'set';
foreach ($menu_array as $menu_value)
{ {
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(); $this->menuModify();
@@ -202,6 +205,8 @@ class menuManager{
$this->menuSetPreset(); $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. } // end of Class.
require_once("footer.php"); require_once("footer.php");
@@ -1271,6 +1321,14 @@ function headerjs()
*/ */
return $ret; return $ret;
}
function menus_adminmenu()
{
} }
?> ?>

View File

@@ -1,7 +1,7 @@
<?php <?php
/* /*
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt) * 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 * Admin shortcode batch - registration
*/ */
@@ -30,6 +30,7 @@ $codes = array(
'admin_status', 'admin_status',
'admin_update', 'admin_update',
'admin_userlan', 'admin_userlan',
'admin_menumanager',
); );
register_shortcode('admin_shortcodes', $codes, e_FILE.'shortcode/batch/admin_shortcodes_class.php'); register_shortcode('admin_shortcodes', $codes, e_FILE.'shortcode/batch/admin_shortcodes_class.php');

View File

@@ -1,7 +1,7 @@
<?php <?php
/* /*
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt) * 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 * Admin shortcode batch - class
*/ */
@@ -436,9 +436,11 @@ class admin_shortcodes
if (ADMIN) if (ADMIN)
{ {
global $ns, $pref; global $ns, $pref;
ob_start(); ob_start();
//Show upper_right menu if the function exists //Show upper_right menu if the function exists
$tmp = explode('.',e_PAGE); $tmp = explode('.',e_PAGE);
$adminmenu_func = $tmp[0].'_adminmenu'; $adminmenu_func = $tmp[0].'_adminmenu';
if(function_exists($adminmenu_func)) if(function_exists($adminmenu_func))
{ {
@@ -923,7 +925,7 @@ class admin_shortcodes
{ {
/* /*
* e107 website system (c) 2001-2008 Steve Dunstan (e107.org) * 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) if (ADMIN)
@@ -1281,6 +1283,40 @@ class admin_shortcodes
return e_admin_menu('', '', $menu_vars, $$tmpl, false, false); 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). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $ | $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $
| $Revision: 1.32 $ | $Revision: 1.33 $
| $Date: 2009-07-10 14:25:22 $ | $Date: 2009-07-12 10:11:35 $
| $Author: e107coders $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -644,7 +644,7 @@ class themeHandler{
$itext .= "</td> $itext .= "</td>
<td style='vertical-align:top'>"; <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> $itext .= "</td>
</tr>"; </tr>";

View File

@@ -9,9 +9,9 @@
* Plugin Administration - Online menu * Plugin Administration - Online menu
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/online/config.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/online/config.php,v $
* $Revision: 1.2 $ * $Revision: 1.3 $
* $Date: 2008-12-21 12:53:48 $ * $Date: 2009-07-12 10:11:35 $
* $Author: e107steved $ * $Author: e107coders $
* *
*/ */
$eplug_admin = TRUE; $eplug_admin = TRUE;
@@ -53,54 +53,71 @@ function defaultpref(){
} }
$text = "<div style='text-align:center'> $text = "<div style='text-align:center'>
<form method='post' action='".e_SELF."' name='menu_form'> <form method='post' action='".e_SELF."' id='menu_form'>
<table style='".ADMIN_WIDTH."' class='fborder' > <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 class='fcaption' colspan='2'>".LAN_ONLINE_ADMIN_1."</td></tr>
<tr> <tr>
<td style='width:40%' class='forumheader3'>".LAN_ONLINE_ADMIN_2."</td> <td >".LAN_ONLINE_ADMIN_2."</td>
<td style='width:60%' class='forumheader3'> <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' /> <input class='tbox' type='text' name='online_ls_caption' size='30' value='".$tp->toHTML($menu_pref['online_ls_caption'],"","defs")."' maxlength='200' />
</td> </td>
</tr> </tr>
<tr> <tr>
<td style='width:40%' class='forumheader3'>".LAN_ONLINE_ADMIN_3."</td> <td>".LAN_ONLINE_ADMIN_3."</td>
<td style='width:60%' class='forumheader3'> <td>
<input class='tbox' type='text' name='online_ls_amount' size='3' value='".intval($menu_pref['online_ls_amount'])."' maxlength='3' /> <input class='tbox' type='text' name='online_ls_amount' size='3' value='".intval($menu_pref['online_ls_amount'])."' maxlength='3' />
</td> </td>
</tr> </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 class='fcaption' colspan='2'>".LAN_ONLINE_ADMIN_4."</td></tr>
<tr> <tr>
<td style='width:40%' class='forumheader3'>".LAN_ONLINE_ADMIN_5."</td> <td>".LAN_ONLINE_ADMIN_5."</td>
<td style='width:60%' class='forumheader3'> <td>
<input class='tbox' type='text' name='online_caption' size='30' value='".$tp->toHTML($menu_pref['online_caption'],"","defs")."' maxlength='200' /> <input class='tbox' type='text' name='online_caption' size='30' value='".$tp->toHTML($menu_pref['online_caption'],"","defs")."' maxlength='200' />
</td> </td>
</tr> </tr>
<tr> <tr>
<td style='width:40%' class='forumheader3'>".LAN_ONLINE_ADMIN_6."</td> <td>".LAN_ONLINE_ADMIN_6."</td>
<td style='width:60%' class='forumheader3'> <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='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." <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> </td>
</tr> </tr>
<tr> <tr>
<td style='width:40%' class='forumheader3'>".LAN_ONLINE_ADMIN_7."</td> <td>".LAN_ONLINE_ADMIN_7."</td>
<td style='width:60%' class='forumheader3'> <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='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." <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> </td>
</tr> </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> </table>
<div class='buttons-bar center'>
<input class='button' type='submit' name='update_menu' value='".LAN_UPDATE."' />
</div>
</fieldset>
</form> </form>
</div>"; </div>";

View File

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