Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Banner folder


uwebsmart

Recommended Posts

Posted

when i install a new banner it installs it into the 'images' folder. I have a banner folder inside the 'images' folder that i would like it to install to instead, is there any way of this?

Posted
when i install a new banner it installs it into the 'images' folder. I have a banner folder inside the 'images' folder that i would like it to install to instead, is there any way of this?

 

Sure, first, edit your admin/includes/configure.php file and add this below your definition for DIR_WS_IMAGES:

 

define('DIR_WS_BANNERS', DIR_WS_IMAGES . 'banners/');

 

Then, save that file and edit admin/banner_manager.php, and change all instances of DIR_FS_CATALOG_IMAGES to that plus ". DIR_WS_BANNERS", for example, about line 61, you'll see:

 

$banners_image->set_destination(DIR_FS_CATALOG_IMAGES . $banners_image_target);

 

Change that to this:

 

$banners_image->set_destination(DIR_FS_CATALOG_IMAGES . DIR_WS_BANNERS . $banners_image_target);

 

Make changes to all instances of it in that file, and then save and edit *catalog*/includes/configure.php, and below the definition for DIR_WS_IMAGES, add:

 

define('DIR_WS_BANNERS', DIR_WS_IMAGES . 'backup/');

 

Then save that and edit *catalog*/includes/functions/banner.php, and right about line 86, change:

 

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

 

Change the DIR_WS_IMAGES to DIR_WS_BANNERS...

 

That should do the trick, but there's a chance I might've missed something, I don't think so though :)

 

Richard.

Richard Lindsey

  • 1 month later...
Posted

I took a short cut, cuz I'm completely new here

opened my shop Monday - and could not make my banners function.

uploaded the banners by ftp to the banner folder

then in the banner manager - just wrote after .....images "/banners/filename.gif"

this did the trick

Archived

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

×
×
  • Create New...