OK, for those wishing to install this in 2.2.1:
Follow the instructions in post #1
except for the following change:
the instructions for file
admin/functions.php should be:
Quote:
Find:
PHP Code:
// ###################### Start getavatarurl #######################
function getavatarurl($userid) {
global $DB_site,$session;
if ($avatarinfo=$DB_site->query_first("SELECT user.avatarid,avatarpath,NOT ISNULL(avatardata) AS hascustom,customavatar.dateline
FROM user
LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid
WHERE user.userid='$userid'")) {
if ($avatarinfo[avatarpath]!="") {
return $avatarinfo[avatarpath];
} else if ($avatarinfo['hascustom']) {
return "avatar.php?userid=$userid&dateline=$avatarinfo[dateline]";
} else {
return '';
}
}
}
Replace with:
PHP Code:
// ###################### Start getavatarurl #######################
function getavatarurl($userid) {
global $DB_site,$session, $usefileavatar;
if ($avatarinfo=$DB_site->query_first("SELECT user.avatarid,avatarpath,avatarrevision,NOT ISNULL(avatardata) AS hascustom,customavatar.dateline
FROM user
LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid
WHERE user.userid='$userid'")) {
if ($avatarinfo[avatarpath]!="") {
return $avatarinfo[avatarpath];
} else if ($avatarinfo['hascustom']) {
if ($usefileavatar) {
return "custom_avatars/avatar$userid"."_$avatarinfo[avatarrevision].gif";
} else {
return "avatar.php?userid=$userid";
}
} else {
return '';
}
}
}
Find:
PHP Code:
if ($post[hascustomavatar] and $avatarenabled) {
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
Replace with:
PHP Code:
if ($post[hascustomavatar] and $avatarenabled) {
if ($usefileavatar) {
$avatarurl="custom_avatars/avatar$post[userid]_$post[avatarrevision].gif";
} else {
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
}
|
And, no changes should be made to
showthread.php.
That's it. All other instructions remain the same.
Cheers,
Bira