View Full Version : How to force avatar size in threads?
shibby2
01-07-2016, 08:08 PM
Hi, can someone tell me how to make all avatars a specific pixel size in threads? Like if I wanted all avatars to be 100x100.. how can I do this?
Thanks!
blind-eddie
01-07-2016, 10:07 PM
Avatar size is set in usergroup settings, make all usergroup avatar size to same to solve your issue.
MarkFL
01-07-2016, 10:24 PM
I suspect you are interested in making them all the same width, but would rather preserve the aspect ratio. If that's the case then...
Create a new plugin as follows:
Product: vBulletin
Hook Location: showthread_complete
Title: Set Avatar Size
Execution Order: 5
Plugin PHP Code:
$headinclude .= '<style type="text/css">.alt2 a img {width: 100px; height: auto;}</style>';
Plugin is Active: Yes
Click "Save."
shibby2
01-07-2016, 11:36 PM
I suspect you are interested in making them all the same width, but would rather preserve the aspect ratio. If that's the case then...
Create a new plugin as follows:
Product: vBulletin
Hook Location: showthread_complete
Title: Set Avatar Size
Execution Order: 5
Plugin PHP Code:
$headinclude .= '<style type="text/css">.alt2 a img {width: 100px; height: auto;}</style>';
Plugin is Active: Yes
Click "Save."
Thanks! However, it does not seem to have worked. :( Would this only work for all future avatars uploaded? Maybe that's why my current avatar didn't change size?
Thanks again for the help! :)
blind-eddie
01-07-2016, 11:45 PM
Rebuild your Rebuild Custom Avatar Thumbnails and Avatar Thumbnails via ACP/Maintenance/Update Counters and see if that helps.
shibby2
01-07-2016, 11:52 PM
Ok tried that, but it still didn't change the current avatar sizes.
I uploaded a new avatar, and it makes it 90x90.. however, I have the new plugin set to make avatars 80x80. lol Weird.
MarkFL
01-08-2016, 01:04 AM
Thanks! However, it does not seem to have worked. :( Would this only work for all future avatars uploaded? Maybe that's why my current avatar didn't change size?
Thanks again for the help! :)
Would you mind posting a link to a page on your site showing an avatar in a thread? Perhaps the HTML is a bit different than on my vB 3.8.9 site. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.