$a_images .= display_image_attach($a_data['attach_name'], "100", "100", $data['post_id'])."n";
function display_image_attach($file, $width = 50, $height = 50, $rel = "") {
$size = @getimagesize(FORUM."attachments/".$file);
if ($size [0] > $height || $size [1] > $width) {
if ($size [0] < $size [1]) {
$img_w = round ( ($size [0] * $width) / $size [1] );
$img_h = $width;
} elseif ($size [0] > $size [1]) {
$img_w = $height;
$img_h = round ( ($size [1] * $height) / $size [0] );
} else {
$img_w = $height;
$img_h = $width;
}
} else {
$img_w = $size [0];
$img_h = $size [1];
}
Quote
Craig wrote:
Not sure, does what I posted do it as well?
Category Forum
Modifications and Requests - 8Labels
None yet
Statistics
3 participants
Notifications
You are not receiving notifications from this thread.
Related Questions