Last change
on this file since 2885 was
2662,
checked in by vdigital, 16 years ago
|
1 - selected_admin_menu function is externalized.
2 - Plugin can force accordion to be stable by adding &plgmenu in their plugin url
|
-
Property svn:eol-style set to
LF
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.2 KB
|
Rev | Line | |
---|
[2662] | 1 | <?php |
---|
| 2 | /** |
---|
| 3 | * Accordion menus need to be stable (called by themeconf.inc which need it) |
---|
| 4 | */ |
---|
| 5 | function selected_admin_menu() |
---|
| 6 | { |
---|
| 7 | if (isset($_GET['page'])) |
---|
| 8 | { |
---|
| 9 | switch ($_GET['page']) { |
---|
| 10 | case 'configuration': |
---|
| 11 | case 'extend_for_templates': |
---|
| 12 | case 'menubar': |
---|
| 13 | return 1; |
---|
| 14 | case 'site_manager': |
---|
| 15 | case 'site_update': |
---|
| 16 | case 'cat_list': |
---|
| 17 | case 'cat_modify': |
---|
| 18 | case 'cat_move': |
---|
| 19 | case 'cat_options': |
---|
| 20 | case 'cat_perm': |
---|
| 21 | case 'permalinks': |
---|
| 22 | return 2; |
---|
| 23 | case 'element_set': |
---|
| 24 | if (isset($_GET['cat']) and is_numeric($_GET['cat']) ) { |
---|
| 25 | return 2; |
---|
| 26 | } |
---|
| 27 | case 'picture_modify': |
---|
| 28 | return 3; |
---|
| 29 | case 'comments': |
---|
| 30 | case 'upload': |
---|
| 31 | case 'thumbnail': |
---|
| 32 | case 'rating': |
---|
| 33 | case 'tags': |
---|
| 34 | return 3; |
---|
| 35 | case 'user_list': |
---|
| 36 | case 'group_list': |
---|
| 37 | case 'notification_by_mail': |
---|
| 38 | return 4; |
---|
| 39 | case 'stats': |
---|
| 40 | case 'history': |
---|
| 41 | case 'maintenance': |
---|
| 42 | case 'advanced_feature': |
---|
| 43 | case 'plugins_list': |
---|
| 44 | case 'plugins_update': |
---|
| 45 | case 'plugins_new': |
---|
| 46 | case 'plugin': |
---|
| 47 | return 5; |
---|
| 48 | } |
---|
| 49 | } |
---|
| 50 | if (isset($_GET['plgmenu'])) /* Later added plugins will add plgmenu in url */ |
---|
| 51 | { |
---|
| 52 | return 5; |
---|
| 53 | } |
---|
| 54 | return 0; |
---|
| 55 | } |
---|
| 56 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.