osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

'On the Fly' Auto Thumbnailer using GD Library

This is a discussion on 'On the Fly' Auto Thumbnailer using GD Library within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; Based on nate_02631's 15 Dec 2005 Much like new tep_image() function in catalog/includes/functions/html_output.php Just replace ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 03-12-2007, 08:12 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,246
Thanks: 66
Thanked 294 Times in 280 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Post 'On the Fly' Auto Thumbnailer using GD Library

Based on nate_02631's 15 Dec 2005

Much like new tep_image() function in catalog/includes/functions/html_output.php
Just replace tep_image() function in catalog/admin/includes/functions/html_output.php with

function tep_image($src, $alt = '', $width = '', $height = '', $params = '') {

// Set default image variable and code
$image = 'r / $height = $image_size[1];br / }br / br / // Scale the image if larger than the set width or heightbr / if ($image_size[0] > $width || $image_size[1] > $height) {
$rx = $image_size[0] / $width;
$ry = $image_size[1] / $height;

if ($rx < $ry) {
$width = intval($height / $ratio);
} else {
$height = intval($width * $ratio);
}

$image = '';

return $image;
}

More...
__________________
Michael Sasek
osCMax Developer


osCMax Templates - Hundreds of premium quality templates. New designs every month!

xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience


osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread



Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
'On the Fly' Auto Thumbnailer using GD Library michael_s New osCommerce Contributions 0 03-11-2007 11:00 AM
JPG Thumbnailer michael_s New osCommerce Contributions 0 02-22-2007 10:01 AM
Dynamic Images / Auto Thumbnailer / Zoom Image Module? cTak osCMax v2 Customization/Mods 2 01-16-2006 11:56 AM
On the fly thumbnailer extremest osCMax v1.7 Discussion 1 03-26-2005 11:47 AM
Auto Reorder KCount osCommerce 2.2 Modification Help 1 03-25-2005 04:57 AM


All times are GMT -8. The time now is 07:51 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2008 osCMax