Previous Thread
Next Thread
Print Thread
Hop To
Joined: Nov 2006
Posts: 93
2
journeyman
journeyman
2 Offline
Joined: Nov 2006
Posts: 93
Hi Guys:

I've tried search and implementing all I found there, and I still can't get Google AdSense Java code to display in a custom island.

Here's the Java code as generated by Google:
Code
<script type="text/javascript"><!--
google_ad_client = "pub-7613791073340750";
/* 160x90, created 9/4/09 */
google_ad_slot = "9256914271";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


And here's my implementation ... basically putting it between the EOFs wih no spaces.

Code
/* BODY HERE */

$body = <<<EOF
<div align="center">
<script type="text/javascript">
<!--
google_ad_client = "pub-7613791073340750";
/* 160x90, created 9/4/09 */
google_ad_slot = "9256914271";
google_ad_width = 160;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
EOF;
/* DO NOT CHANGE THE LINE ABOVE */

No workee. Can anybody help?

Rick


Last edited by Gizmo; 09/05/2009 4:53 PM. Reason: [code] tags

Rick
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
It sure looks like you have it setup properly. Is it giving you an error or just not displaying anything? If you want to open up a basic support ticket I can take a closer look.

Joined: Nov 2006
Posts: 93
2
journeyman
journeyman
2 Offline
Joined: Nov 2006
Posts: 93
Just not displaying anything.



Rick
Joined: Nov 2006
Posts: 93
2
journeyman
journeyman
2 Offline
Joined: Nov 2006
Posts: 93
Just not displaying anything.

Basic Support ticket opened. smile





Rick
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
If you put that adsense code into a regular html page does it show up ok? I've had a couple ads that didn't start displaying close to 24 hours after they were setup.

Joined: Nov 2006
Posts: 93
2
journeyman
journeyman
2 Offline
Joined: Nov 2006
Posts: 93
yup. Shows up fine even in HomeSite.


Rick
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
I just pasted you ad code on my island and it works fine. Using v7.5.3


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1
make sure you ad blocking turned off, it may be blocking it on your site?

I have adsense running in a custom island it it works fine.


"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Keep in mind that if the site hasn't been crawled the code will return a blank set. It will also return a blank set if there is an issue on the site itself and you need to contact google.

A good test is to just create a test.html file and put the google code in it and upload it to your site and access it to ensure that it's not an issue with the google code in the first place (I've seen this happen with several client sites)


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (Geoff), 1,018 guests, and 215 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)