![]() |
Guest only Ads
Hey,
Is there a way to make it so that only guests can see advertisements. (one you log in, you do not see advertisements on board) Thank you! |
Look at this thread on VBT
http://www.vbulletintemplates.com/mo...hread.php?t=25 Hope this helps Gio |
thanks a lot! =)!
|
Why not just use :
PHP Code:
|
wow thats a lot simpler! but is there a way to make it so more than one usergroup doesnt see the ad?
when I attempt to put it inside the header I get The following error occurred when attempting to evaluate this template: Parse error: parse error, unexpected ';' in /home/shiburao/public_html/includes/adminfunctions_template.php(3055) : eval()'d code on line 33 |
To use the code just place it wherever you want your ad code to display.
As for your error - it must be your ad code as the code i gave you doesn't have any ; in it. Post the whole ad code here if you want it to be debugged. You dont put this into php files by the way - use it in the template you want it to display in. |
PHP Code:
|
I went to style manager and edited templates. Is that what I am supposed to do? It doesn't work and gives me some weird code
if(($bbuserinfo[usergroupid] == 2) OR ($bbuserinfo[usergroupid] == 6) ) { <script type="text/javascript"><!-- google_ad_client = "pub-4735661945647510"; google_ad_width = 468; google_ad_height = 60; google_ad_format = "468x60_as"; google_ad_channel =""; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> } |
Just do this:
Code:
<if condition="$bbuserinfo['userid'] == 0"> Code:
<if condition="$bbuserinfo['userid'] == 0"> |
Thanks!
|
Within the templates you don't need the { }
In the php files themselves you do. |
God you guys come up with some convoluted solutions to this problem.
If you want to limit something to guests only then use Code:
<if condition="is_member_of($bbuserinfo, 1)"> ad </if> |
Quote:
Like i said in the first place :p |
No, your conditional is !is_member of (Not is member of). The original poster only wants to show the ads to one group only - the guests, so the conditional should be is_member_of
:) |
Like i posted within my post though.
If someone doesn't know the ! operator makes it an inverse, should they really be playing with the code ;) |
All times are GMT. The time now is 04:47 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|