The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Show userfield in what's going on (almost there)
Hi
So i'm trying to display an image infront of the usernames in the "currently active users" list of what's going on. The name of the image is stored in the userfields table, as field6 So far I've added the lookup of the userfield in the "logged in users" query in forum.php, so now it looks like this Code:
$forumusers = $db->query_read_slave(" SELECT user.username, userfield.field6, (user.options & " . $vbulletin->bf_misc_useroptions['invisible'] . ") AS invisible, user.usergroupid, user.lastvisit, session.userid, session.inforum, session.lastactivity, session.badlocation, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid $hook_query_fields FROM " . TABLE_PREFIX . "session AS session LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = session.userid) LEFT JOIN " . TABKE_PREFIX . "userfield AS userfield ON(userfield.userid = session.userid) $hook_query_joins WHERE session.lastactivity > $datecut $hook_query_where " . iif($vbulletin->options['displayloggedin'] == 1 OR $vbulletin->options['displayloggedin'] == 3, "ORDER BY username ASC") . " "); under the forumhome_loggedinuser hook in forum.php I've put Code:
$loggedin['image'] = $loggedin['field6']; Code:
<img src="{vb:stylevar imgdir_misc}/{vb:raw loggedin.image}.gif" /> {vb:raw loggedin.musername} To test I've changed Code:
$loggedin['image'] = $loggedin['field6']; Code:
$loggedin['image'] = $loggedin['usergroupid']; any idea where I went wrong? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|