google Ads call outside phpwcms

If you've problems with unsupported - non official ;-) - functionalities use this forum please.
Post Reply
oneck
Posts: 14
Joined: Wed 2. Feb 2005, 15:05
Location: Bielefeld (Germany)
Contact:

google Ads call outside phpwcms

Post by oneck »

Hi communty!

I am trying to show show google ads "outsinde" the content so I changed following in the index.php
echo "</head>\n\n<body".$content["body"]."> <table width='100%' border='0'cellspacing='0' cellpadding='0'><tr><td></td><td>\n";
to build a table arround the "Main stuff" in the body tag.

first row content
nothing | Main | nothing

second row content
nothing (colspan3)

hope you guys understand my drwing ;-)

other change in the bottom of index.php
echo "</td><td>THECODEHERE</td></tr><tr><td colspan='3'></td></tr></table></body>\n</html>";
to show google ad I need to fill following JS code into the place where THECODEHERE is.

Here the JS

<script type="text/javascript"><!--
google_ad_client = "pub-7670979206973772";
google_alternate_color = "CCCCCC";
google_ad_width = 120;
google_ad_height = 240;
google_ad_format = "120x240_as";
google_ad_channel ="";
google_color_border = "FF0000";
google_color_bg = "FFFFFF";
google_color_link = "FF0000";
google_color_url = "333333";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
I tried to get it in but always run into errors. Please help. thank you.

one.ck
brans

Post by brans »

hmm I would like to know into what errors you are runnning ? is is possible that you didn't place a backslash \ in front of the " in
THECODE ?

I suppose you should exclude them because you are using a php echo function.

http://ch2.php.net/manual/en/function.echo.php
example 1, the 4th echo.
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Hi oneck

Post by jsw_nz »

hi oneck,

I have a potential project that would require incorporating Google AdSense into wcms, so i wnated to ask if you have has success in getting your issue resolved. Any pointers or tips would be appreciated. Very new to this topic.

:D
john
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

Hi oneck,

i have the google-ads on my site too.

And like you, my aim was, to have them outsite the main-field!

So i put them into the footer... without any tricks... only 3 lines of code, and up it was!

http://peperkorn-online.de/index.php?warum

Don't looks so bad, or what do you think?
Post Reply