PDA

View Full Version : setting for adsense..



luism
Wed 20th May '09, 2:31pm
Hi I am sure there is a setting I haven't found yet.. but where is the setting that makes adsense ads show EVEN if you are registered?

Right now ads show up only if you are unregistered. Or not logged in..

Thanks

-Luis

Jake Bunce
Wed 20th May '09, 4:31pm
The integrated Adsense has a few options for the display of ads:

http://www.vbulletin.com/docs/html/main/adsense_integration

You can manually edit the Ad Location Templates if you want to setup custom conditions for the advertising code:

Admin CP -> Styles & Templates -> Style Manager -> « » -> Ad Location Templates

For example, this condition can be used in the templates to show something for guests only:



<if condition="!$bbuserinfo[userid]">

</if>


If you don't use any conditional code then it will show for everyone.

luism
Thu 21st May '09, 2:31pm
Thanks for the reply..
The code that you show is only if I want certain memebers to view certain ads?

So as far as you know..
Adsense ads will only show up if you are NOT logged in?
They will only show if you are a guest or a user that hasn't been logged in?
It doesnt make sense.. :confused: There must be a way to turn that option on so ads will show to all users.. logged in or not..
I am concerned that if I manually place code to show ads in the vb pages it will nullify my adsense contract.. by having the built in adsense code place an ad and then having my own manual code (before the adsense option) ad placed on top of the other one..

Am I making sense? Or am I missing something obvious?

Thanks

-L

Jake Bunce
Thu 21st May '09, 3:56pm
Ads should show for everyone if the code in the Ad Location Templates does not use any conditionals.

luism
Fri 22nd May '09, 10:28am
Thanks Jake:
So here I go ...
So in case I mess things up I created a style under default whic can edit and if I screw things up I can always go back to sqaure one :)

I clicked on the ad_showthread_firstpost_start

and see a lot of code...

<if condition="$GLOBALS['vbulletin']->adsense_pub_id">
<if condition="!$bbuserinfo['userid']">
<div style="float:right; width:300px; height:250px; margin-left:10px">
<script type="text/javascript"><!--
google_ad_client = "{$GLOBALS['vbulletin']->adsense_pub_id}";
google_ad_host = "{$GLOBALS['vbulletin']->adsense_host_id}";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "$stylevar[alt1_bgcolor_hex]";
google_color_bg = "$stylevar[alt2_bgcolor_hex]";
google_color_link = "$stylevar[body_link_n_fgcolor_hex]";
google_color_text = "$stylevar[body_fgcolor_hex]";
google_color_url = "$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>
</if>
</if>

should I just erase all of the above?
Or just reomove certain parameters?

Thanks

cellarius
Fri 22nd May '09, 10:33am
Remove

<if condition="!$bbuserinfo['userid']">and one time

</if>(Note it's there twice and one of them should stay in place).

luism
Fri 22nd May '09, 11:20am
Should I seek out this code in each of these templates under the ad locator templates.. or just this particular one?
For example should I make any changes to ad_navbar_below template?

Thanks

cellarius
Fri 22nd May '09, 11:22am
You remove that from every template you want to show to registered users, too. The conditional prevents all that's in between from being shwon to registered users.

luism
Fri 22nd May '09, 11:43am
Remove

<if condition="!$bbuserinfo['userid']">and one time

</if>(Note it's there twice and one of them should stay in place).


I removed the above from two of the templates and it seems to be working :) thank you all..

-Luis