Let me know what you think and if this can be improved:
1. Create the thumbnailcache (/cache) in the OScommerce root and give this directory 777 rights.
2. Get timthumb.php from timthumb.googlecode.com.
3. In timthumb.php change:
if ($new_width == 0 && $new_height == 0) {
$new_width = 100;
$new_height = 100;
}
toif ($new_width == 0 && $new_height == 0) {
$new_width = $width;
$new_height = $height;
}
4. Upload timthumb.php to your OScommerce root
3. Now we're gonna edit /includes/functions/html_output.php
// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
$image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';
to
// alt is added to the img tag even if it is null to prevent browsers from outputting // the image filename as default $image = '<img src="/k/catalog/timthumb.php?src=' . tep_output_string($src) . '&w=' . tep_output_string($width) . '&h=' . tep_output_string($height) . '&zc=0" border="0" alt="' . tep_output_string($alt) . '"';
That's it.
More info about TimThumb:
www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/
code.google.com/p/timthumb/]l]
/Frank
Edited by Jan Zonjee, 02 April 2010, 07:16.















