Back to vBulletin 4.x Add-ons

Friends online at the bottom of the screen
Mod Version: 1.00, by stationar

vB Version: 4.1.0 Rating: (2 votes - 4.50 average) Installs: 25
Released: 16 Feb 2011 Last Update: Never Downloads: 0
Not Supported Uses Plugins Is in Beta Stage  

This is something I made for my site, so people could quickly see who of their friends is online. Feel free to re-write the code, because this code is not perfect: I am not a real programmer, and used some of the vBulletin code (what a shame!).

Install:

Create new plug-in:

Product : vBulletin
Hook Location : process_templates_complete
Title : Friends Online
Execution Order : 5

PHP Code:
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=blue><b>' $buddy['username'] . '</b></font></a> ';  
    } 
if (
$output != '')
    {
    
$output '<font color=black>Friends online:</font>' $output;
    
$template_hook['navtab_end'] .= '  

<style type="text/css">  
#bottom {   
position: fixed;  
z-index:10000!important;
bottom: 0px;  
text-align: right; 
background-color: #eeeeee; 
}  
</style>  
<div id="bottom" class="blockhead">  

'
;  

$template_hook['navtab_end'] .= $output;  
$template_hook['navtab_end'] .= '  

</div>  

'
;
}

Download

No files for download.

Screenshots

Click image for larger version
Name:	screen.jpg
Views:	1013
Size:	25.8 KB
ID:	126751  


vblts.ru supports vBulletin®, 2022-2024