Announcement

Collapse
No announcement yet.

Conditional for Additional Users

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

  • Conditional for Additional Users

    Hello,

    I'm trying to setup a premium system, where using the subscription system, I would like our members not to see the ads. I have setup a subscription which promotes the member to an additional usergroup. With a conditional I tried to filter out the ads, but it only works if the user is the group as a primary user.

    This is the conditional that works only for primary users, not additional:
    PHP Code:
    if ($bbuserinfo['usergroupid'] != 5
    Is there a simple solution for this?

    Thanks

  • #2
    Yes, you have to use this expression:

    PHP Code:
    if (is_member_of($bbuserinfoUSERGROUPID)) 
    And if you are putting the conditional in a template, remember it has to be like this:

    HTML Code:
    <if condition="is_member_of($bbuserinfo, USERGROUPID)"> your ads yere </if>
    Bugdar: PHP bug tracking software that is beautiful, fast, and robust.

    Comment


    • #3
      $bbuserinfo['membergroupids'] contains a comma seperated list of all secondary usergroupids.

      Take a look at this thread. It might help.
      http://www.vbulletin.com/forum/showthread.php?t=117060
      this is my sig

      Comment


      • #4
        Thanks for the quick reply, that worked like a gem!

        Comment

        Loading...
        Working...
        X