MaSTaKiLLaH, I had the same problem in 2.2.1
What I did (and seems to be working so far lol) is first off, look for
$filenum=@fopen($filename,"rb");
But what I did on this file and admin/user.php, is just compare the find & replace codes in the directions, and see what had changed. Then I only made those changes (so if there were other differences that were supposed to be there, I didn't mess them up.)
There are three changes to each file:
For
member.php,
(1) you just need to add this at the top, before $filenum=@fopen($filename,"rb"):
Quote:
if ($usefileavatar) {// store avatars as files
@unlink("custom_avatars/avatar$bbuserinfo[userid]_".($bbuserinfo[avatarrevision]).".gif");
copy($filename,"custom_avatars/avatar$bbuserinfo[userid]_".($bbuserinfo[avatarrevision]+1).".gif");
$DB_site->query("UPDATE user SET avatarrevision=avatarrevision+1 WHERE userid='$bbuserinfo[userid]'");
}
|
then after
(2)
"exit;
}"
and after
(3):
"$avatarid=0;"
add:
Quote:
if ($usefileavatar) @unlink("custom_avatars/avatar$bbuserinfo[userid]_".($bbuserinfo[avatarrevision]).".gif");
|
For
admin/user.php, (1) you just need to add this at the top, before $filenum=@fopen($filename,"rb"):
Quote:
if ($usefileavatar) {// store avatars as files
@unlink("../custom_avatars/avatar$bbuserinfo[userid]_".($bbuserinfo[avatarrevision]).".gif");
copy($filename,"../custom_avatars/avatar$bbuserinfo[userid]_".($bbuserinfo[avatarrevision]+1).".gif");
$DB_site->query("UPDATE user SET avatarrevision=avatarrevision+1 WHERE userid='$bbuserinfo[userid]'");
}
|
then after
(2)
"//exit;
//}"
and after
(3):
"$avatarid=0;"
add:
Quote:
if ($usefileavatar) @unlink("custom_avatars/avatar$bbuserinfo[userid]_".($bbuserinfo[avatarrevision]).".gif");
|
Also, bira's instructions for 2.2.1 may need to be amended (though it also might have just been me as well)
She has:
Quote:
if ($usefileavatar) {
return "custom_avatars/avatar$userid"."_$avatarinfo[avatarrevision].gif";
|
But I got a parse error in the "if ($usefileavatar) {" line when I went to my admin cp options. So I made that line as in Kier's instructions - leaving out the "{".
I hope this is helpful - sorry if it's confusing