Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multiple Banners


ploggenberg

Recommended Posts

Posted

Hi, I seriously need some urgent help setting up multiple banner 'zones' on osc 2.2 m2.

 

I can get only one set of banners to rotate with default 468X50 (as group title), but when I change this the images doesn't display.

 

I assume you can create multiple groups and the add your banners to the respective group, then via $banner_only add the boxes for the ads

 

I need to display various different ads for sponsors, media, company etc. and needs to be grouped

 

I have looked around quite a bit cant seem to find what I am doing wrong or what I can do to get this right.

 

Can someone please help?

 

Thanks

 

Phil

Posted

THe code to display banners is normally found in /includes/footer.php and has 468x50 is hard coded into it.

 

  if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
 </tr>
</table>
<?php
 }
?>

 

If you have a second group you can duplicate the code and place it in other places on your site.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted
THe code to display banners is normally found in /includes/footer.php and has 468x50 is hard coded into it.

 

  if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
 </tr>
</table>
<?php
 }
?>

 

If you have a second group you can duplicate the code and place it in other places on your site.

 

Hi Geoffry. Thanks for the reply

 

I have now two groups, '468X60' for full banners and '120X600' for skyscraper ads. The full banners run with $banner_only and in the includes/footer.php they run with $banner (this doesn't work - just shows as text

 

I have installed STS (Simple Templating System) to customise the interface.

 

In order for me to add the second banner (outside column right) in a DIV I added the code to a file index.php.html which is not getting the information (not php page)

 

I tried changing to the 468X60 and changed the code, which is not working, I defaulted back to 468X50 which is working

 

I reckon this is a definition issue somewhere else

 

(I am new to PHP)

 

Thank you

 

Phillip

Posted

I found this after some head scratching.

You need to re-write some code display the ads.

 

The folowing code needs to be placed wherever you would like to display the banners

 

******** START OF CODE ************

<?php

if ($banner = tep_banner_exists('dynamic', '468x50')) {

****** the line above is the essential one just change '468x50' to a different size ie '120x600' or what ever size rquired = width x height ****

?>

<br>

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

<tr>

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

</tr>

</table>

<?php

}

?>

 

**********END OF CODE ****************

 

I personally have put this into a file in the boxes folder called ads and call it into the site int the header, left or right colums or footer

with the follow code

 

<?php

include(DIR_WS_BOXES . 'ads.php');

?>

 

Hope this help and you can understand this

It works for me

 

Dont forget to always backup before you maked any changes!!!!

Archived

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

×
×
  • Create New...