Hiding Ads for Paid Users

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Assim
    Senior Member
    • Oct 2006
    • 336
    • 3.8.x

    Hiding Ads for Paid Users

    Let's say that I have paid subscriptions, as a subscriber, the user will be added to the subscription usergroup as an additional group, and let's assume that the subscription usergroup id is 23, so how can I hide ads in templates using the vBulletin style IF tag to hide those ads for whoever is in USERGROUPID 23.

    I used to know how but I guess I lost the code!

    Thanks in advance!
  • Andy Huang
    Senior Member
    • Feb 2004
    • 4602

    #2
    Code:
    <if condition="!is_member_of($bbuserinfo, X, Y, Z)">
    <!-- ads -->
    </if>
    Where X, Y, Z are usergroup ids that should not see ads.
    Best Regards,
    Andy Huang

    Comment

    • Assim
      Senior Member
      • Oct 2006
      • 336
      • 3.8.x

      #3
      Originally posted by Andy Huang
      Code:
      <if condition="!is_member_of($bbuserinfo, X, Y, Z)">
      <!-- ads -->
      </if>
      Where X, Y, Z are usergroup ids that should not see ads.
      Thanks for you reply!

      P.S. I didn't try it yet but shouldn't there be a ['usergroupid'] next to the $bbuserinfo.

      Comment

      • Andy Huang
        Senior Member
        • Feb 2004
        • 4602

        #4
        I think not; the is_member_of is a custom function made by the developers to check whether o rnot the user is in the usergroup. If you are going to use the [usergroupid] part, then you should be using in_array(X, Y, Z) instead
        Best Regards,
        Andy Huang

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        😀
        😂
        🥰
        😘
        🤢
        😎
        😞
        😡
        👍
        👎