Announcement

Collapse
No announcement yet.

Make a nav bar link only visible to certain specific usergroups?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Detomah
    replied
    Originally posted by conqsoft
    Remove the ! at the beginning of the condition.
    Hehe, thanks a lot.

    1 character gets me every single time. If I had a penny for every script i've ended up pulling my hair out over, because of 1 single character, i'd be mega rich by now...

    Leave a comment:


  • conqsoft
    replied
    Remove the ! at the beginning of the condition.

    Leave a comment:


  • Detomah
    replied
    Originally posted by TheMusicMan
    Yes indeed, this can be achieved by using a conditional thus;



    Code:
    <if condition="!in_array($bbuserinfo[usergroupid], array(x,y,z))">
    Code:
    Code you wish only members of x,y,z usergroups to see goes here
    </if>
    Hmmm, that doesn't seem to have worked, it seems to have made the link disappear even for me as admin, but it looks right???

    Having just logged out and viewed as a guest, it then showed me the link as a guest, it seems the code has worked, but in reverse, it seems to have showed it to the usergroups I don't want to see it? So all ive doen to get it to work, is to put in usergroups in the other way around and it works great now, thanks a lot.
    Last edited by Detomah; Tue 8 Nov '05, 7:34am.

    Leave a comment:


  • TheMusicMan
    replied
    Yes indeed, this can be achieved by using a conditional thus;

    Code:
    <if condition="!in_array($bbuserinfo[usergroupid], array(x,y,z))">
    Code you wish only members of x,y,z usergroups to see goes here
    </if>

    Leave a comment:


  • Make a nav bar link only visible to certain specific usergroups?

    Not sure if it is possible, but I am hoping it is.

    I have a link on my nav bar that I only want to be visible to section moderators, super moderators and admins.

    What link should I use to do this?

    At the moment I have the conditional set as <if condition="$show['modcplink']"> which is the one used to access the modcp bit, but only super moderators and admins can see that one, so my section moderators are not able to view it.

    Is there a conditional that I could use that would allow the 3 usergroups to view the link?

    Thanks for your help.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X