|
|
Forum moderator: bigblog |
uCoz Community General Information First Steps with uCoz how to delete admin bar for user? |
how to delete admin bar for user? |
for simple user group?
I prefer 2 ways: 1. For example put this code at the top part or bottom part on your customize design content: Code <style>#puzadpn {display:none}</style> 2. Use IF codes to prevent simple user group from adminbar: Code <?if($USER_GROUP$=4)?> <style> /* Admin Bar */ #puzadpn /*---*/ </style> <?else?> <style> /* adminbar is disabled */ #puzadpn {display:none} /*---*/ </style> <?endif?> |
users definition is too wide, I think u want to hide adminbar from user group 1? check your user groups and their ID's there - http://youraddress.com/panel/?a=users;l=groups If u want to hide adminbar from user group 1 for example.. .. put the code at the customize design - top part or bottom part: Code <?if($USER_GROUP$=1)?> <style> /* adminbar is disabled */ #puzadpn {display:none} /*---*/ </style> <?else?> <style> /* Admin Bar */ #puzadpn /*---*/ </style> <?endif?> |
rezo, login ACP > Design > Quick Replacement >
Find Code $ADMIN_BAR$ Replace with: Code <?if($GROUP_ID$="1")?><?substr($ADMIN_BAR$,0,0)?><?endif?> System will remove admin bar for user group only. Added (2015-01-09, 4:11 PM) |
Doing this removes the admin bar correctly, but in the process the if/then tags foul up the display of my $GLOBAL_AHEADER$ block.
So ... and I am editing inside the CSS for this -- 1) #puzadpn {display:none;} correctly removes the bar from all users' screens 2) #puzadpn {margin-top: 0px;} or just #puzadpn correctly displays the admin bar. 3) but, <?if($GROUP_ID$=4)?> #puzadpn {margin-top: 0px;} <?endif?> messes up the screen. It seems as though if/then tags just don't work inside the CSS? Post edited by Boujohn - Thursday, 2015-04-23, 2:40 PM
|
Okay, if the tags only work inside HTML, then I take it I have to use the <style> tags inside HTML to insert the # tag.
Question, where in the HTML templates is the admin bar rendered? I looked for $ADMIN_BAR$ but could not find it anywhere. Also, is there any reference doc that identifies all template, blocks, system codes, etc, with descriptions and default locations? That would be extremely useful as I learn the detailed content available in the system. Right now it's pretty painful to try to learn where things are and what they're called. (Incidentally, that global replace feature is fine, but I am really surprised there is no global search feature. That seems like it would be much more useful. I live off of 'grep -ir' at work.) Thanks. John Added (2015-04-23, 4:21 PM) Post edited by Boujohn - Thursday, 2015-04-23, 3:06 PM
|
To remove the admin bar for all groups of users.
Code <?if($ADMIN_BAR$)?><?endif?> To remove the admin bar to a specific user group. Code <?if($ADMIN_BAR$ && $GROUP_ID$ == '2')?><?endif?> You dont need to use CSS to hide admin bar. Hello! I am Ennio Sousa
Post edited by BraziluCoz - Friday, 2015-04-24, 2:32 PM
|
| |||
| |||