2008-06-27, 02:52 PM
2008-06-27, 03:12 PM
if($post['avatar'] != "" && ($mybb->user['showavatars'] != 0 || !$mybb->user['uid']))
{
$post['avatar'] = htmlspecialchars_uni($post['avatar']);
$avatar_dimensions = explode("|", $post['avatardimensions']);
if($avatar_dimensions[0] && $avatar_dimensions[1])
{
list($max_width, $max_height) = explode("x", $mybb->settings['postmaxavatarsize']);
if($avatar_dimensions[0] > $max_width || $avatar_dimensions[1] > $max_height)
{
require_once MYBB_ROOT."inc/functions_image.php";
$scaled_dimensions = scale_image($avatar_dimensions[0], $avatar_dimensions[1], $max_width, $max_height);
$avatar_width_height = "width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\"";
}
else
{
$avatar_width_height = "width=\"{$avatar_dimensions[0]}\" height=\"{$avatar_dimensions[1]}\"";
}
}
eval("\$post['useravatar'] = \"".$templates->get("postbit_avatar")."\";");
$post['avatar_padding'] = "padding-right: 10px;";
}
else
{
$post['useravatar'] = "";
}
Its not passing the if($avatar_dimensions[0] && $avatar_dimensions[1]) statement which means he has an old avatar from way back in the day when we didn't store dimensions on avatars.
2008-06-27, 03:30 PM
Could we force the upgrader to give avatars with no dimensions, the default max dimensions so that doesn't happen? I've seen it twice now on here.
2008-06-27, 03:39 PM
Yeh, that's what I've done
2008-06-27, 03:39 PM
Thank you for your bug report.
This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.
This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.
2008-07-11, 12:41 AM
Is this Bug fixed in MyBB 1.4 Beta 2 ?
Because some Avatars ( the first and the third) in the following image still not resize...
[attachment=9788]
[attachment=9789]
Because some Avatars ( the first and the third) in the following image still not resize...
[attachment=9788]
[attachment=9789]