The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
My forum uses avatars sized 60px wide by 100px tall and allows users to upload their own custom avatars. However I can't seem to find a way to set the board so that it allows/forces the users to upload 60x100 avatars of their own. I can set it at 60x60 and 100x100 but there appears to be no way to set up the board to accept asymetricaly-sized avatars. This is a big issue on my forum since there are many graphic artists who frequent the boards and who would like to customize their avatars. Any help you guys can offer?
-Necro Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
You're right, there's no way to do this with the standard vB. You'll need a hack - probably just a simple change to avatar.php. I'll move this to the Hacks request forum.
|
|
#3
|
||||
|
||||
|
Umm, nice idea.
|
|
#4
|
||||
|
||||
|
Actually come to think of it, this would require a change to admin/index.php as well.
|
|
#5
|
||||
|
||||
|
Not really, just to member.php.
(and run two queries) |
|
#6
|
||||
|
||||
|
But don't you have the change the 'Change options' setting in the Admin CP so you can set both height and width?
|
|
#7
|
||||
|
||||
|
Oh no my friend, that is done automatically.
![]() (hack comes in a couple of minutes) |
|
#8
|
||||
|
||||
|
Ok, first of all in member.php replace this:
Code:
if ($imginfo[0]>$avatarmaxdimension or $imginfo[1]>$avatarmaxdimension) {
Code:
if ($imginfo[0]>$avatarmaxwidth or $imginfo[1]>$avatarmaxheight) {
Code:
INSERT INTO setting (settingid,settinggroupid,title,varname,value,description,optioncode,displayorder) VALUES (NULL,26,'Maximum width','avatarmaxwidth',64,'Maximum width (in pixels) that the custom avatar image can be','',9); INSERT INTO setting (settingid,settinggroupid,title,varname,value,description,optioncode,displayorder) VALUES (NULL,26,'Maximum Height','avatarmaxheight',64,'Maximum height (in pixels) that the custom avatar image can be','',10); DELETE FROM setting WHERE varname='avatarmaxdimension'; And that's it!
|
|
#9
|
|||
|
|||
|
Thanks for the info guys!
I'll give this code a run through and see what happens. Hopefully I'll never have to see a square avatar on my forum again. ![]() -Necro |
|
#10
|
|||
|
|||
|
Okay so the hack works just fine however I now have a problem with the member.php page where it doesn't show the avatar sizes that I've implemented.
An example would be that, instead of showing: Note: the maximum size of your custom image is 60 by 100 pixels or 10024 bytes (whichever is smaller). it'll show: Note: the maximum size of your custom image is by pixels or 10024 bytes (whichever is smaller). How do I fix this? -Necro |
![]() |
|
|