jeffj
12-14-2002, 04:07 PM
I want to show one of my optional fields in the member table in the $whosonlinebit template. I believe I have to add some code i online.php, but I don't see that user or the userfield tables are even accessed in online.php.
any ideas on how to do this?
thanks in advance...
- jeff
Xenon
12-14-2002, 09:21 PM
in online.php you see this:
$allusers= $DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.usergroupid, user.invisible, session.host, user.showemail, user.receivepm
FROM session
". iif($WOLguests, " LEFT JOIN user USING (userid) ", ",user") ."
WHERE session.lastactivity > $datecut
". iif(!$WOLguests, " AND session.userid = user.userid", "") ."
ORDER BY user.username
");
there is the user-table in a join-query....
change it to:
$allusers= $DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.usergroupid, user.invisible, session.host, user.showemail, user.receivepm, userfield.fieldX
FROM session
". iif($WOLguests, " LEFT JOIN user USING (userid) LEFT JOIN userfield USING(userid)", ",user") ."
WHERE session.lastactivity > $datecut
". iif(!$WOLguests, " AND session.userid = user.userid", "") ."
ORDER BY user.username
");
replace fieldX with the one you want :)
i think that should work
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.