View Full Version : [fixed] PNG Avatars
Ksilebo
Thu 25th Jul '02, 3:05am
I usually make my avatars in PNG format, which always look better, and was wondering how one would go about allowing PNGs to be uploaded as avatars.
Floris
Thu 25th Jul '02, 5:19am
Originally posted by Ksilebo
I usually make my avatars in PNG format, which always look better, and was wondering how one would go about allowing PNGs to be uploaded as avatars. Nice question, I have a lot of members on my forum who would love to use png for avatars.
Scott MacVicar
Thu 25th Jul '02, 6:58am
PNG avatars have been supported since 2.2.2 well the code is there for it :)
Ive never actually got around to ever testing it, Ill go do it now
Floris
Thu 25th Jul '02, 7:02am
Originally posted by PPN
PNG avatars have been supported since 2.2.2 well the code is there for it :)
Ive never actually got around to ever testing it, Ill go do it now .. great, thank you for the effort.
Ksilebo
Thu 25th Jul '02, 7:04am
Originally posted by PPN
PNG avatars have been supported since 2.2.2 well the code is there for it :)
Ive never actually got around to ever testing it, Ill go do it now
Thanks for looking into it!
Scott MacVicar
Thu 25th Jul '02, 7:15am
PNG is supported in the admin area for avatars but not for the regular user, I presume this isnt intended so...
Moving to bugs
and em a fix :)
open member.php
find
if ($imginfo[2]!=1 and $imginfo[2]!=2) {
change to
if ($imginfo[2]!=1 and $imginfo[2]!=2 and $imginfo[2]!=3) {
Floris
Thu 25th Jul '02, 7:19am
AH!
So I wasn't mad in mah head!
Thank you. :)
Scott MacVicar
Thu 25th Jul '02, 8:52am
Also noticed that avatar.php was sending a gif header you dont have to do this but it would help.
Open up avatar.php
look for
header("Content-type: image/gif");
remove it
then look for
header("Last-Modified: " . gmdate("D, d M Y H:i:s",$avatarinfo[dateline]) . "GMT");
below it add
if(substr(strrchr(strtolower($avatarinfo[filename]),"."),1) == "jpg") {
header("Content-type: image/jpg");
} elseif (substr(strrchr(strtolower($avatarinfo[filename]),"."),1) == "png") {
header("Content-type: image/png");
} else {
header("Content-type: image/gif");
}
Floris
Thu 25th Jul '02, 9:00am
Originally posted by PPN
PNG is supported in the admin area for avatars but not for the regular user, I presume this isnt intended so...
Moving to bugs
and em a fix :)
open member.php
find
if ($imginfo[2]!=1 and $imginfo[2]!=2) {
change to
if ($imginfo[2]!=1 and $imginfo[2]!=2 and $imginfo[2]!=3) {
Applied and runs without a problem.
Thank you for making some times for this.
Ksilebo
Thu 25th Jul '02, 11:35am
I think I'm the only one who uses PNG, and can have one of my Admins set PNGs for others, so I can wait for 2.2.7+ for the fix to be included.
WHEE I FOUND A BUG!
vBulletin® v3.8.0 Beta 1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.