
06-01-2002, 06:58 PM
|
 |
|
|
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
How would you do this for a memberlist online status column?
[QUOTE] Originally posted by Wolf42
Ok, I got it for myself 
Find
PHP Code:
$templatesused="postbit_online,postbit_offline,showgroups,showgroups_groups,showgroups_adminbit,postbit_sendpm,showgroups_bit,showgroups_forumbit,showgroups_forumsplit,postbit_avatar";
and replace with
PHP Code:
$templatesused="postbit_online,postbit_offline,postbit_away,showgroups,showgroups_groups,showgroups_adminbit,postbit_sendpm,showgroups_bit,showgroups_forumbit,showgroups_forumsplit,postbit_avatar";
Find
PHP Code:
if ($user['lastactivity'] > $datecut and !$user['invisible'] and $user['lastactivity'] != $user['lastvisit']) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
an replace with
PHP Code:
if ($user[away]=="1") {
eval("\$onlinestatus = \"".gettemplate("postbit_away")."\";");
} else {
if ($user['lastactivity'] > $datecut and !$user['invisible'] and $user['lastactivity'] != $user['lastvisit']) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
}
Find
PHP Code:
// get administrators & super moderators **********************************************************
$users = $DB_site->query("
SELECT
$locationfieldselect usergroup.title, user.username, user.userid, user.invisible, user.receivepm,
user.usergroupid, user.lastactivity, user.lastvisit
and replace with
PHP Code:
// get administrators & super moderators **********************************************************
$users = $DB_site->query("
SELECT
$locationfieldselect usergroup.title, user.username, user.userid, user.invisible, user.receivepm,
user.usergroupid, user.lastactivity, user.lastvisit,user.away
Find
PHP Code:
// get moderators **********************************************************
$users = $DB_site->query("
SELECT
$fieldselect forum.forumid, forum.title AS forumtitle,
user.username, user.userid, user.invisible, user.receivepm, user.lastactivity, user.lastvisit
and replace with
PHP Code:
// get moderators **********************************************************
$users = $DB_site->query("
SELECT
$fieldselect forum.forumid, forum.title AS forumtitle,
user.username, user.userid, user.invisible, user.receivepm, user.lastactivity, user.lastvisit,user.away
I just added user.away twice, added postbit_away in templatesused and modified the code like the funktions.php.
It is working well on my board.
|