vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - Friends online at the bottom of the screen (https://vborg.vbsupport.ru/showthread.php?t=258947)

stationar 02-15-2011 10:00 PM

Friends online at the bottom of the screen
 
1 Attachment(s)
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>  

'
;
}



GamerPerfection 02-16-2011 07:12 AM

Screenshot please.

ellinofatsa 02-16-2011 07:17 AM

Demo please?

Forum Lover 02-16-2011 09:39 AM

How can I use this as forum blocks? :) Nice idea. Tagged.

blind-eddie 02-16-2011 10:03 AM

I added plugin to vb4.1 test site & it does work but, it shows your friends even if your friends are not online.
When viewing your profile page the list falls behind the left blocks.
Oh and I changed position of list to left, names would not fully show unless I did this.

Test Site Demo: http://bigsite.biz/vb4.1
Login: Jimmy
Password: 00000000

http://blind-eddie.com/forum/imageho...bbdc9c2c9a.png

blind-eddie 02-16-2011 11:51 PM

Posted on my live test site

Quote:

hello friend
hello your Friends online at the bottom of the screen is not work
First off, its not mine, I only showed a demo for others to see. The only way it will show is if your friends are online. I could sit here all day to show stationar mod but I can't.

His mod only shows your friends there when they are online and then it will not show until another returns.


Login to any account there (look at member list) but mine with the same password, hopefully you will get lucky enough and someone else will be there.

stationar 02-17-2011 03:17 AM

Feel free to change anything you want. I added a screen from my test site.
And, I believe, 'navtab_end' is not the best hook to use. If I will find a better hook, I will post the change.

stationar 02-18-2011 09:52 PM

Changed the code, so it will look better, and always stay on top of the other content.

RamisK 02-20-2011 10:49 AM

very nice, thanks!

Sicilian 02-27-2011 08:20 AM

Can some please explain how exactly this is installed please.


All times are GMT. The time now is 06:06 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01192 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete