Google Adsense Help!!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kentona
    Member
    • Sep 2008
    • 38

    Google Adsense Help!!!

    Needing some help with google adsense. I have it properly working on my site but i would like to have it so staff members and premium members don't see it when they log in.

    Does anyone know how to do this? Many thanks for any help given.
  • TomJames
    Senior Member
    • Feb 2006
    • 761
    • 3.8.x

    #2
    Originally posted by kentona
    Needing some help with google adsense. I have it properly working on my site but i would like to have it so staff members and premium members don't see it when they log in.

    Does anyone know how to do this? Many thanks for any help given.
    Hmm probably best asking at vbulletin.org, but you want something along the lines of:

    Code:
    IF usergroupID != (Insert numbers of usergroups that should see ads) 
    Then insert your Adsense Code
    End IF
    That's just pseudocode, but that would probably be the easiest way to do it if you can get someone to tell you the exact code.
    - TomJames

    Comment

    • Mazinger
      Senior Member
      • Jul 2005
      • 2399
      • 3.7.x

      #3
      Wrap the AdSense code with this condition:

      Code:
      <if condition="!is_member_of($bbuserinfo, x, y, z)">
      AdSense Code
      </if>
      Where x, y and z are the IDs of the usergroups you don't want them to see the ads.
      $post[signature]

      Comment

      • kentona
        Member
        • Sep 2008
        • 38

        #4
        Cool, it worked. Thanks for all the help.

        Comment

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