freakenstein Posted April 1, 2010 Share Posted April 1, 2010 In my opinion Timthumb is currently one of the better and easiest thumbnailscripts available. Often used in WordPress templates, but I decided to use it in OScommerce. With these easy steps you can actually do the same. 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; } to if ($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 TimThumb for OScommerce http://www.oscommerce.com/forums/topic/356591-timthumb-for-oscommerce/ Link to comment Share on other sites More sharing options...
freakenstein Posted April 1, 2010 Author Share Posted April 1, 2010 correction: // 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) . '"'; should be // 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="/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) . '"'; TimThumb for OScommerce http://www.oscommerce.com/forums/topic/356591-timthumb-for-oscommerce/ Link to comment Share on other sites More sharing options...
Tini Posted May 18, 2010 Share Posted May 18, 2010 Hi... Not worked for me. When I make any changes that you indicate I lose all the images on the web Killo tu ere de Dos Hermanas... ;-)) Link to comment Share on other sites More sharing options...
DimeNote Posted May 18, 2010 Share Posted May 18, 2010 Hi... Not worked for me. When I make any changes that you indicate I lose all the images on the web Same here. Any solutions? Link to comment Share on other sites More sharing options...
acidvertigo Posted March 23, 2011 Share Posted March 23, 2011 Hello i have modified this addon to work with timthumb. Hope it helps Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.