Login

Member statsTotal: 206Latest: CcardinGuests online: 8Members online: 0
EmailLogin here

Location
ForumHelp & Support • Hide admin options

Access: Member
Total posts: 6

Status: Offline
Hide admin options Quote 

Hi there,

is there a way to "hide" al the options where normal members can't go? Like: access, banned ips and so on..

Those sections are only available with admin accesslevel. So not really necessary to show them to normal members :)

I've been trying with a lot of things like:

style="<?php if($getaccess['accesslevel'] == "1") { echo "onfocus=this.blur() class=navlink accounts href=?action=options&mod=accounts>Accounts</a>"; } else { echo "display: none;"; } ?>"

But it just won't work. :ermm:

Please help :smile:

Grtz, SD.

PS: awesome script btw.

01:47pm 22nd Jul 08  
Last edited by Southdistrict at 05:33am 24th Jul 08
Access: Member
Total posts: 6

Status: Offline
Re: Hide admin options Quote 

Ok never mind.. solved this issue!

Code:
<a style=<?php if(getaccess("accounts",$newsusers,$newsaccess)) { echo "onfocus=this.blur() class='navlink accounts' href=?action=options&mod=accounts>Accounts</a>"; }

else { echo "display: none;>"; } ?>

Soo, now a member with rights to edit "Accounts" (set by admin) will see the link in the menu on the left. If else the link will dissapear.

05:34pm 22nd Jul 08  
Last edited by Southdistrict at 05:33am 24th Jul 08
Access: Admin
Total posts: 174

Status: Offline
Re: Hide admin options Quote 

Southdistrict, I actually added this functionality to the next release before I put it on hold. I'm glad you figured it out though. :happy:
06:40am 7th Aug 08
_______________
Chris - Network-13
Access: Member
Total posts: 1

Status: Offline
Hide admin options Quote 

I used the code to hide the admin options but it doesnt seem to work with the categories option.

Here is the code i have for categories:

Code:
<a style=<?php if(getaccess("cats",$newsusers,$newsaccess)) { echo "onfocus=this.blur() class='navlink categories' href=?action=options&mod=categories>Categories</a>"; }

else { echo "display: none;>"; } ?>
10:29pm 20th Sep 08  
Last edited by Someone at 03:11pm 21st Sep 08
Post a reply!