Adsense in custom position

doctorb - January 30, 2009 - 14:58

I have been trying hard to make the google adsense ads appear in a custom position (within a table cell, in 'content top' section, on homepage) but have had no success yet.

I first tried installing the adsense module and adsense injector module but found out that they can't inject the ads just anywhere, only at certain places.

Then I created an ad block (which shows ads independently) and tried to include that block in another block using the 'insert block' module.

[block:=]

Didn't work.

Then I tried to use the php code:

<?php
$block
= module_invoke('module_name', 'block', 'view', 0);
print
$block['content'];
?>

Didn't work! If I use php filter, it messes the html that surrounds it and if I use full html, it doesn't show the php result.

I would appreciate if anybody here can guide me how to make this work!

Thanks!

Never mind

doctorb - January 31, 2009 - 06:31

Never mind! I worked it out.

First I designed the block in full html view. Then changed the content type to php and pasted the adsense code and saved it. It's working!

 
 

Drupal is a registered trademark of Dries Buytaert.