5
Here is a hack that force the resizing to keep the image proportion.
index.php: (about line 67)
add this code
$ImageSize = getimagesize($array_partners[$i]["image"]);
$ImageWidth = "";
$ImageHeight = "";
if(is_array($ImageSize)) {
if($ImageSize[0] >= $ImageSize[1]) $ImageWidth = ($ImageSize[0]>100 ? "100" : $ImageSize[0]);
else $ImageHeight = ($ImageSize[1]>100 ? "100" : $ImageSize[1]);
} else {
$ImageWidth = "100";
}
About line 78
Change
$ImagePartner .= ".$array_partners[$i]["image"]."' alt='".$array_partners[$i]["url"]."' width='102' height='47' border='0' />";
with
$ImagePartner .= ".$array_partners[$i]["image"]."' alt='".$array_partners[$i]["url"]."' ".(!empty($ImageHeight) ? "height="$ImageHeight"" : "width="$ImageWidth"")." border='0' />";
block/partners.php: (about line 46)
add this code after
list($id, $url, $image, $title) = $xoopsDB->fetchrow($result);
$ImageSize = getimagesize($image);
$ImageWidth = "";
$ImageHeight = "";
if(is_array($ImageSize)) {
if($ImageSize[0] >= $ImageSize[1]) $ImageWidth = ($ImageSize[0]>100 ? "100" : $ImageSize[0]);
else $ImageHeight = ($ImageSize[1]>100 ? "100" : $ImageSize[1]);
} else {
$ImageWidth = "100";
}
$partners['dimensions'] = (!empty($ImageHeight) ? "height="$ImageHeight"" : "width="$ImageWidth"");
templates/blocks/xoopspartners_block_site.html: (about line 40).
Replace:
<img src="<{$partner.image}>" width="102" border="0" alt="<{$partner.url}>" <{$block.fadeImage}> /><br />
with:
<img src="<{$partner.image}>" <{$partner.dimensions}> border="0" alt="<{$partner.url}>" <{$block.fadeImage}> /><br />
Now go to admin section and click on the module upgrade button