Adsense n Drupal 6
I've been using Drupal 5, which has a nifty module for using Google Adsense. However, on moving sites to Drupal 6, found this module is yet to be upgraded (since I wrote this, a D6 version appeared; I did give it quick try, but for some reason my adsense block didn't show, and I promptly gave up! Should retry sometime).
I tried Adsense in a block within a Drupal 6 site, but it didn't work. So, searched for answer, and found in a thread on Drupal site.
It turns out that Adsense code doesn't "work" if save a block in regular way, as the HTML filter kicks in (even if try Full HTML), and strips javascript.
One way of saving a block without the HTML filter being applied is to choose PHP Filter as input format.
Then, Adsense blocks work just fine.
For section targeting, I found that could also use blocks with PHP Filter: one for the ad_section start code to go above the content, and the one for end of ad_section to go below the content.
Here's the thread on Drupal site: Getting Adsense to work on Drupal 6.
- Add new comment
- 2601 reads
