Hi,
Sorry if exists a topic with this mod but I have been trying to find it but nothing..
Before I had another version of 4images and I had a great mod for the resizing of the big images without creating another image with other domensions. It was the original mges but resize and with a message upon the pic saying that the pic was resized.
The code was this:
in "functions.php" 3 new lines:
// HV : resize to fit layout if necessary
unset($resized);
$dispwidth = 548;
if ($width > $dispwidth) {
$picratio = $height / $width;
$dispheight = floor($picratio * $dispwidth);
$width_height = " width=\"". $dispwidth . "\" height=\"" . $dispheight . "\"";
$resized = 1;
}
// end HV
if ($detailed_view && isset($info['APP13'])) {
$iptc_array = get_iptc_info($info['APP13']);
$bgcounter = 0;
foreach ($iptc_array as $key => $val) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$site_template->register_vars(array(
"iptc_value" => $val,
"iptc_name" => $lang['iptc_'.$key],
"row_bg_number" => $row_bg_number
));
$iptc_info .= $site_template->parse_template("iptc_bit");
}
}
}
$site_template->register_vars(array(
"media_src" => $media_src,
"media_icon" => $media_icon,
"image_name" => $image_name,
// HV : resize to fit layout if necessary
"resized" => $resized,
"width_height" => $width_height,
"width" => $width,
"height" => $height,
"dispwidth" => $dispwidth,
"dispheight" => $dispheight,
"iptc_info" => $iptc_info
));
And in the "details.html" other new lines:
{if resized} The image on this page is reduced in size.
{download_button} to get the original size ({width} x {height} pixels).
{endif resized}
I would like to have this in the last version of 4images and the mods i have found what they do is creating another big thmbnail of 800x600 for example and when you click it a new window is opened with the original pic, but what I would like to have is the original pic but resized proporcionally with the message upon it and then when you download it with right buttom you could see in full size in the PC.
Thanks in advance! and sorry for my english jeje