Forum Moderators: martinibuster

Message Too Old, No Replies

Google Adsense Script

Google Adsense Script

         

aff_dan

4:41 pm on Feb 17, 2005 (gmt 0)

10+ Year Member



I've been looking at this bit of code for so long I can't see for looking. Can some tell me what the correct syntax for this would be? I've highlighted the piece of code that I know is cauing the problem but I can't see for looking any more.
echo "<!-- google ads, generated by SW :: Google Ads (c) <snip> -->\r\n"
. "<table width=\"100%\"><tr><td align=\"center\"><br />"
. "<script language=\"javascript\">\r\n"
. "\r\n"
. "google_ad_client = \"" . $params->get('google_ad_client') . "\";\r\n"
. "google_alternate_ad_url = \"<a href='snip URL' target='_blank'><img src='snip URL' border='0' alt='<snip>'></a>;\" ."\r\n" <---
. "google_ad_width = " . $params->get('google_ad_width') . "; \r\n"
. "google_ad_height = " . $params->get('google_ad_height') . "; \r\n"
. "google_ad_format = \"" . $params->get('google_ad_format') . "\"; \r\n"
. "google_ad_channel = \"" . $params->get('google_ad_channel') . "\"; \r\n"
. ( $params->get('google_ad_in_frame')? "google_page_url = document.location; \r\n" : "")
. "google_ad_type = \"" . $params->get('google_ad_type') . "\"; \r\n"
. "google_color_border = \"" . $params->get('google_color_border') . "\"; \r\n"
. "google_color_bg = \"" . $params->get('google_color_bg') . "\"; \r\n"
. "google_color_link = \"" . $params->get('google_color_link') . "\"; \r\n"
. "google_color_url = \"" . $params->get('google_color_url') . "\"; \r\n"
. "google_color_text = \"" . $params->get('google_color_text') . "\"; \r\n"
. "//--> \r\n"
. "</script>\r\n"
. "<script language=\"javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>\r\n"
. "<!-- end of google ads -->\r\n"
. "</td></tr></table>";

Thanks

dan

[edited by: Jenstar at 5:56 pm (utc) on Feb. 17, 2005]
[edit reason] No URL specifics please! [/edit]

DMacedo

4:54 pm on Feb 17, 2005 (gmt 0)

10+ Year Member



At the end of the:
. "google_alternate_ad_url ...
line, replace:
;\" ."\r\n" <---

with:
\";\r\n"

Cheers

[edited by: DMacedo at 4:55 pm (utc) on Feb. 17, 2005]

Zygoot

4:55 pm on Feb 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Edit: nevermind, I was wrong

Jenstar

5:58 pm on Feb 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do note that it is against the terms to make any changes to the AdSense script without Google's specific permission :) They want you to use the script exactly as it is given in the control panel.