The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi. I installed most of avatar-related hacks and uploaded many many avatars (categorized) to my board.
Most of them are animated gif, very nice. Well, now I would make them displayed uniformly, i.e. some are larger than others. I saw the 50 pixel affects only the uploaded avatar dimension, but I would resize all the images larger than 50px to that limit, without deforming them Is there any hack or other way to limit everywhere the size of those avatars ? Thanks a lot. Bye |
#2
|
|||
|
|||
![]()
I though to modify the avatar-related templates calculating in the calling phps the scaled dimensions to my limits.
Does anybody have a trick or at least could tell me if it's a comprehensive method ? Thnx |
#3
|
||||
|
||||
![]()
Use getimagesize():
http://www.php.net/manual/en/function.getimagesize.php |
#4
|
|||
|
|||
![]()
Yes, thanks. Of course.
As the dim check is done everywhere in vb code PHP Code:
Or, at least, resize by hand all my avatars with PhotoShop or similar, as the uploaded custom avatars have the dimension size limit at code level ??? :stupid: P.S.: do you know why uploaded avatars aren't deleted in my server's temp dir ? (Linux, safe mode) Thanks |
#5
|
||||
|
||||
![]()
Add a check in getpostbit() that checks, if the user is using an avatar from your stock, the site of the image, then $imageinfo[3] in the <img> tag.
Because I'm nice (read: bored ![]() Code:
if ($post[avatarid]!=0) { $avatarurl=$post[avatarpath]; } else { Code:
if ($post[avatarid]!=0) { $avatarurl=$post[avatarpath]; $imginfo = getimagesize('/path/to/your/images/folder/' . $avatarurl); if ($imginfo[0]>50) { $moreimgtag = 'width="50"'; } if ($imginfo[1]>50) { $moreimgtag .= 'height="50"'; } } else { $moreimgtag = ''; |
#6
|
|||
|
|||
![]() Quote:
(couldn't say 'bored', my side...) ![]() Thanks P.S. 1: of course, you wouldn't get upset if I'd rescale proportionally sizes and post here my solution ? P.S. 2: I should make the same-kind replacement also in announcement, private and elsewhere used avatars... ![]() Thanks again. Bye |
#7
|
||||
|
||||
![]()
P.S. 1, no I don't mind, and I'd love if you could post this.
P.S. 2, that's correct. BTW did you even test my code? I don't think it'll work right away anyway... |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|