URLs or Images won't paste back into edit area if Google Adsense banner on page

Carlos Miranda Levy - February 20, 2005 - 00:31
Project:Htmlarea
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I'm displaying Google Adsense banners as part of my Drupal 4.5.2 phpTemplate theme based on pushbutton. You can see it at http://www.edestino.org

When using a them with Google Adsense banners on it, the pop up windows for insert image and insert url are unable to paste back into the main window the image or url.

If I remove the banners (or switch to a theme without them) the functionality is back.
Banner code is on javascript so I guess there must be some conflict with the pop-ups and the document object model. I'm pasting the code below without the minor than higher than for reference.

script type="text/javascript"
!--
google_ad_client = "pub-1702736652065696";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_channel ="3583661578";
google_color_border = "336699";
google_color_bg = "FFFAF0";
google_color_link = "336699";
google_color_url = "FF6600";
google_color_text = "003366";
//--
/script
script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"
/script

#1

gordon - February 20, 2005 - 01:24

htmlarea does work properly with other IFRAMES on the page. Which is how google adsense works. what you could do is use the following command to work out if a textarea is on your current page or turn off the block for the edit pages.

<?php
if (!_htmlarea_is_changed()) {
echo
'[script type="text/javascript"]
[!--
google_ad_client = "pub-1702736652065696";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_channel ="3583661578";
google_color_border = "336699";
google_color_bg = "FFFAF0";
google_color_link = "336699";
google_color_url = "FF6600";
google_color_text = "003366";
//--]
[/script]
[script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"]
[/script"]'
;
}
?>

#2

Carlos Miranda Levy - February 20, 2005 - 14:11

Thank you very much.
That took care of it.

#3

Anonymous - March 6, 2005 - 14:15

#4

gordon - January 13, 2006 - 03:49

Update: This is no longer an issue with adsense and Xinha.

 
 

Drupal is a registered trademark of Dries Buytaert.