Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Banner Script in Banner Box?


Guest

Recommended Posts

Posted

I am using a banner exchange service which requires me to insert a couple lines of code into my page for rotating banners. If I go into banner manager in admin and insert the following code instead of a image into the HTML TEXT area it does not show anything, only if I use a image.

 

 

<!-- BEGIN USA BPATH BANNER EXCHANGE CODE -->

 

<script src="http://ads18.bpath.com/gif.cfm?ID=87167&Page=0&Ver=40"></script>

 

<!-- END USA BPATH BANNER EXCHANGE CODE -->

 

 

I hope a smart programmer will help me format the above code so can use it for my footer banner.

 

Thanks,

Jason

Posted

<table border="0" width="100%" cellspacing="0" cellpadding="0">

 <tr>

   <td align="center"><?php echo tep_display_banner('static', $banner); ?></td>

 </tr>

</table>

find this code at the bottom of your footer and put your code in the place of

<?php echo tep_display_banner('static', $banner); ?>

to look like this

<table border="0" width="100%" cellspacing="0" cellpadding="0">

 <tr>

   <td align="center"><script src="http://ads18.bpath.com/gif.cfm?ID=87167&Page=0&Ver=40"></script></td>

 </tr>

</table>

that should do it

Posted

is there a way to do it from banner manager in admin so i can use it for other banners later? If I change the code in footer I wont be able to use banner manager anymore? Am i correct?

 

Thanks,

Jason

Posted

yes you are correct, give me a few and i'll try to make something that will suit your needs.i don't know of a way to do it with the current admin, but i can maybe make a new field that will allow you to do it and change the banner in the admin.

Posted

Thanks. The other option you provided did not work. I wonder if it is a bug in oscommerce, shouldn't it work just by pasting the code into the HTML TEXT box.?

 

Jason

Posted

no by default the banner display is for html and the html code is inserted after the <a href=""></a> statement here is what you need to change as long as you plan to use this style for script banner in that exchange group.

if ($banner['banners_html_text']) {

     $banner_string = $banner['banners_html_text'];

   } else {

     $banner_string = '<script src="' . $banner['banners_html_text'] . '"></script>';

   }

find that in the includes/functions/banner.php file you will see what i changed, and make it look like that. then for your html code just put the http://...... not the script src part. that should do it, unless that won't work for you.

Posted

hold on i was wrong don't edit that.

INSERT INTO banners VALUES (1, 'Exchange', 'http://ads18.bpath.com/gif.cfm?ID=87167&Page=0&Ver=40', '', '468x50', '<script src="http://ads18.bpath.com/gif.cfm?ID=87167&Page=0&Ver=40"></script>', NULL, NULL, NULL, '2002-11-08 01:47:02', '2002-11-08 01:52:10', 1);

insert that into your banners table in your datase and is should work, if not the edit the code.

Posted

Well I already changed what you gave me. It works great. I had to include the entire code to get it to work, not just HTTP://....

 

<!-- BEGIN USA BPATH BANNER EXCHANGE CODE -->

 

<script src="http://ads18.bpath.com/gif.cfm?ID=87167&Page=0&Ver=40"></script>

 

<!-- END USA BPATH BANNER EXCHANGE CODE -->

 

This seems to work fine, is there any reason why I should not do it this way?

 

Jason

Posted

Sorry I did notice the other banners do not work now. I appreciate all your help. Are you saying I need to edit the database instead?

 

Jason

Posted

if you put that info into the database and look at the banner in the banner manager you will see how to add the link into the database for future banners.

Posted

Oh boy, now it says I have secure and non-secure items in my page. It must be because the code goes to another site that is not secure. Being in the footer it is going to screw with my secure ordering. I guess i have to contact the banner exchange company? Unless you have any ideas.

Thanks,

 

Jason

Posted

all that is means is that the picture is being pulled from an unsecure site, the only way to fix that is to have their script on your site and have all the banners inside your ssl directory, it won't mess anything up, just a warning.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...