• Page 1 of 1
  • 1
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?
rezo
Posts: 18
Reputation: 0

Message # 1 | 6:22 PM
how to delete admin bar for user?
Korijs
Posts: 267
Reputation: 5

Message # 2 | 7:40 PM
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?>
rezo
Posts: 18
Reputation: 0

Message # 3 | 10:49 AM
describe please, how to do sad

Added (2015-01-09, 10:49 AM)
---------------------------------------------
i want delete for users only

Korijs
Posts: 267
Reputation: 5

Message # 4 | 12:06 PM
Quote rezo ()
i want delete for users only


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?>
Good
Posts: 360
Reputation: 12

Message # 5 | 4:11 PM
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)
---------------------------------------------
Demo: http://adnet.at.ua/

Login and check! wink

Boujohn
Posts: 36
Reputation: 0

Message # 6 | 2:27 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?
Attachments: 7371324.png (190.6 Kb) · 7036371.png (205.4 Kb) · 5413612.png (199.6 Kb)
Post edited by Boujohn - Thursday, 2015-04-23, 2:40 PM
Sunny
Posts: 9296
Reputation: 456

Message # 7 | 2:39 PM
Quote Boujohn ()
It seems as though if/then tags just don't work inside the CSS?


Yes, the conditional operators only work in HTML.

I'm not active on the forum anymore. Please contact other forum staff.
Boujohn
Posts: 36
Reputation: 0

Message # 8 | 4:21 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)
---------------------------------------------
After poking around on the templates for a bit, I am realizing that I am going to have to edit multiple templates to put this conditional style in. Some of the modules do not share the "Site Pages" template. It would be nice if the entire system used one global page template by default.

Post edited by Boujohn - Thursday, 2015-04-23, 3:06 PM
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 9 | 4:57 PM
Boujohn, you have to put the code in a HTML template, not in CSS.
hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
BraziluCoz
Posts: 84
Reputation: 1

Message # 10 | 2:30 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
uCoz Community » General Information » First Steps with uCoz » how to delete admin bar for user?
  • Page 1 of 1
  • 1
Search: