Kars10
01-08-2003, 09:43 AM
Hi Hackers!!
Sorry i didn?t find any hack out there with this.
I need avatars in showgroups.
I found this variable $user[avatar] but no code in showgroups.
Is there anyone who can help me with this?
Thanks. :)
Xenon
01-30-2003, 12:47 PM
hey lucky one.
i've made this hack for a old bord i don't run anymore but i found the files again ^^
in showgroups.php find:
if ($user['receivepm'] == 0) {
$sendpmlink = " ";
} else {
$post['userid'] = $user['userid'];
eval("\$sendpmlink = \"".gettemplate("postbit_sendpm")."\";");
}
below add:
//Avatar
if ($user[avatarid]!=0) {
$avatarurl=$user[avatarpath];
} else {
if ($user[hascustomavatar] and $avatarenabled) {
$avatarurl="avatar.php?s=$session[sessionhash]&userid=$user[userid]";
} else {
$avatarurl="";
}
}
if ($avatarurl=="") {
$user[avatar]="";
} else {
eval("\$user[avatar] = \"".gettemplate("postbit_avatar")."\";");
}
//End Avatar
then this:
$users = $DB_site->query("
SELECT
$locationfieldselect usergroup.title, user.username, user.userid, user.invisible, user.receivepm,
user.usergroupid, user.lastactivity, user.lastvisit
FROM usergroup
LEFT JOIN user ON (usergroup.usergroupid = user.usergroupid)
LEFT JOIN userfield ON (userfield.userid = user.userid)
WHERE usergroup.showgroup = 1
");
into this:$users = $DB_site->query("
SELECT
$locationfieldselect usergroup.title, user.username, user.userid, user.invisible, user.receivepm,
user.usergroupid, user.lastactivity, user.lastvisit,avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar
FROM usergroup
LEFT JOIN user ON (usergroup.usergroupid = user.usergroupid)
LEFT JOIN userfield ON (userfield.userid = user.userid)
LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid
WHERE usergroup.showgroup = 1
");
and this:
$users = $DB_site->query("
SELECT
$locationfieldselect forum.forumid, forum.title AS forumtitle,
user.username, user.userid, user.invisible, user.receivepm, user.lastactivity, user.lastvisit
FROM moderator
LEFT JOIN user ON (user.userid = moderator.userid)
LEFT JOIN forum ON (forum.forumid = moderator.forumid)
LEFT JOIN userfield ON (userfield.userid = user.userid)
WHERE forum.active = 1
ORDER BY user.username ASC, forum.displayorder ASC
");
change into this:
$users = $DB_site->query("
SELECT
$locationfieldselect forum.forumid, forum.title AS forumtitle,
user.username, user.userid, user.invisible, user.receivepm, user.lastactivity, user.lastvisit,avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar
FROM moderator
LEFT JOIN user ON (user.userid = moderator.userid)
LEFT JOIN forum ON (forum.forumid = moderator.forumid)
LEFT JOIN userfield ON (userfield.userid = user.userid)
LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid
WHERE forum.active = 1
ORDER BY user.username ASC, forum.displayorder ASC
");
i think it should work, even if the hack was for a very old version ;)
Dont work with V. 2.3.5 :ermm:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.