Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Friends online at the bottom of the screen Details »»
Friends online at the bottom of the screen
Version: 1.00, by stationar stationar is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.1.0 Rating:
Released: 02-15-2011 Last Update: Never Installs: 25
Uses Plugins
Is in Beta Stage  
No support by the author.

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>  

'
;
}

Screenshots

File Type: jpg screen.jpg (25.8 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 02-27-2011, 12:08 PM
GamerPerfection's Avatar
GamerPerfection GamerPerfection is offline
 
Join Date: Feb 2006
Posts: 389
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sicilian View Post
Can some please explain how exactly this is installed please.
Follow the instructions in the first post. Can't get any simpler than that.
Reply With Quote
  #13  
Old 02-27-2011, 04:14 PM
bulldog51981's Avatar
bulldog51981 bulldog51981 is offline
 
Join Date: Oct 2010
Location: St. Louis, Mo, USA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I add a comma to separated users in the list instead of just one after another?
Reply With Quote
  #14  
Old 02-27-2011, 05:31 PM
stationar stationar is offline
 
Join Date: May 2007
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The username design is in this part of the code:
PHP Code:
<a href="member.php?' . $buddy['userid'] . '"><font color=blue><b>' . $buddy['username'] . '</b></font></a'; 
Put comma before </b>. This comma will stay after each name (even after the last one)
Reply With Quote
  #15  
Old 02-27-2011, 09:04 PM
bulldog51981's Avatar
bulldog51981 bulldog51981 is offline
 
Join Date: Oct 2010
Location: St. Louis, Mo, USA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you! Worked like a charm!
Reply With Quote
  #16  
Old 02-28-2011, 04:32 AM
Sicilian Sicilian is offline
 
Join Date: Apr 2010
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks working a treat.

It would be great if members had the option to enable and disable as they pleased. Could this option be added?
Reply With Quote
  #17  
Old 03-01-2011, 10:23 PM
stationar stationar is offline
 
Join Date: May 2007
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That would take a professional programmer and a product to create. (add fields to database, etc.) I won't be able to do it. I am just playing with the code.
Reply With Quote
  #18  
Old 03-25-2011, 11:49 PM
bulldog51981's Avatar
bulldog51981 bulldog51981 is offline
 
Join Date: Oct 2010
Location: St. Louis, Mo, USA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am going to add an image to my "blockhead" stylevar for my forum display but when I do this it also carry's over to the background of the list and it is no longer white since the div id is calling from it. Is there anyway to override this to keep the background white?
Reply With Quote
  #19  
Old 03-28-2011, 04:05 PM
stationar stationar is offline
 
Join Date: May 2007
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can try any other class: popupmenu, for example.
Reply With Quote
  #20  
Old 10-07-2011, 05:34 AM
Sicilian Sicilian is offline
 
Join Date: Apr 2010
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've found that with this enabled, accessing the forum using an Ipad or iphone, the friends online widget scrolls up when your scroll upwards. It dont stay fixed at the bottom as it should.
Reply With Quote
  #21  
Old 10-07-2011, 05:37 AM
Sicilian Sicilian is offline
 
Join Date: Apr 2010
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Some info here http://blog.mspace.fm/2009/10/01/iph...osition-fixed/

I'm not a coder so not sure how to fix this, anyone any ideas?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:31 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06352 seconds
  • Memory Usage 2,337KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete