Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: 1.00, by Mystics Mystics is offline
Developer Last Online: Jun 2015 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-10-2002 Last Update: Never Installs: 339
 
No support by the author.

Hack Name: Who was online today
Hack Version: 1.0.2
For vB Version:: 2.x
Originally Created by: genial @ Skats Board (Contact)
Documentation, Translation, a few changes and posted by: Mystics

Description:
This Hack adds something like the "Currently Active Users:"-Feature of vBulletin.
The difference is, instead of showing the users, who are currently online, it shows
all Users, who were online on a day and it also displays "Most users ever online on a day".

Summary of the Features:
  • Shows "Number of Active Users Today"
  • Shows "Most users ever online on a day"
  • Shows last online time for each User while pointing the Mouse Cursor on it's name (=mouseover) in the list
Important: The Hack only works 100% correct, when each member is in the same time zone as the Server!

Files to edit: index.php
Templates to edit: forumhome
New Templates: forumhome_todayloggedinusers, forumhome_todayloggedinuser

I have attached the Install Instructions in a Text File.
The Instruction is in English and in German.

I will attach a Screenshot in a Reply to this Thread!

Post any Questions into this Thread!

Updates in 1.0.1: Inserted the two new templates into the template precaching (first step)

Updates in 1.0.2: Fixed a little Bug with the "Most users ever online on a day"-Count
(Replace '$maxusers[2] = $todayonline;' with '$maxusers[2] = $numbertodayonline;' in index.php)

Info: You can find an other version of this Hack here. In this other version the usernames of the members, who were already online today, are not shown on the Forum-Mainpage; the names are shown in an extra File (like online.php), onlinetoday.php (Screenshot).

So, depending on which version of the Hack you prefer, you have to download this:
Version with usernames on the main Site of the Forum

or this:
Version with usernames on extra site (onlinetoday.php)

Regards,
Mystics

Show Your Support

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

Comments
  #347  
Old 04-08-2003, 05:36 AM
grace819 grace819 is offline
 
Join Date: Aug 2002
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yup! Excellent hack!
Reply With Quote
  #348  
Old 04-08-2003, 09:37 AM
tinbin tinbin is offline
 
Join Date: Mar 2003
Location: lincs uk
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Prolly asked before in this huge thread, but i got a prob with this hack:
It shows "# of active users today : 0 " to about 1pm UK time.
After that it starts counting.
I've been told it resets about 7am.

Also i think it does not count every user as i'm sure there should be lots more listed.

Is this due to the server? As i've known a forum hosted on the same server (in the USA) and it worked fine there...
Reply With Quote
  #349  
Old 04-09-2003, 09:33 AM
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi mystics first of i have used this hack for ages and it has always worked well for me

i just wondered if you was gonna do the update of this hack ??

or just add it so that the active users for today shows the guests aswell

thanks very much for the hack, i also understand how busy you are.... but adding a code for the guests to show up aswell would be fab m8

thanks
Mickie D
Reply With Quote
  #350  
Old 04-10-2003, 06:47 AM
Shawnn Shawnn is offline
 
Join Date: Aug 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unless you are an admin the Number of Active Users Today is: O. I hade it working with version 2.2.9 and upgraded to 2.30 and reinstalled the hack and can't get it show users unless you are logged in as an admin.
Reply With Quote
  #351  
Old 04-24-2003, 02:09 PM
Sanjiyan's Avatar
Sanjiyan Sanjiyan is offline
 
Join Date: Jan 2002
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
03-20-03 at 05:55 PM AlexanderT said this in Post #335
Actually, I changed the way to calculate local midnight in the snippet below. I think now everything is correct.

PHP Code:
$enddate time();
$localdate $enddate-(($timeoffset-$bbuserinfo['timezoneoffset'])*3600);
$date getdate($localdate);
$day   $date['mday'];
$month $date['mon'];
$year  $date['year'];
$midnight mktime(0,0,0,$month$day$year);
$timepassed $localdate $midnight;
$startdate $enddate $timepassed;
  
$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, invisible FROM user 
                WHERE lastactivity BETWEEN 
$startdate AND $enddate 
                ORDER BY username"
); 
With this code, 'Number of Active Users Today' should display the correct number of active users since local midnight of the current user logged in.

What is still not taken care of different TZs is the 'Most users ever online on a day' part. With the current implementation of the hack, I don't think this is possible. Why? --

Imagine that in the timezone of your user, until 23:59pm you had 100 visitors on your board. Further imagine that all these 100 visitors visited at 23:50pm (your time). Finally imagine that this is the greatest number of visitors your board has ever seen in one day. So for you, that is for your user and all other users in your timezone, 'Most users ever online on a day' is 100.

So far so good. Now imagine that at 00:10am your time 10 more users logged in. For you, 'Most users ever online on a day' should be still 100, namely from the day before. However, for another user whose timezone is e.g. -1, 'Most users ever online on a day' is now 110, since he still hasn't reached midnight (it is 23:10pm) for him. As a result, the variable holding the Most users contains 110 now. And that means also for you, who is already in the next day, 'Most users ever online on a day' is suddenly 110. You see the problem?!

Greets
Alexander

Where do you put this code?
Reply With Quote
  #352  
Old 04-24-2003, 02:57 PM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I attached the edited who-was-online-today.txt. You can compare it to the original who-was-online-today.txt to see where the changes apply in case you want to use the extra-window version.

Greets
Reply With Quote
  #353  
Old 04-24-2003, 04:51 PM
Kaelon's Avatar
Kaelon Kaelon is offline
 
Join Date: Jan 2002
Posts: 405
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have any of you experienced heightened load with this hack? I installed it, but I noticed a slight peak with it. Any tips?

Kaelon
Reply With Quote
  #354  
Old 04-25-2003, 07:45 AM
Sanjiyan's Avatar
Sanjiyan Sanjiyan is offline
 
Join Date: Jan 2002
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 03:57 PM AlexanderT said this in Post #351
I attached the edited who-was-online-today.txt. You can compare it to the original who-was-online-today.txt to see where the changes apply in case you want to use the extra-window version.

Greets
I dont use the extra window version, but the version that makes the information appear on the main forum index page, ie below the Who's Online (Currently Active Users)
Reply With Quote
  #355  
Old 04-26-2003, 12:42 AM
FFArmageddon FFArmageddon is offline
 
Join Date: Aug 2002
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

"Still in index.php, find this:
-------------------------------------------------------------
if ((int)$maxusers[0] <= $totalonline) {
$time = time();
$maxloggedin = "$totalonline " . $time;
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
$maxusers[0] = $totalonline;
$maxusers[1] = $time;
}
-------------------------------------------------------------"

I cannot find that in index.php 0_0
Reply With Quote
  #356  
Old 04-26-2003, 09:52 PM
Sweet Cheeks's Avatar
Sweet Cheeks Sweet Cheeks is offline
 
Join Date: Mar 2002
Location: Carson City, Nevada
Posts: 173
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this awesome hack and its a bit big for our board, is there any way to edit it or maybe just another way to maybe show who has been online in the past 5 minutes instead?

Thanks for your help, either way, I'll use the hack, I was just curious how I'd do the past 5 minutes, thank you :banana:
Reply With Quote
  #357  
Old 05-08-2003, 12:38 PM
Radgam Radgam is offline
 
Join Date: Jan 2003
Location: Scotland! :)
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I seem be having a rather strange problem with this hack although it's worked fine up until today. Problem:

My board says "Number of Active Users Today: 0" all the time! I've not changed the coding, or the database, or the templates in ANY way but it's just stoped working. Could it be some sort of server screw up? I rechecked all the code for the hack just to be sure and it's unchanged.

I keep checking and other people have definetly been online but it's just not showing up. Infact, it doesn't even show me as being online!

[:: edit ::]
Just for good measure - http://www.gnrforum.com/phpinfo.php
And it now works again after not having worked all morning
:dead: i hate computers!
Reply With Quote
  #358  
Old 05-08-2003, 07:30 PM
XFLBret XFLBret is offline
 
Join Date: May 2002
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there a way to modify this hack so that it shows members who browse the board invisibly?
Reply With Quote
  #359  
Old 05-18-2003, 02:13 AM
gc1 gc1 is offline
 
Join Date: Sep 2002
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am a dork and my eyes are bugged out from reading, but could somebody tell me why all my users online today are listed twice in my list?

:beard:
Reply With Quote
  #360  
Old 05-18-2003, 02:17 AM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check your template, maybe you have it pasted twice on creation.
Reply With Quote
  #361  
Old 05-18-2003, 02:21 AM
gc1 gc1 is offline
 
Join Date: Sep 2002
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

your probably right, will do it tomorrow

MUST GET SLEEP :disappointed:

Thanks for the speedy response


GC
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:18 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.05884 seconds
  • Memory Usage 2,371KB
  • Queries Executed 30 (?)
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_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete