PDA

View Full Version : [VB4] Using the built in Ad Manager - Make Ads only appear for Guests and Members


Snookieboy
12 Aug 2010, 10:19
Hey,

I'm using the built in Ads Manager in Vbulletin 4 but I am trying to tweak it so that the Ads only show up to Guests and normal Registered members, I edited the template ad_navbar_below under the section Ad Location Templates which has:

<vb:if condition="$adsense_pub_id AND CONTENT_PAGE">
<div style="width:728px; margin:0 auto; padding-bottom:1em">
<script type="text/javascript"><!--
google_ad_client = "{vb:var adsense_pub_id}";
google_ad_host = "{vb:var adsense_host_id}";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "{vb:stylevar alt2_bgcolor_hex}";
google_color_bg = "{vb:stylevar alt1_bgcolor_hex}";
google_color_link = "{vb:stylevar body_link_n_fgcolor_hex}";
google_color_text = "{vb:stylevar body_fgcolor_hex}";
google_color_url = "{vb:stylevar body_link_n_fgcolor_hex}";
google_ui_features = "rc:6";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</vb:if>

I tried adding the following:

<if condition="is_member_of($vbulletin->userinfo, 1, 2, 3)">

</if>

Then tried:

<vb:if condition="is_member_of($vbulletin->userinfo, 1, 2, 3)">

</vb:if>

By adding the first line to the top, and the second line to the bottom, without much luck.

Am I going about this all wrong? :( Any help will be much appreciated.

--------------- Added 1281643763 at 1281643763 ---------------

Never mind, I found the solution now, its bbuserinfo instead of just userinfo incase anyone else runs into the same problem.