Contributions
Automatic Thumbnail Creator v1.0
Automatically generates thumbnail jpg/png images (under new name) to the size defined in admin. Optionally will maintain
the original image proportions and centre the thumbnail on a backgound colour you set to suit your site.
Requirements GD >= 2.01, PHP >= 4.0.6 Works with osC 2.2 (uses the idea from netpbm contribution)
Expand All / Collapse All
If you have a bunch of files that have spaces in their filenames, you'll find this contribution won't work. The problem is the getimagesize() function doesn't like filenames with spaces.
Replace the source image parameter in all calls to the functions tep_use_resampled_image (admin) or tep_image_resample with tep_output_string(<img variable>):
/includes/functions/html_output.php, around line 80 (the HTML image wrapper function):
$src = tep_image_resample(tep_output_string($src),$width,$height);
You probably don't need to do this if you don't plan to have images with spaces or you will never upload the pictures manually using FTP and an import function..
I didn't change the distro at all, but FYI only.
This small mod automatically deletes the thumbnail when a different product image is uploaded preventing the need to manually delete the thumbnail.
Added step-by-step instructions and changelog.
Admin Section Modded (MaxiDVD)
I could not get the admin side to work with MS2 - CVS or MS3
tep_image() is not used in admin for product image preview - instead its tep_info_image()
Modded Function used in Admin to Call Images-
OLD FUNCTION:
tep_image() (admin/includes/functions/html_output.php)
NEW FUNCTION MS2-CVS-MS3 Replaced by:
tep_info_image() (admin/includes/functions/general.php)
All Credits to David Radford 'Radders'
This update includes a simple module for the admin section as well as the original one for the catalog section. Optionally your original files can be replaced rather than edited.
Checked for MS2 compatiblity and instructions simplified.
works with MS1 and Loaded 5
Effortless small images from PNG/JPG. Checked for MS1 compatibility
Automatically generates thumbnail jpg/png images (under new name) to the size defined in admin. Optionally will maintain
the original image proportions and centre the thumbnail on a backgound colour you set to suit your site.
Requirements GD >= 2.01, PHP >= 4.0.6 Works with osC 2.2 (uses the idea from netpbm contribution)
Note: Contributions are used at own risk.