Adsense in header

General project discussion. NOT for help questions.
Post Reply
sapride
New Member
New Member
Posts: 2
Joined: Thu Jun 12, 2008 1:20 pm

Adsense in header

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Adsense in header

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
sapride
New Member
New Member
Posts: 2
Joined: Thu Jun 12, 2008 1:20 pm

Re: Adsense in header

Post 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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Adsense in header

Post 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...
Post Reply

Return to “General Discussion”