Works in vB 4.2.0 PL 2
I really enjoy this mod. Thanks!!!
A couple minor edits I made for style and get it anchored on the right side are in
RED:
Quote:
if (!$vbulletin->userinfo['userid'])
{
}
else
{
$datecut = TIMENOW - $vbulletin->options['cookietimeout'];
$buddys = $vbulletin->db->query_read("
SELECT
user.username, user.userid, user.lastactivity
FROM " . TABLE_PREFIX . "userlist AS userlist
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = userlist.relationid)
WHERE userlist.userid = {$vbulletin->userinfo['userid']} AND userlist.relationid = user.userid AND type = 'buddy' AND user.lastactivity > $datecut
ORDER BY username ASC
");
$output = '';
while ($buddy = $vbulletin->db->fetch_array($buddys))
{
$output .= ' <a href="member.php?' . $buddy['userid'] . '"><font color=#83B4CC><b>' . $buddy['username'] . '</b></font></a> ';
}
if ($output != '')
{
$output = '<font color=#828E99>Friends Online:</font>' . $output;
$template_hook['navtab_end'] .= '
<style type="text/css">
#bottom {
position: fixed;
z-index:10000!important;
right: 5px;
bottom: 0px;
text-align: right;
background-color: #01060A;
}
</style>
<div id="bottom" class="blockhead">
';
$template_hook['navtab_end'] .= $output;
$template_hook['navtab_end'] .= '
</div>
';
}
}
|