MyBB Community Forums

Full Version: one mod who make all avatars have same size
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi, i think mybb is very good project, serious with alot of experts, this forum deserve one mod/plugin that resize the avatars not only when the avatar is to bigger, but also the smaller avatars must get bigger, so inside the forums u will see all the avatars at the same size, look how fail look this theme if one avatar is smaller than the other:

[Image: ula.png]

i hope someone make it, for free
Use css. Give the post avatars a class and in your css apply a width to the post avatars. It can look quite horrible though if the source avatar is small.
hi Leefish, i used this
<a href="{$post['profilelink_plain']}"><img src="{$post['avatar']}" alt="" width="80" height="80""

http://mods.mybb.com/view-resource/auto-avatar-size

[Image: 79v2.png]

and in postbit got deformed:

[Image: b39.png]



works pretty good, the problem is that deforms the images, for example if u use one image wich is not a square, it get deformed because the code will force it to look wide

i would like to not deform the images so much,, like xenforo, vbuletin, youtube, the avatars must have the same size in postbit, if the image is not a square, the script must not force the image to get wider, it must add on that space an random color, black or white..
Then you need to give the image a height of auto and put it inside a containing div with a max height and width which is square with the overflow hidden. This will crop the image. you dont need a plugin for this.



Read these posts on stackoverflow.

http://stackoverflow.com/questions/49329...nd-cropped
im not expert in coding

but i changed the height to auto,
<a href="{$post['profilelink_plain']}"><img src="{$post['avatar']}" alt="" width="80" height="auto""

works, he make all the avatars wide, the problem is if u setup one bigger avatar, the height get the original size, because is auto..

you know how can i set a limit on height but let it at auto at the same time?

original size

[Image: fxg.png]

in postbit:

[Image: zzf.png]

and the fail is here, the image not get resized on height:

[Image: hmg.png]
Use the crop as in the stackoverflow link - yes his avatar will get chopped in half - that is what crop means.
if anyone knows how to make it, let me know, thanks
It would be great to include this one as plugin: http://www.webmotionuk.co.uk/jquery/imag...d_crop.php

Users can easily crop avatars themselves!