Closed (fixed)
Project:
SimpleMenu
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Mar 2009 at 19:00 UTC
Updated:
26 Apr 2010 at 21:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
dnewkerk commentedAlso interested in this. I love admin menu for "admin" stuff... but SimpleMenu is well, much "simpler" for regular users :D
Having SimpleMenu enabled for regular users means the admin (who's may prefer using admin menu) gets a stack of two menus.
I'm sure it would be done differently to expose the option in SimpleMenu's UI, though here's a tweak to simplemenu.module to give the desired result for the time being:
$global user;was added so that we get access to the user object and see who the current user is... then an extra condition&& $user->uid != '1'is added so that it says "if the user has permission to view simplemenu AND if the user is not uid 1, then proceed".Then to get it to not load SimpleMenu's footer code/javascript in this case:
Note that I'm not an expert coder and though I think it's fine and my testing showed no negative side effects, use at your own risk.
Hope this helps, and +1 on the feature request :)
Comment #2
superstar commentedThis feature would be better maintained if it was able to be switched on and off via the administration page for simple menu.
I will look at rolling a patch for this.
Comment #3
psynaptic commentedJust did this..
_simplemenu_superuser_active()which tests if$user->uid == 1and ifvariable_get('simplemenu_uid1', 1) == 0.simplemenu_uid1variable.simplemenu_enabled()check tosimplemenu_init()to avoid loading JS and CSS files when not enabled.Quite a simple patch really. I was going to add in role visibility too but then I realised that can be controlled via the permissions system.
Comment #4
jolidog commentedWorks great!
Thank you very much.
Comment #5
psynaptic commentedNo problem.
I'm with Keyz, I agree that simplemenu is better for certain, shall we say, "less technical" users. ;)
I used to use simplemenu exclusively but have come to like admin_menu so I can now finally say:
simplemenu++
admin_menu++
Comment #6
cimo commentedAWESOME !
Comment #7
psynaptic commentedI think this still needs to be committed, is that correct?
Comment #8
jolidog commentedyes, please! :)
Comment #9
milos.kroulik commentedThanks, it works great and it definitely should be commited.
Comment #10
MadtownLems commentedMUCH needed feature. I will re-enable simple menu when this is available.... thanks!!!!
Comment #11
EWB commentedJust wanted to put in a plug/plead for this feature.... thanks!
Comment #12
AlexisWilke commentedThanks. Will be in the next version 1.x. At this point, I do not know why there is a 2.x...
Alexis Wilke