Announcement

Collapse
No announcement yet.

Hide Top Button To Certain Groups

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

  • Hide Top Button To Certain Groups

    Hi. I am trying to make a top button only visible to certain groups. Here is how I have the usergroups:

    Registered
    Members (custom group that can see Members forum after 50 posts)
    Moderators
    Admins

    What I want is for the Members, Moderators and Admins to see certain top buttons.

    I just can't figure out how to make the condition. Any help is very appreciated.
    Are We Fighting?
    Am I Winning?

  • #2
    This should work:

    Code:
    <if condition="!is_member_of($bbuserinfo, X)">
    
    BUTTON CODE HERE
    
    </if>
    Where X is the usergroupid of the Registered group.

    Comment


    • #3
      Hi Jake! Thank you for responding.

      So if it's for different groups then I do this:

      Code:
      <if condition="!is_member_of($bbuserinfo, X, X, X)">
      
      BUTTON CODE HERE
      
      </if>
      Are We Fighting?
      Am I Winning?

      Comment


      • #4
        Not quite, You would need to either need to run multiple checks or change the checking abit. If you want to check for multiple usergroups you should only show it to the ones who you need to see it, instead of hiding it from the one

        <if condition="is_member_of($bbuserinfo, X) OR is_member_of($bbuserinfo, Y) OR is_member_of($bbuserinfo, Z)">

        Comment


        • #5
          Originally posted by Diva
          Hi Jake! Thank you for responding.

          So if it's for different groups then I do this:

          Code:
          <if condition="!is_member_of($bbuserinfo, X, X, X)">
          
          BUTTON CODE HERE
          
          </if>
          As Zach said, you need to use multiple calls.

          But the condition I posted says, "If the user is not a member of that one group, thereby making the condition true for all other groups." So you shouldn't need multiple usergroupids.

          Comment

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