Floatbox and Tradedoubler Conflict

Page: 1

Author Post
Member
Registered: Jan 2012
Posts: 98
I have some affiliate adverts on my new pages, sourced from Tradedoubler. I just noticed that clicking on a Floatbox link or hovering on a Floatbox tooltip causes the advert to disappear (ie the space is still there but nothing visible in it).

Typical code on my page is:
<script type="text/javascript">
var uri = 'http://impgb.tradedoubler.com/imp?type(js)g(12345678)a(12345678)' + new String (Math.random()).substring (2, 11);
document.write('<sc'+'ript type="text/javascript" src="'+uri+'" charset="ISO-8859-1"></sc'+'ript>');
</script>


Could it be the variable "uri" conflicting with a similar variable in Floatbox? I found "b.uri" buried in the middle of floatbox.js, but I couldn't understand what it was doing or whether that would matter. Or something else maybe?
Administrator
Registered: Aug 2008
Posts: 3382
Perhaps the adverts are Flash objects and Floatbox's hideObjects option is hiding them. That option defaults to true. See the entry in the Options Reference for details.

If that's not it, I would need to see the problem on a live page to make further progress.
Member
Registered: Jan 2012
Posts: 98
Brilliant! Got it in one!

Added "hideObjects:false" to the globalOptions and that fixed it. And it doesn't seem to cause any new problem, though I'll watch it carefully for a while.

The documentation says "If true, objects and embeds (flash, quicktime, silverlight, etc.) on the host page will be hidden while a floatbox is being displayed." That would have been OK for my page, but in reality the objects are hidden and then never come back unlesss the page is refreshed.
Administrator
Registered: Aug 2008
Posts: 3382
If that's the latest version of Floatbox you're using I should check out the problem. If it's an older version and the flash ads are using swfobject to set themselves up, then the problem has been fixed for recent releases.
Member
Registered: Jan 2012
Posts: 98
No, it's not the latest version. You've told me off before for not using the latest, but generally the old one works and I don't feel a need for the work involved in going over to the new one. Perhaps I'll finally get round to it when we go over fully to our new site.
Administrator
Registered: Aug 2008
Posts: 3382
I'd never tell some one off for not using the latest version. If the older versions are doing what you want, there's not much motivation to invest the time to upgrade.

But it is only in the latest version and its successor that I can fix any bugs that might occur. And it is only by obtaining these fixed releases that you can get the bug fixes into your implementation. That's not a chastisement. It's just the laws of physics.
Member
Registered: Jan 2012
Posts: 98
I was just being a bit flippant. Generally I do like to keep all software up-to-date but the upgrade from 5 to 6 (I think) was not so straightforward and required a re-write of options.js. That's why I chose not to do it at the time and haven't done since. The other disincentive to the latest version (If I understood it right) is that all the files got bigger so there was more for the user to download.
Administrator
Registered: Aug 2008
Posts: 3382
The last of the version 5 series (5.7.2) is 99k of javascript; 51k if served gzipped.
The most recent version 6 (6.0.4) is 80k of javascript; 42k if gzipped.
Not a bad reduction considering that 6 has more functionality than 5.

Version 7, currently on the workbench, brings even more functionality and so far has an even smaller footprint than v6.
« Last edit by admin on Thu May 07, 2015 2:01 pm. »
Member
Registered: Jan 2012
Posts: 98
I looked again, and now I don't really understand why I thought it had got bigger. As it happens I am making some radical website changes at the moment and the old and new need very different settings in options.js. With both old and new using Floatbox v5 it was becoming very cumbersome. I've now installed v6 for the new pages and it has made life easier. Also I found that v6 was easier to install than I expected. I obviously did something wrong when I first tried when v6 first came out.

Thanks, as ever.
Member
Registered: Jan 2012
Posts: 98
Just one tiny little nitpick now that I am flying with 6.0.4: how do I control the font of "Close", Pause", etc? They appear to be being displayed in Calibri or something similar and I just want common-or-garden Arial. I've searched floatbox.css and even the .js files and I can't see where it is being controlled.
Administrator
Registered: Aug 2008
Posts: 3382
You can't. That's not text. Those are background images on the control elements. I suppose you could create your own replacement images.

Version 7 does away with those background images and uses a combination of text and custom icon fonts. They look a whole lot sharper, scale much better, and are readily modified by css. The only problem is, v7 doesn't exist (yet).
Member
Registered: Jan 2012
Posts: 98
Ah hahhh! That explains it. In v5 all those little images were gif files and the text looked like Arial. In v6 the gif files are still there but the images referenced in the CSS file are png files and they have the different font.

I've solved it by changing the various lines in the CSS file from png to gif. At the same time I was able to change the colour-scheme in the CSS file and eliminate the colorTheme line from options.js.

Page: 1