Jump to content

banner exchange script messed my site...


Guest

Recommended Posts

Hi,

I joins a local banner exchange site that gave me the following script to put on my site. I put it on header.inc and every time the page is loaded (first time or refreshed) the spotlight windows keeps changing the featured item and the page is never fully loaded.

I think it might be some kind of confict between the codes.

Any help would be great!

Tkx

Pardon__Me

You can test it here...

<!-- INICIO DO CÓDIGO DO PMEBANNER -->

<IFRAME src="http://ads.pmebanner.net/ads.php?u=goosfraba" width="468" height="60" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">

</IFRAME>

<!-- FIM DO CÓDIGO DO PMEBANNER -->

Link to comment
Share on other sites

It's in an iFrame!

I don't think it should go in the header. Depends on exactly where though.

NOT in the <HEAD> tag anyway. It must go in the <BODY> section.

I assume every time they refresh the ad, your page refreshes too - or similar.

In CubeCart terms it would be better in your index.php as per other banner rotators etc, or simply place it in the WELCOME message in ADMIN Settings General.

Why does it have to be in an iframe anyway ?

What's wrong with a table cell ?

If you want it to appear on every page, view_product etc. might be better

Link to comment
Share on other sites

I've had it on a new window right above the main index.php window and the same happened...

They say that it must be an IFRAME. Does this mean I wont be able to use their service?

Link to comment
Share on other sites

It's useless...

I have no clue at this...

Looking at the spotlight.php code doesn't ring any bell....

The ad daesn't even ends loading because the spotlight thumb never stops refreshing...

Link to comment
Share on other sites

Exactly!

in your site, my banner messes up the on sale window...

I think this means our CC stores are not compatible with IFRAMES....

I'll need to find other services that work with "simple" banners...

Tkx!

Pardon__Me

Link to comment
Share on other sites

I "think" if you did an

INCLUDE bannercrap.php

and bannercrap.php included the iframe stuff it might work.

There is no need for it to be an iFrame that I know of.

All an iFrame does is to give it an independent window to live in - like a conventional html frame.

If you remove the iframe tags will it not still work?

All I can think is the iFrame means they can refresh the banner independently of when your own page is refreshed. Which I guess is the problem.

Link to comment
Share on other sites

I "think" if you did an

INCLUDE bannercrap.php

and bannercrap.php included the iframe stuff it might work.

There is no need for it to be an iFrame that I know of.

All an iFrame does is to give it an independent window to live in - like a conventional html frame.

If you remove the iframe tags will it not still work?

All I can think is the iFrame menas they cna refresh the banner independently of when your own page is refreshed. Which I guess is the problem.

Nope... it didn't work...

You can check it out here

on the bottom i have a new table where i put the IFrame code and it's pretty much the same as if it was in the header...

TKX,

Pardon__Me

Link to comment
Share on other sites

You still have the top banner as well so how does that help ?

I think it's WHERE (or how) you are inserting the code.

I inserted it in admin settings general welcome message and as you'd expect it behaves fine.

AFAIK you just need to stick it where when it refreshs, the page around it doesn't too.

If you look at the normal rotating baner ad mod, it ultimately sticks it in footer:

open up your footer.inc.php page and find this:

CODE 

include_once("ver.php");

Replace With This:

CODE 

include("iframebanner.php");

include_once("ver.php");

iframebanner should be your iFrame html code (in <HTML> <BODY> HERE </BODY> </HTML> tags).

I don't think this will allow the PUSH content they are creating where the banner changes even when your page doesn't, but it should stop your page refreshing when they do.

When the user goes to a new page, the banner will update.

AFAIK because cubecart is a web page made from several separate PHP scripts, dynamic PUSH content would cause a page refresh as the scripting gets changed.

By housing it in a script which only get called once on each page visit, I would have "thought" that would be OK.

Of course these people are trying to change the banner advert in mid flight so they can max out impressions without your intervention. I think it would be the same issue on any scripted page. So best you can do AFAIK is make it not push by only calling it once per page visit. Obviously not what THEY want - but .....

Does that make sense to anyone else?

But if I am wrong - I am wrong !

Perhaps find a less pushy banner exchange system !

Link to comment
Share on other sites

Nope...

I have the iframe on a file called banner_pmebanner.php and the include statment is on the bottom of the index.php file as shown above, and it still keeps refreshing.

// end border



eb($bg_colour,$colour_1);

// include product spotlight is enabled

echo"<br>";

include("banner_pmebanner.php");



include("subfooter.inc.php");



include( "footer.inc.php");




here's the banner_pmebanner.php code for you to take a look, please:




<?php

// start border

sb("100%","images/botao_title.gif",$colour_1,$bg_colour);



echo"<table align=\"center\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">";

echo"<tr>

  <td align=\"center\"><img src=\"http://www.goosfraba.net/images/floco1.gif\"></td>

  <td align=\"center\">";

//<!-- INICIO DO CÓDIGO DO PMEBANNER -->

echo"<IFRAME src=\"http://ads.pmebanner.net/ads.php?u=goosfraba\" width=\"468\" height=\"60\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" hspace=\"27\">

	</IFRAME>";

//<!-- FIM DO CÓDIGO DO PMEBANNER -->

echo"<td align=\"center\"><img src=\"http://www.goosfraba.net/images/floco1.gif\"></td>

	</tr>";

echo"</table>";

// end border

eb($bg_colour,$colour_1);

?>

It's preety simple, I don't think i've messed up anything, but...

Tkx,

Pardon__Me

Link to comment
Share on other sites

Hey guys,

Need your help again. The guys from the support center of this banner exchange service replyed me saying that they've located a piece of code that might be the responsable from the constant refreshing. It's arround lines 49-54 in headre.inc and it's like this:

setTimeout ("changePage()", 0);

function changePage()

	{

  if (self.parent.frames.length != 0)

  self.parent.location=document.location;

	}

I've taken this out and now it works just great!

Does anybony now of any side effects by having taken this off? What was this code for, in the first place?

The last thing i want is to mess up with sessions, cookies, and stuff like that...

TKX,

Pardon__Me

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...