This modification allows the existing image wrapper function to consider your configured image width and height variables as maximum values, not absolute values. It's almost like your configured width and height variables define a box within which your images will fit while maintaining their original aspect ratio (instead of stretching one of the images dimensions).
The modification is pretty basic, and will basically only affect what you want it to affect (no adverse effect on existing code).
The main part of this modification is a slight change to the function tep_image, found in includesfunctionshtml_output.php. If your function definition looks different than this:
function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '')
..then you should probably not apply this modification, as it would appear you have made some other modification which may conflict.
The attached file is *NOT* meant to be uploaded as is... I only made it a .php file so that if you have a code-highlighting editor it would be more visually appealing.
Also note that this is my first contribution... I apologize if I have not followed standard procedure :)
Contribution Moving
10/07/2005 by e_covert
*NO CHANGE TO FILE*
This is just a note to let you know that I am moving this contribution into the features section, where I believe it will be more readily found. Use the following url to get to the latest version:
http://www.oscommerce.com/community/contributions,3629
The support forum is still located at:
http://forums.oscommerce.com/index.php?showtopic=156331
Enjoy :)
Image Stretch Fix v1.2
10/05/2005 by e_covert
Modifications:
- default stretch is now set to 'false'... besides working remarkably well, it also makes installation much easier.
- as before, images will always maintain their aspect ratio, but now if the image is smaller than the passed in width and height, the image will not be expanded to fit... it will use it's original dimensions. By maintaining aspect ratio and not expanding smaller images, the pixellation of images throughout the site is significantly lessened.
NO CHANGE TO FILE
06/20/2005 by Eric Covert
Just letting people know, you can reach the support forum for this contribution at:
http://forums.oscommerce.com/index.php?showtopic=156331
* File has not been changed
NO CHANGE TO FILE
06/20/2005 by Eric Covert
Just a quick description fix... my slashes weren't accepted....
The function tep_image can be found in includes/functions/html_output.php
Image Stretch Fix
06/20/2005 by Eric Covert
This modification allows the existing image wrapper function to consider your configured image width and height variables as maximum values, not absolute values. It's almost like your configured width and height variables define a box within which your images will fit while maintaining their original aspect ratio (instead of stretching one of the images dimensions).
The modification is pretty basic, and will basically only affect what you want it to affect (no adverse effect on existing code).
The main part of this modification is a slight change to the function tep_image, found in includesfunctionshtml_output.php. If your function definition looks different than this:
function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '')
..then you should probably not apply this modification, as it would appear you have made some other modification which may conflict.
The attached file is *NOT* meant to be uploaded as is... I only made it a .php file so that if you have a code-highlighting editor it would be more visually appealing.
Also note that this is my first contribution... I apologize if I have not followed standard procedure :)
As experienced osCommerce Experts, we are glad to help you to install this addon. The process is as follow:
- You placed an order of this addon or other addons, checkout and receive an email notification of order status
- Or you can contact us directly using email form, asking us to install this addon for you
- Once you and we have agreed to start, please send us FTP access by email
- You will be updated of the installation status
- You may ask for customization jobs of this addon
You Risk Nothing: No Upfront Payment Required
Our
NO RISK POLICY is clear. You pay only for the successful completion of the installation. If you are not satisfied or we are unsuccessful, your site will be returned to its previous working state and
you pay nothing! NOT A PENNY!
Once you are satisfied with our help, you can pay us through Paypal.