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
Block - Users Online Details »»
Block - Users Online
Version: 1.4, by Lynne Lynne is offline
Developer Last Online: Oct 2022 Show Printable Version Email this Page

Category: vBulletin Forum Sideblocks - Version: 4.2.0 Rating:
Released: 01-22-2010 Last Update: 06-04-2012 Installs: 161
Uses Plugins Template Edits
Re-useable Code  
No support by the author.

This is a block for your forum sideblocks to show the Current Users Online.



You will need to Create a new Template (block_users_online), Cache the template, Create a new Block (Users Online), and then, optionally, remove the Currently Active Users list from the bottom of the page.

1.1 2010-06-12: Added in Most users ever online. Updated for 4.0.3.
1.2 2010-06-23: Updated to work for 4.0.4.
1.3 2011-11-17: Fixed template and block code for use in 4.1.8.
1.4 2012-06-05: Fixed template for use in 4.2.0.

Installation instructions for 4.2.0, 4.1.8 and pre-4.1.8 are included in the 1.4 download. Please make sure you use the correct Installation Instructions as both the block code and the template code are different depending on the version you are running. Read them carefully!!!

Download Now

File Type: zip Block - Users Online 1.4.zip (26.6 KB, 552 views)

Screenshots

File Type: png block-users online.png (21.5 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
BCP Hung

Comments
  #212  
Old 10-23-2012, 04:02 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't have time to look into do a rewrite here.
Reply With Quote
  #213  
Old 10-24-2012, 03:57 PM
Big-K Big-K is offline
 
Join Date: Feb 2005
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. Here's What I did to show Avatars. The only snag is that nothing is shown for users with no avatars. Hope someone can clean it up.

I changed
Code:
<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a>
to
Code:
            <a class="username" href="{vb:link member, {vb:raw loggedin}}">
<vb:if condition=$loggedin['avatarurl']>
<img src="image.php?u={vb:raw loggedin.userid}" alt="{vb:raw loggedin.musername}" />
<vb:else />
<img class="avback" src="{vb:stylevar imgdir_misc}/unknown.gif" alt="{vb:raw loggedin.musername}" />
</vb:if></a>
Reply With Quote
  #214  
Old 10-24-2012, 05:13 PM
Mark.B Mark.B is offline
Senior Member
 
Join Date: Feb 2004
Posts: 1,354
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your second <img> tag (after the <else> tag) needs to point to wherever your "unknown.png" or "unknown.gif" avatar is - whatever image you want showing up for people with no avatars basically.
Reply With Quote
  #215  
Old 10-25-2012, 08:11 AM
Big-K Big-K is offline
 
Join Date: Feb 2005
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mark.B View Post
Your second <img> tag (after the <else> tag) needs to point to wherever your "unknown.png" or "unknown.gif" avatar is - whatever image you want showing up for people with no avatars basically.
You're right and I've edited accordingly. The issue though is that the "<vb:if condition=$loggedin['avatarurl']>" syntax doesn't work due to incorrect placement of the block code. Could you please respond to my post #209?
Reply With Quote
  #216  
Old 12-15-2012, 05:33 PM
patracy patracy is offline
 
Join Date: Feb 2006
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can't seem to get this to display on my forum at all. I'm using 4.2.0 and used the instructions in the files step by step. Simply nothing displayed at all in my sidebar.
Reply With Quote
  #217  
Old 12-15-2012, 05:50 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you make sure to change the template name and also create the custom template? And did you add the widget to the layout?
Reply With Quote
  #218  
Old 02-05-2013, 06:14 AM
Amaury Amaury is offline
 
Join Date: Nov 2011
Location: Ellensburg, WA
Posts: 1,075
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How I can get "X members and Y guests" on the same line as "There are currently X members online"? I was increasing forum_sidebar_width for something else and noticed nothing changed in that.

I'm assuming you have line breaks somewhere by default?
Reply With Quote
  #219  
Old 02-05-2013, 03:58 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Amaury25 View Post
How I can get "X members and Y guests" on the same line as "There are currently X members online"? I was increasing forum_sidebar_width for something else and noticed nothing changed in that.

I'm assuming you have line breaks somewhere by default?
Remove the <br /> in here:
HTML Code:
<p>{vb:rawphrase there_are_x_online, {vb:raw content.totalonline}}
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p>
Reply With Quote
  #220  
Old 02-05-2013, 04:15 PM
Amaury Amaury is offline
 
Join Date: Nov 2011
Location: Ellensburg, WA
Posts: 1,075
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Remove the <br /> in here:
HTML Code:
<p>{vb:rawphrase there_are_x_online, {vb:raw content.totalonline}}
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p>
Thanks, Lynne. Removed it.

By the way, you made a slight mistake in that code above at the beginning.

Should be: {vb:rawphrase there_are_x_online_link,
Reply With Quote
  #221  
Old 02-13-2013, 05:18 PM
Amaury Amaury is offline
 
Join Date: Nov 2011
Location: Ellensburg, WA
Posts: 1,075
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I actually reverted that change because it was causing problems with our thread titles not staying on one line, and I didn't want to trim titles lower than 20 (default is 30).

However, now I also want to line break the most visitors to reduce the sidebar width even more to hopefully restore the title trimming to the default 30.

I tried adding a <br />, but it made this:
Quote:
Most users ever online was 118, 9/11/2012 at 4:16 AM.
...look like this:

Quote:
Most users ever online was 118,
at 9/11/2012.
I also want to add spacing in-between.

Instead of this:

Quote:
There are currently X users online.
X members and X guests
Most users ever online was 118
9/11/2012 at 4:16 AM.
User 1, User 2, User 3
...it would look like this:

Quote:
There are currently X users online.
X members and X guests

Most users ever online was 118
9/11/2012 at 4:16 AM.

User 1, User 2, User 3
Thanks in advance.
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 12:36 AM.


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.17772 seconds
  • Memory Usage 2,342KB
  • 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_code
  • (2)bbcode_html
  • (7)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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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