Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Banners


Jaxman

Recommended Posts

Did you define the Banner Group as Test? And if so, did you define the area that calls the banner to call from the Banner Group Test?

 

Example: This calls banners from the Banner Group called 468x50 that has nothing to do with size other than calling it Fred had little meaning ... :shock:

<?php

 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

 }

?>

 

This calls the banners from the Banner Group called Fred:

[code]<?php

 if ($banner = tep_banner_exists('dynamic', 'Fred')) {

?>

<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

 }

?>

[/code]

Link to comment
Share on other sites

Well , I am configuring the banner trough the control panel in Admin section.

My PHP knowledge = 0 so I guess I didn't modified any PHP code.

 

The only thing I did I uploaded the banner , and mad a group called Dealers.

 

I can see the status is Green but the Displays indicate nothing.

Clicks 0/0 :(

 

From here ... I'm lost.

 

Where do I have to insert or modify the code you are talking about ?

Link to comment
Share on other sites

Now you need to edit the code where you want the Banner Group Dealers to display.

 

The one in /includes/footer.php is calling the Banner Group 468x50

 

While this is technically the size of the banner, it is just a name.

 

You need to edit the code to read Dealers instead of 468x50 or insert that code from above into another section of your header, footer, columns, etc so the new Banner Group Dealers shows.

Link to comment
Share on other sites

  • 3 months later...

because this what i get when i want to add a banner

 

Fatal error: Cannot instantiate non-existent class: upload in /home/ompsco/public_html/catalog/admin/banner_manager.php on line 53

live long and prosper

Link to comment
Share on other sites

im an idiot you see i dont understand

 

i just want to be able to upload new banners for my site and all i keep getting is the blasted code above

live long and prosper

Link to comment
Share on other sites

while we are talking about banner :wink: I'm trying to modify the banner code to open the link in the same window and not on a new page...

 

a little help would be great =]

Designrfix.com | Graphic Design Inspiration & Web Design Resources - @designrfix
Link to comment
Share on other sites

Paul ...

 

Take a copy of this peice of code from the /includes/footer.php

<?php

 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

 }

?>

 

Add it to your /includes/header.php

 

This line defined what banner group to pull from:

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

 

If you have a banner group called Fred, then change the '468x50' to read 'Fred'

Link to comment
Share on other sites

this is my footer what is wrong with this???

 

<?php

/*

 $Id: footer.php,v 1.24 2001/12/19 15:02:38 hpdl Exp $



 osCommerce, Open Source E-Commerce Solutions

 http://www.oscommerce.com



 Copyright (c) 2001 osCommerce



 Released under the GNU General Public License

*/



 require(DIR_WS_INCLUDES . 'counter.php');

?>

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

 <tr class="footer">

   <td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>

   <td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td>

 </tr>

</table>

<div align="center"></div>

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

</table>

<?php

 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

 }

?>

live long and prosper

Link to comment
Share on other sites

besides what has that got to do with this errors message that i am getting

 

Fatal error: Cannot instantiate non-existent class: upload in /home/ompsco/public_html/catalog/admin/banner_manager.php on line 53

live long and prosper

Link to comment
Share on other sites

i found what i was looking for

 

catalog/includes/functions/banner.php , around line 86.

 

replaced "_blank" for "_self" ... heh i thought it was harder then this :oops:

$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_self">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';

Designrfix.com | Graphic Design Inspiration & Web Design Resources - @designrfix
Link to comment
Share on other sites

this is my line 86 to 90

 

tep_db_query("update " . TABLE_BANNERS . " set expires_date = '" . tep_db_input($expires_date) . "', expires_impressions = null where banners_id = '" . $banners_id . "'");

} elseif ($HTTP_POST_VARS['impressions']) {

$impressions = tep_db_prepare_input($HTTP_POST_VARS['impressions']);

tep_db_query("update " . TABLE_BANNERS . " set expires_impressions = '" . tep_db_input($impressions) . "', expires_date = null where banners_id = '" . $banners_id . "'");

}

live long and prosper

Link to comment
Share on other sites

what do you mean linda??

 

If you change the banners to open in the same window ... then you take people off your site when they click on the banner, unless these banners are site specific.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...