Announcement

Collapse
No announcement yet.

Removing code for certain users

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

  • Removing code for certain users

    I want to add a donation button that appears on many pages, but goes away if the person has donated. I know I can set up a sub-usergroup that designates them as Registered users that have also donated, but is there a way to use that "Donator" usergroup/designation as a way to remove the Donation icon so they don't have to see it again if they donate?

    thx

  • #2
    This can be done with template conditionals. Here is the online documentation for using template conditionals:

    http://www.vbulletin.com/docs/html/m...e_conditionals
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      only seems to work when it is the main usergroup ID i use - what if I want to use an additional usergroup as the condition

      Comment


      • #4
        I don't believe there is a condition for secondary groups. I'll ask.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment


        • #5
          You need to use the is_member_of function

          <if condition="is_member_of($var, X)"> for group of X </if>

          $var should be $post, $bbuserinfo, and $userinfo. X should be the group you want to check.

          Comment


          • #6
            So -

            <if condition="is_member_of($bbuserinfo, Registered Users)"> for Supporters</if>

            sorry if I didn't understand right

            Comment


            • #7
              You need to use the groupid IIRC the registered usergroup is 2

              so

              <if condition="is_member_of($bbuserinfo, 2)">For users in the registered usergroup</if>

              Comment


              • #8
                thx alot - but the sub group I want to hit is called "Supporters" (an additional group under reg's users) - where does that get placed in your conditional - & is there a negative condition, such that every other group but that subgroup sees the Donate image?

                Comment


                • #9
                  Zach, anyone - so close! How do I use the Supporter subgroup (ID 11)

                  Comment


                  • #10
                    Please wait at least 12 hours before bumping a post

                    So... you want an image to appear in the postbit for any user who is part of that group, but only if the user is not in that group?

                    Comment


                    • #11
                      Sorry -

                      The effect I want is this - to be able to use an additional usergroup (if possible) that doesn't see the donation button - the additional usergroup would be ID11, with their main usergroup as Regeistered User (ID 2). Everyone else does.

                      How does the conditional get written.

                      thx

                      Comment

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