Ok after way too much code searching and debuging I think I found my problem. Don't know if this is a bug or not cuz I have so many contribs but...I went back and looked at the default oscmax code and looks like this is broke.
If you look at the function tep_image in :
/catalog/admin/includes/functions/html_output.php (search for 'tep_image')
you will find something like this:
PHP Code:
// The HTML image wrapper function
// LINE CHNAGED: MS2 update 501112 - changed 'params' to 'parameters'
function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
// BOF: MS2 update 501112-Added all 'tep_not_null()'
$image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';
if (tep_not_null($alt)) {
$image .= ' title=" ' . tep_output_string($alt) . ' "';
}
if (tep_not_null($width) && tep_not_null($height)) {
$image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
}
if (tep_not_null($parameters)) $image .= ' ' . $parameters;
// EOF: MS2 update 501112
$image .= '>';
return $image;
}
I believe the if statement " if (tep_not_null($width) && tep_not_null($height))" should eb a OR like this:
if (tep_not_null($width) || tep_not_null($height))
Seeing how pretty much everything you find says never to input the height and the width and the tep_not_null returns true only when there is a value, if you only fill in the height or the width then this is going to come out as a FALSE which in turns causes the width and height to not be displayed in the <IMG> tag for the image.
Anyhow, I'm using ImageMagic on the man part of my site os this function is pretty much replaced. However, for the admin it's a problem. Changing the and to a OR has fixed my issue. Just thought I would mention this as maybe it's a bug that needs to be fix or at least the documents need to be updated to say you must have height as 0 if width is set or width as 0 if height is set etc...
Bookmarks