Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OnTheFly AutoThumb: deleting Thumbs automatically?


BigBossMan

Recommended Posts

Hello,

 

i installed the contribution otf_autoThumb_v2-4fix3_1.zip and i wonder why the generated thumbnails are not deleted automatically when deleting a product?

Is this intention really very difficult, or could you tell me the php-code for deleting the thumbnails when deleting a product? I wonder because the contribution is about 4 years old and nobody has mentioned this drawback...

 

I'm new to php and osCommerce, but i think this section is responsible for deleting the original picture:

 

// BOF - Modification: On The Fly Auto Thumbnailer
// cujimmy - deleted the first bracket which looks like a leftover from something like an if ((a) && (b)) statement
//		if (($HTTP_POST_VARS['delete_image'] == 'yes') {
	  if ($HTTP_POST_VARS['delete_image'] == 'yes') {
		unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image']);
	  }
// EOF - Modification: On The Fly Auto Thumbnailer

 

If the variable products_previous_image contains the filename of the original image, it should be possible to change the filename depending on wich image dimensions are defined in the image configuration (small image, heading image, subcategory image) .

 

Is it possible to add additional unlink-commands, wich delete the tumbnails also?

 

Or can you recommend me another contribution wich generates thumbnails just as easy like otfAutoThumb and is able to delete the thumbnails automatically?

 

Many thanks.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...