catalog/templates/fallback/new_products.php cerca dove trovi :
Codice: Seleziona tutto
tep_image(DIR_WS_IMAGES . $new_products['products_image'],
Codice: Seleziona tutto
tep_image_uffa_che_barba(DIR_WS_IMAGES . $new_products['products_image'],
aggiungi questo codice all'inizio del file:
Codice: Seleziona tutto
// "On the Fly" Auto Thumbnailer using GD Library, servercaching and browsercaching
// Scales product images dynamically, resulting in smaller file sizes, and keeps
// proper image ratio. Used in conjunction with product_thumb.php t/n generator.
function tep_image_uffa_che_barba($src, $alt = '', $width = '', $height = '', $params = '') {
if (! is_file($src)) {
$src = DIR_WS_IMG_TEMPLATES . "no_image.png";}
if (! is_file($src)) {
$src = DIR_WS_IMG_FALLBACK . "no_image.png";}
// Set default image variable and code
$image = '<img src="' . $src . '" class="img22ma" longdesc="read.html" ';
// Don't calculate if the image is set to a "%" width
if (strstr($width,'%') == false || strstr($height,'%') == false) {
$dont_calculate = 0;
} else {
$dont_calculate = 1;
}
// Dont calculate if a pixel image is being passed (hope you dont have pixels for sale)
if (!strstr($image, 'pixel')) {
$dont_calculate = 0;
} else {
$dont_calculate = 1;
}
// Do we calculate the image size?
if (CONFIG_CALCULATE_IMAGE_SIZE && !$dont_calculate) {
// Get the image's information
if ($image_size = @getimagesize($src)) {
$ratio = $image_size[1] / $image_size[0];
// Set the width and height to the proper ratio
if (!$width && $height) {
$ratio = $height / $image_size[1];
$width = intval($image_size[0] * $ratio);
} elseif ($width && !$height) {
$ratio = $width / $image_size[0];
$height = intval($image_size[1] * $ratio);
} elseif (!$width && !$height) {
$width = $image_size[0];
$height = $image_size[1];
}
// Scale the image if not the original size
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 = '<img class="img2ma" src="product_thumb.php?img='.$src.'&w='.
tep_output_string($width).'&h='.tep_output_string($height).'" longdesc="read.html" ';
}
} elseif (IMAGE_REQUIRED == 'false') {
return '';
}
}
// Add remaining image parameters if they exist
if ($width) {
$image .= ' width="' . tep_output_string($width) . '"';
}
if ($height) {
$image .= ' height="' . tep_output_string($height) . '"';
}
if (tep_not_null($params)) $image .= ' ' . $params;
$image .= ' alt="' . tep_output_string($alt) . '"';
if (tep_not_null($alt)) {
$image .= ' title="' . tep_output_string($alt) . '"';
}
$image .= ' />';
return $image;
}
alle volte non ricordo nemmeno io dove ho modificato e cosa ho modificato qua e la ...