Version: 1.00, by Mystics
Developer Last Online: Jun 2015
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).
I installed the hack... but i got it showing 3 times in a row? like 3 sets of who was online! check it out: http://www.gamersonline.co.nz/forum
^^^ sup wif that? help! how can i get rid of the other 2 sets of it from displaying.. lol
Hey, hows it going...I was wondering if you could help me out with this small prob.
Most users ever online on a day was XXX is never the same. Should it only change if it goes higher? It started at 91 the first day then 81 now it's 61. It's changing to the most on today.
But I have a question about it:
How do I count the not registered users with the logged in users in the "Who was online today" and "Currently Active Users"?
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...
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.
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?!