PDA

View Full Version : need to call adsense in sidebar via $adsense - think i'm close need help


sross
02-08-2007, 11:02 AM
ok this is my sidebar plugin code:

if ($vbulletin->userinfo[usergroupid] == 1)
{
$sidebar_adsense = '<div align="center">$adsense</div>';

$forumsidebarorder["<a href=\"/register.php/\">Ads</a>"] = "3";

$forumsidebaritem["<a href=\"/register.php/\">Ads</a>"] = "$sidebar_adsense";}


and i want $adsense to call the google script, tried it in headinclude template like this:

<if condition="$adsense">
<script type="text/javascript"><!--
google_ad_client = "pub-8857731200276534";
google_ad_width = 120;
google_ad_height = 240;
google_ad_format = "120x240_as";
google_ad_type = "text";
//2007-02-08: apug sidebar
google_ad_channel = "5450211729";
google_color_border = "dfdfdf";
google_color_bg = "eeeeee";
google_color_link = "444444";
google_color_text = "444444";
google_color_url = "444444";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></if>

but no luck, i'm sure i'm doing something way wrong. Thanks for any help!!

Ziki
02-08-2007, 06:14 PM
You did not specify what $adsense is.Stuff the google adsense code into a template and read this (http://www.zikihideout.com/forums/tutorials-articles/90-how-avoid-editting-templates.html) tutorial

sross
02-08-2007, 06:43 PM
that looks a bit over my head but i'll give it a try, thanks

Ziki
02-08-2007, 09:31 PM
At least you don't have to pay somebody for it :p

sross
02-08-2007, 09:41 PM
Well, I can't figure that out :( i've offered $10 for a fix in the serv request forum, thanks