diff options
author | vdigital <vdigital@piwigo.org> | 2008-10-04 22:52:48 +0000 |
---|---|---|
committer | vdigital <vdigital@piwigo.org> | 2008-10-04 22:52:48 +0000 |
commit | 28ba8306afc224c9dbaac7e114275a7d560d9d3a (patch) | |
tree | 9c70fa419b9de2608b349cbe0cd0a31c411d2003 /admin | |
parent | 73c04ed83c1b02341db07d770c74a824120cf23e (diff) |
1 - selected_admin_menu function is externalized.
2 - Plugin can force accordion to be stable by adding &plgmenu in their plugin url
git-svn-id: http://piwigo.org/svn/trunk@2662 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/include/functions_themes.inc.php | 56 | ||||
-rw-r--r-- | admin/template/goto/theme/roma/themeconf.inc.php | 51 |
2 files changed, 58 insertions, 49 deletions
diff --git a/admin/include/functions_themes.inc.php b/admin/include/functions_themes.inc.php new file mode 100644 index 000000000..c00588d13 --- /dev/null +++ b/admin/include/functions_themes.inc.php @@ -0,0 +1,56 @@ +<?php +/** + * Accordion menus need to be stable (called by themeconf.inc which need it) + */ +function selected_admin_menu() +{ + if (isset($_GET['page'])) + { + switch ($_GET['page']) { + case 'configuration': + case 'extend_for_templates': + case 'menubar': + return 1; + case 'site_manager': + case 'site_update': + case 'cat_list': + case 'cat_modify': + case 'cat_move': + case 'cat_options': + case 'cat_perm': + case 'permalinks': + return 2; + case 'element_set': + if (isset($_GET['cat']) and is_numeric($_GET['cat']) ) { + return 2; + } + case 'picture_modify': + return 3; + case 'comments': + case 'upload': + case 'thumbnail': + case 'rating': + case 'tags': + return 3; + case 'user_list': + case 'group_list': + case 'notification_by_mail': + return 4; + case 'stats': + case 'history': + case 'maintenance': + case 'advanced_feature': + case 'plugins_list': + case 'plugins_update': + case 'plugins_new': + case 'plugin': + return 5; + } + } + if (isset($_GET['plgmenu'])) /* Later added plugins will add plgmenu in url */ + { + return 5; + } + return 0; +} +?>
\ No newline at end of file diff --git a/admin/template/goto/theme/roma/themeconf.inc.php b/admin/template/goto/theme/roma/themeconf.inc.php index 27bfe7ec1..9e731144b 100644 --- a/admin/template/goto/theme/roma/themeconf.inc.php +++ b/admin/template/goto/theme/roma/themeconf.inc.php @@ -1,55 +1,8 @@ <?php -/** - * Accordion menus need to be stable - */ -function selected_admin_menu() +if (!function_exists('selected_admin_menu')) { - if (isset($_GET['page'])) - { - switch ($_GET['page']) { - case 'configuration': - case 'extend_for_templates': - case 'menubar': - return 1; - case 'site_manager': - case 'site_update': - case 'cat_list': - case 'cat_modify': - case 'cat_move': - case 'cat_options': - case 'cat_perm': - case 'permalinks': - return 2; - case 'element_set': - if (isset($_GET['cat']) and is_numeric($_GET['cat']) ) { - return 2; - } - case 'picture_modify': - return 3; - case 'comments': - case 'upload': - case 'thumbnail': - case 'rating': - case 'tags': - return 3; - case 'user_list': - case 'group_list': - case 'notification_by_mail': - return 4; - case 'stats': - case 'history': - case 'maintenance': - case 'advanced_feature': - case 'plugins_list': - case 'plugins_update': - case 'plugins_new': - case 'plugin': - return 5; - } - } - return 0; + include_once(PHPWG_ROOT_PATH.'admin/include/functions_themes.inc.php'); } - $themeconf = array( 'template' => 'goto', /* Goto Admin template */ 'theme' => 'roma', /* "roma" is the foundation theme of Piwigo */ |