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

Category: vBulletin CMS Widgets - Version: 4.1.8 Rating:
Released: 12-17-2009 Last Update: 11-26-2011 Installs: 686
Uses Plugins Template Edits
Re-useable Code Translations  
No support by the author.

This is a widget for your CMS pages to show the Current Users Online.



You will need to Create a new Template (vbcms_widget_execphp_activeusers), Cache the template, Create a new Widget (Users Online), Configure the Widget, and then finally add the Widget to your Layout (I am not including instructions for that, you should know how to add Widgets to Layouts).

1.0 2009-12-17: initial release by Lynne at vbulletin.org (pre 4.0)
1.- 2010-01-07 - French translation included thanks to albibak (version 1.0)
1.1 2010-05-30: Added in Most users ever online.
1.2 2010-10-22: Fixed template to use new classes and widget code to use new online users query/method. (4.0.8)
1.3 2011-11-17: Fixed template and widget code for use in 4.1.8.
1.4 2011-11-27: Quick fix in template to show link to online.php page. (4.1.8)

Installation instructions for 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 widget code and the template code are different depending on the version you are running. Read them carefully!!!

Download Now

File Type: txt widget- users online_FR.txt (7.1 KB, 272 views)
File Type: txt widget-users online 1.1.txt (7.3 KB, 250 views)
File Type: txt widget-users online 1.2.txt (7.7 KB, 430 views)
File Type: txt widget-users online 1.4.txt (15.2 KB, 1551 views)

Screenshots

File Type: png widget-users online 1.1.png (21.8 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
5 благодарности(ей) от:
doctorsexy, GONUMBER6, livenetc, misericorde, romaszek

Comments
  #362  
Old 10-29-2011, 09:40 PM
Cyburbia's Avatar
Cyburbia Cyburbia is offline
 
Join Date: Feb 2002
Location: Ithaca, New York USA
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by OlijO View Post
I have the same problem. (vB4.1.7 fresh install).
Checking in to say the same thing happens with me in 4.1.7. Reload the page, and the widget disappears. Clear the CMS cache, reload, and it reappears. Reload the page, and it vanishes again.
Reply With Quote
  #363  
Old 11-13-2011, 04:35 PM
misericorde misericorde is offline
 
Join Date: May 2011
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hy Thank you
Reply With Quote
  #364  
Old 11-16-2011, 03:42 PM
doctorsexy's Avatar
doctorsexy doctorsexy is offline
 
Join Date: Mar 2011
Location: earth
Posts: 383
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi.. just updated to 4.1.8 and ive lost the names of the users ... there not being displayed ..any ideas ...thanks....
Reply With Quote
  #365  
Old 11-16-2011, 04:19 PM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by doctorsexy View Post
Hi.. just updated to 4.1.8 and ive lost the names of the users ... there not being displayed ..any ideas ...thanks....
Same here, online users not displayed
Reply With Quote
  #366  
Old 11-16-2011, 05:52 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to update the template.

Was:
HTML Code:
                <ol class="commalist" id="wgo_onlineusers_list">
                     {vb:raw activeusers}
                 </ol>
Change To:
HTML Code:
<ol class="commalist" id="wgo_onlineusers_list">
						<vb:each from="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>
And in the widget...
Was:
PHP Code:
    foreach ($userinfos AS $userid => $loggedin)
    {
        
$numberregistered++;
        if (
$userid != vB::$vbulletin->userinfo['userid'] AND !$loggedin['badlocation'])
        {
            if (!isset(
$inforum["$loggedin[inforum]"]))
            {
                
$inforum["$loggedin[inforum]"] = 0;
            }
            
$inforum["$loggedin[inforum]"]++;
        }
        
fetch_musername($loggedin);

        if (
fetch_online_status($loggedin))
        {
            
$numbervisible++;
            
$show['comma_leader'] = ($activeusers != '');
            
$templater vB_Template::create('forumhome_loggedinuser');
                
$templater->register('loggedin'$loggedin);
            
$activeusers .= $templater->render();
            
vB_Template::preRegister('vbcms_widget_execphp_activeusers', array('activeusers' => $activeusers)); 
        }
    } 
Change to:
PHP Code:
    $activeusers = array();
    foreach (
$userinfos AS $userid => $loggedin)
    {
        
$numberregistered++;
        if (
$userid != vB::$vbulletin->userinfo['userid'] AND !$loggedin['badlocation'])
        {
            if (!isset(
$inforum["$loggedin[inforum]"]))
            {
                
$inforum["$loggedin[inforum]"] = 0;
            }
            
$inforum["$loggedin[inforum]"]++;
        }

        
fetch_musername($loggedin);
        
$loggedin['comma'] = ',';

        if (
fetch_online_status($loggedin))
        {
            
$numbervisible++;
            
$activeusers[$numbervisible] = $loggedin;
        }
    }
    
    
// Last element
    
if ($numbervisible
    {
        
$activeusers[$numbervisible]['comma'] = '';
    } 
And find:
PHP Code:
    'recordtime'  => $recordtime
Change to:
PHP Code:
    'recordtime'  => $recordtime,
    
'activeusers'=> $activeusers
I think that should work. I've gotta run but will check this thread later and add it to the first post.
Reply With Quote
  #367  
Old 11-16-2011, 06:47 PM
doctorsexy's Avatar
doctorsexy doctorsexy is offline
 
Join Date: Mar 2011
Location: earth
Posts: 383
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne..sorry not working..it just Disappears ..with the update applied to it..
Reply With Quote
  #368  
Old 11-16-2011, 06:51 PM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Same here, but as "Lynne" said ...will be updated in first post soon
Reply With Quote
  #369  
Old 11-16-2011, 08:40 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you guys make the changes that I posted above? I tried those on my test site and they work fine (don't forget to clear the cache after making the changes).
Reply With Quote
  #370  
Old 11-17-2011, 11:49 AM
sgbmad sgbmad is offline
 
Join Date: Nov 2005
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After make the changes for 4.1.8:

Code:
Parse error: syntax error, unexpected '}' in /home/*****/public_html/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 149


Could you upload the complete widget code for 4.1.8? it would be easier
Reply With Quote
  #371  
Old 11-17-2011, 02:07 PM
doctorsexy's Avatar
doctorsexy doctorsexy is offline
 
Join Date: Mar 2011
Location: earth
Posts: 383
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

(don't forget to clear the cache after making the changes)

Ever since the update to 4.1.8 the clear cms cache buttons not there....
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 08:28 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.05524 seconds
  • Memory Usage 2,377KB
  • 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
  • (1)bbcode_code
  • (2)bbcode_html
  • (4)bbcode_php
  • (2)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
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (5)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
  • (5)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