Puzzling over why my adsense ads aren't being displayed properly after adding the suggested code to my node template I noticed the ad slot differed from both what I'd entered and what google code looked like.

All the examples using php (for both blocks and themes) on example.com/admin/settings/adsense all suggest code like this:

if (module_exists('adsense')) {
  print adsense_display(array('format' => '468x60', 'slot' => 0123456789));
}

The slot number needs to be quoted in order to get the markup to match google supplied code:

if (module_exists('adsense')) {
  print adsense_display(array('format' => '468x60', 'slot' => '0123456789'));
} 

Comments

jcnventura’s picture

Yes, you're right.. In my case it's not important as my slots don't start with a zero, but in case it does, then indeed using a string or a number is completely different.

I'll make those changes to the examples soon.

João

jcnventura’s picture

Status: Active » Fixed

The changes have been commited to CVS.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.