Page 1 of 1

Adsense in header

Posted: Thu Jun 12, 2008 1:31 pm
by sapride
Hello!

I have today installed CMSMS and am finding it quite easy to set up and use.

However, I have now spent a few hours trying to incorporate Adsense into my website, but it is frustrating me a fair bit.

This is my website, http://poplogg.no/, I want a banner to the right of the logo (Poplogg), above the search.

Alternatively, or even additionally if I get greedy, I'd like one to the right of the main content.

I've been inserting the following code to the template:


{adsense
google_ad_client="pub-29992149047XXXXXXX"
google_ad_slot="80535XXXXXXX"
google_ad_width="120"
google_ad_height="600"
google_ad_format="120x600_as"
google_ad_type = "text"
}


What am I doing wrong? I've searched and tried several methods found in this forum, but none have provided me with the result I wanted.

Thanks
Stian

Re: Adsense in header

Posted: Thu Jun 12, 2008 1:44 pm
by calguy1000
put your adsense code into a Global Content block, and then call that global content block in your header.

Also, you have to wrap javascript and css code in {literal} and {/literal} statements so that smarty doesn't try to parse it.

Re: Adsense in header

Posted: Thu Jun 12, 2008 2:06 pm
by sapride
Hi Calguy, thanks for the reply.

It seems to me that there are several ways to incorporate Adsense. They way you mentioned or by using the Adsense-tag, all seem to work.

What I am having difficulty doing is getting the Adsense-box directly to the right of the logo. Or getting it to float to the right of the main content, without pushing anything down the page.

Thanks.

Re: Adsense in header

Posted: Thu Jun 12, 2008 7:00 pm
by Dr.CSS
Kind of hard to help if nothing in site, I was looking to see how you tried but found no ad, this may have been ok to put in layout and design...