Jump to content

Recommended Posts

Posted

I would like to put the adsense code into my header. But it's an html code. So what i have come up with now is i put it into layout.tpl and in the header line (at the top where img_15 is in obsess blue)

the code originally was:

<script type="text/javascript"><!--

google_ad_client = "ca-pub-############";

/* Header */

google_ad_slot = "8775993061";

google_ad_width = 728;

google_ad_height = 90;

//-->

</script>

<script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>

What i thought i would do is substitute:

<div class="size">

<div class="header">

<div class="header01">

<div class="logo">

<img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/img_15.jpg" alt="" />

</div>

the img src with my script. However its in html not in php so i did a little research and came up with this

<script type=\"text/javascript\"><!--

google_ad_client = \"ca-pub-############\";

/* Header */

google_ad_slot = \"8775993061\";

google_ad_width = 728;

google_ad_height = 90;

//-->

</script>

<script type=\"text/javascript\"

src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">

</script>

What i did is is i put \ after every quotation and now i want to put that into this :<?php echo('whatever HTML'); ?>

And that should work. However i tried and it didnt :( What did i do wrong?

How do i put it into this ?

<div class="size">

<div class="header">

<div class="header01">

<div class="logo">

<img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/img_15.jpg" alt="" />

</div>

Posted

Just put:

<script type="text/javascript"><!--

google_ad_client = "ca-pub-############";

/* Header */

google_ad_slot = "8775993061";

google_ad_width = 728;

google_ad_height = 90;

//-->

</script>

<script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>

Between <head> and </head> somewhere, in layout.tpl.

Simple as that.

Yeah but i want it to substitute and be in the header place.

Posted

So how and where do i put it into this:

<div class="size">

<div class="header">

<div class="header01">

<div class="logo">

<img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/img_15.jpg" alt="" />

</div>

and do i change the div class? to what? and where does the script go?

Posted
<div class="size">

<div class="header">

<div class="header01">

<div class="logo">

<img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/img_15.jpg" alt="" />

</div>

What does this have to do with adsense?

Either way, it's invalid; you open divs you don't close... it will break things.

Posted

What does this have to do with adsense?

Either way, it's invalid; you open divs you don't close... it will break things.

Were the img_15 is where i want to put my ad on my website. And this script is default from obsess blue skin. Or would you suggest another way of putting it into that exact spot? Please help me. What do i do to make the google adsense code to substitute the img_15 location. Please help

Posted

Right ok, that makes more sense.

Replace

<img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/img_15.jpg" alt="" />

with the code adsense gives you.

Posted

Right ok, that makes more sense.

Replace

<img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/img_15.jpg" alt="" />

with the code adsense gives you.

Posted

Dont I have to change the div class or anything? Because i tried it that way and it didnt work :( Maybe i need to put the / before each " like i did already. And could you please give me an example of how it would look please.

<div class="size">

<div class="header">

<div class="header01">

<div class="logo">

<img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/img_15.jpg" alt="" />

</div>

So i just substitute???

<div class="size">

<div class="header">

<div class="header01">

<div class="logo">

<img src="

<script type="text/javascript"><!--

google_ad_client = "ca-pub-############";

/* Header */

google_ad_slot = "8775993061";

google_ad_width = 728;

google_ad_height = 90;

//-->

</script>

<script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>"" />

</div>

??????

Posted

Nope unfortunately doesnt work. It just doesnt show anything.

This is the script i used.

/* This should be the first thing you place after a <body> tag

This is also required by phpVMS */

echo $page_htmlreq;

?>

<div class="size">

<div class="header">

<div class="header01">

<div class="logo">

<img src="<script type="text/javascript"><!--

google_ad_client = "ca-pub-##############";

/* Header */

google_ad_slot = "8775993061";

google_ad_width = 728;

google_ad_height = 90;

//-->

</script>

<script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>" />

</div>

Posted

Nope unfortunately doesnt work. It just doesnt show anything.

This is the script i used.

/* This should be the first thing you place after a <body> tag

This is also required by phpVMS */

echo $page_htmlreq;

?>

<div class="size">

<div class="header">

<div class="header01">

<div class="logo">

<img src="<script type="text/javascript"><!--

google_ad_client = "ca-pub-##############";

/* Header */

google_ad_slot = "8775993061";

google_ad_width = 728;

google_ad_height = 90;

//-->

</script>

<script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>" />

</div>

Maybe div class should be changed from logo? or i should add or edit something in the script

Posted

Could you please give it to me for obsess blue? (The one your using too) And i am editing layout.tpl

Can you please tell me how and where to put it into this:? Instead of img_15

<div class="size">

<div class="header">

<div class="header01">

<div class="logo">

<img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/img_15.jpg" alt="" />

</div>

I will greatly appreciate it! Thanks In Advance,.

  • Moderators
Posted

Could you please give it to me for obsess blue? (The one your using too) And i am editing layout.tpl

Can you please tell me how and where to put it into this:? Instead of img_15

<div class="size">

<div class="header">

<div class="header01">

<div class="logo">

<img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/img_15.jpg" alt="" />

</div>

I will greatly appreciate it! Thanks In Advance,.

Just place your code between that logo class div

<div class="logo">

place your code here

</div>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...