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
  #222  
Old 02-13-2013, 05:27 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You would just add an extra <br /> where you want an extra line.
HTML Code:
                <br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span><br /></p>
                <p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}<br /></p>
Reply With Quote
  #223  
Old 02-13-2013, 09:55 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
You would just add an extra <br /> where you want an extra line.
HTML Code:
                <br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span><br /></p>
                <p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}<br /></p>
Hm. I tried that, and it didn't work.
Reply With Quote
  #224  
Old 02-14-2013, 12:30 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then add two of them instead of one.
Reply With Quote
  #225  
Old 02-14-2013, 02:13 AM
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
Then add two of them instead of one.
Like so?

Quote:
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span><br /></p>
<br /><p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}<br /></p>
Reply With Quote
  #226  
Old 02-14-2013, 04:45 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would put it with the others I had added:
Code:
                <br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span><br /><br /></p>
                <p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}<br /><br /></p>
Reply With Quote
  #227  
Old 02-14-2013, 05:25 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
I would put it with the others I had added:
Code:
                <br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span><br /><br /></p>
                <p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}<br /><br /></p>
Not sure if I did exactly that, but I ended up doing this:
Code:
<br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p>
                <p><br />{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}</p>
                <br /><ol class="commalist">
                    <vb:each from="content.activeusers" value="loggedin">
As for the most users, I just edited the phrase most_users_ever_online_was_x_y_at_z and made it this:
Code:
Most users ever online was {1}. <br />{2} at <span class="time">{3}</span>.
Reply With Quote
  #228  
Old 03-10-2013, 12:20 PM
Lee Roberts's Avatar
Lee Roberts Lee Roberts is offline
 
Join Date: Jun 2008
Location: UK
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this Lynne!

Anyone using the Sidebar Anywhere by BOP5 if you want this block to work on other pages follow the steps below:

REPLACE TEMPLATE CODE:

Code:
<vb:if condition="$show['loggedinusers']">
<li>
    <div class="block smaller">
        <div class="blocksubhead">
            <a class="collapse" id="collapse_block_html" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html"/></a>
            <span class="blocktitle"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</span>
        </div>
        <div id="block_html" class="blockbody floatcontainer">
            <div class="blockrow">
                <p>{vb:rawphrase there_are_x_y_online_link, {vb:raw content.totalonline}, {vb:raw session.sessionurl_q}}
                <br /><span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw content.numberguest}}</span></p>
                <p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw content.recordusers}, {vb:raw content.recorddate}, {vb:raw content.recordtime}}</p>
                <ol class="commalist">
                    <vb:each from="content.activeusers" value="loggedin">
                        <li>{vb:stylevar dirmark}<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a>{vb:raw loggedin.invisiblemark}{vb:raw loggedin.buddymark}{vb:raw loggedin.comma}</li>
                    </vb:each>
                </ol>
             </div>
        </div>
    </div>
    <div class="underblock"></div>
</li>
</vb:if>


WITH:

Code:
<li>
    <div class="block smaller">
        <div class="blocksubhead">
             <a class="collapse" id="collapse_block_html" href="{vb:raw  relpath}#top"><img alt="" src="{vb:stylevar  imgdir_button}/collapse_40b.png" id="collapseimg_html"/></a>
             <span class="blocktitle"><img src="{vb:stylevar  imgdir_misc}/users_online.png" alt="{vb:rawphrase  currently_active_users}" />{vb:rawphrase  currently_active_users}</span>
        </div>
        <div id="block_html" class="blockbody floatcontainer">
            <div class="blockrow">
                <p>{vb:rawphrase there_are_x_y_online_link, {vb:raw content.totalonline}, {vb:raw session.sessionurl_q}}
                 <br /><span class="shade">{vb:rawphrase  x_members_and_y_guests, {vb:raw content.numberregistered}, {vb:raw  content.numberguest}}</span></p>
                 <p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw  content.recordusers}, {vb:raw content.recorddate}, {vb:raw  content.recordtime}}</p>
                <ol class="commalist">
                    <vb:each from="content.activeusers" value="loggedin">
                         <li>{vb:stylevar dirmark}<a class="username" href="{vb:link  member, {vb:raw loggedin}}">{vb:raw  loggedin.musername}</a>{vb:raw loggedin.invisiblemark}{vb:raw  loggedin.buddymark}{vb:raw loggedin.comma}</li>
                    </vb:each>
                </ol>
             </div>
        </div>
    </div>
    <div class="underblock"></div>
</li>
.Me
Reply With Quote
Благодарность от:
Lynne
  #229  
Old 03-10-2013, 05:14 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for posting that Lee Roberts.
Reply With Quote
Благодарность от:
Lee Roberts
  #230  
Old 11-26-2013, 03:11 AM
justicechick justicechick is offline
 
Join Date: Oct 2012
Location: Arkansas
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Lynn, I have attempted this twice. I correctly followed all the steps to the best of my knowledge and the block shows up on my page. It was minus the actual numbers of online users ect. However my bigger issue is that as soon as I enable the plugin I get this errror code at the top of my header. BTW I am running 4.2.2

Parse error: syntax error, unexpected 'is' (T_STRING) in /home/cafeflir/public_html/includes/class_bootstrap.php(1419) : eval()'d code on line 145

Warning: Cannot modify header information - headers already sent by (output started at ..../includes/class_bootstrap.php(1419) : eval()'d code:145) in ..../includes
Reply With Quote
  #231  
Old 11-26-2013, 05:32 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 justicechick View Post
Parse error: syntax error, unexpected 'is' (T_STRING) in /home/cafeflir/public_html/includes/class_bootstrap.php(1419) : eval()'d code on line 145
That is an error with the caching of the template. But, there is no "is" in the block_users_online template. Could you have accidentally added a line break in the middle of a word? Did you remember to enter that template under "Template to Use" in the Block configuration page?
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 07:52 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.05427 seconds
  • Memory Usage 2,361KB
  • Queries Executed 28 (?)
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
  • (6)bbcode_code
  • (2)bbcode_html
  • (5)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
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (3)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)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_postinfo_query
  • fetch_postinfo
  • 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