PDA

View Full Version : Who was online today [available in english & german]


Pages : [1] 2

Mystics
01-10-2002, 10:00 PM
Hack Name: Who was online today
Hack Version: 1.0.2
For vB Version:: 2.x
Originally Created by: genial @ Skats Board (http://www.skats-board.de) (Contact (https://vborg.vbsupport.ru/member.php?s=&action=getinfo&userid=1347))
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 listImportant: 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 (https://vborg.vbsupport.ru/attachment.php?s=&postid=212603). 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 (https://vborg.vbsupport.ru/attachment.php?s=&postid=212683&fullpage=1)).

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 (https://vborg.vbsupport.ru/attachment.php?s=&postid=212495)

or this:
Version with usernames on extra site (onlinetoday.php) (https://vborg.vbsupport.ru/attachment.php?s=&postid=212603)

Regards,
Mystics

Mystics
01-11-2002, 12:08 PM
And here is a Screenshot of the Hack (attached to this Posting).
It starts with "Number of Active Users Today".
At the bottom in the middle you can see the "Last Online Time" of the User 'alsdorfer' while the Mouse Cursor is pointing on his Name.
(Info: I have censored most of the User Names with a black line :rolleyes: )

Mystics
01-11-2002, 12:28 PM
....and here is a Screenshot of the German Version of this Hack.
------------------
....und hier ist ein Screenshot der deutschen Version des Hacks.

MrLister
01-11-2002, 12:56 PM
Great! Thanks for the hack. It seems really good

KarateKid
01-11-2002, 03:18 PM
nice hack!

THX :)

eva2000
01-11-2002, 03:40 PM
1. is it possible to have the list of usernames visited today in a popup linked to the Number of active users today text ? my list page would be too long with 200 - 500 currentyly active + the list of users visited today :eek:

2. how come most ever visited on my forum is not the same and higher number than my most ever visited today ? trying to figure out how i can have more members currently on my forum that i have had for an entire day ? --- never mind about this one now i understand :)

3. Last online time seems to take the server's time and not the member's GMT offset time

TaP
01-11-2002, 04:17 PM
Nice work , I will test it out to see how it works! Thanks

Mystics
01-11-2002, 04:22 PM
Originally posted by eva2000
1. is it possible to have the list of usernames visited today in a popup linked to the Number of active users today text ? my list page would be too long with 200 - 500 currentyly active + the list of users visited today :eek:I will try to do this ;)Originally posted by eva2000
2. how come most ever visited on my forum is not the same and higher number than my most ever visited today ? trying to figure out how i can have more members currently on my forum that i have had for an entire day ? --- never mind about this one now i understand :)Ok, when you understand it :rolleyes:Originally posted by eva2000
3. Last online time seems to take the server's time and not the member's GMT offset time No, it doesn't take the server's time, the time is displayed according to the Users' Offset time.

Martz
01-11-2002, 06:20 PM
Wow excellent hack, its great! 1 thing I've noticed was that when I was logged in as the admin, I could see all of todays users and invisible users - when I logout, i can only see the normal users, but the count doesn't include the invisible one?

Get what I mean? Was 202, and when I logout its 150, as 52 of my members today use invisible mdoe.

Again, fantastic :)

genial
01-11-2002, 06:35 PM
Originally posted by Martz
Get what I mean? Was 202, and when I logout its 150, as 52 of my members today use invisible mdoe.this is intended, because the members must not need to know how many invisible members logged in the board today. ;)

Lesane
01-11-2002, 06:43 PM
Great hack, i luv it :D Thanks

Martz
01-11-2002, 06:57 PM
Originally posted by genial
this is intended, because the members must not need to know how many invisible members logged in the board today. ;)

Well, the Currently Online Users figure includes invisible users when you are logged out, so it would be nice to keep it consistant. :)

genial
01-11-2002, 07:11 PM
Originally posted by Martz
Well, the Currently Online Users figure includes invisible users when you are logged out, so it would be nice to keep it consistant. :)sorry about that, because in our board, the currently online users is modified to show invisible users for members as guests and so it is in our board consistant.

Mystics
01-11-2002, 07:17 PM
Originally posted by Martz
Well, the Currently Online Users figure includes invisible users when you are logged out, so it would be nice to keep it consistant. :) You just have to edit the new template 'forumhome_todayloggedinusers':

Replace $todayonline with $numbertodayonline

Martz
01-11-2002, 08:02 PM
Ahh great, worked it out. Thanks again. :)

Mystics
01-11-2002, 08:58 PM
Originally posted by eva2000
1. is it possible to have the list of usernames visited today in a popup linked to the Number of active users today text ? my list page would be too long with 200 - 500 currentyly active + the list of users visited today :eek:OK, now I have finished the changes you wanted.

I have attached the Instructions and a new PHP-File in a ZIP File to this Posting. Please let me now if it's that, what you wanted.

Info: My attachment does not only contain the changes to the Original Hack....it's a complete new Hack, so it will be the best, you remove the other version of the hack.

[UPDATE]
I have forgotten something in onlinetoday.php (Moderators have not been highlighted), thanx to genial for the Fix!

I have replaced the Attachment with the new version.

[UPDATE2]
Max users and date are now showing correct.

[UPDATE3]
Fixed problem with the "Most Users"-Count
(Replace '$maxusers[2] = $todayonline;' with '$maxusers[2] = $numbertodayonline;' in index.php & onlinetoday.php)

[UPDATE4]
Fixed the Query within onlinetoday.php and index.php
(includes now the User's Timezone)

FWC
01-11-2002, 09:44 PM
This is such a cool hack! :cool: I installed the new version with the screen for Who Was Online. I love it. I do have one small problem. The other admin and myself are showing up as bold and italic on that page. But, the moderator on the page isn't bold for some reason. I'll see if I can figure it out. But, any help would be appreciated. :)

I fixed it. I just added user group 7 to the or statement in the highlighting section in onlinetoday.php. :)

genial
01-11-2002, 09:58 PM
Originally posted by FWC
But, the moderator on the page isn't bold for some reason. I'll see if I can figure it out. But, any help would be appreciated. :)sorry about mystics, he has forgotten the moderator-query in onlinetoday.php.

search for:if (!$usergroupdef['canwhosonline']) {
show_nopermission();
}and place under: $forummoderators=$DB_site->query('SELECT user.userid,user.username,moderator.forumid
FROM moderator
LEFT JOIN user
ON (moderator.userid=user.userid)
ORDER BY user.username');
while ($moderator=$DB_site->fetch_array($forummoderators)) {
$imodcache["$moderator[forumid]"][] = $moderator;
$mod["$moderator[userid]"] = 1;
}
$DB_site->free_result($forummoderators);
unset($moderator);but i have not tested this modification. ;)

Shenlong
01-11-2002, 10:37 PM
Nice hack, I really enjoy it

Erwin
01-11-2002, 10:44 PM
Great hack, works well!

eva2000
01-12-2002, 02:36 AM
Originally posted by Mystics
OK, now I have finished the changes you wanted.

I have attached the Instructions and a new PHP-File in a ZIP File to this Posting. Please let me now if it's that, what you wanted.

Info: My attachment does not only contain the changes to the Original Hack....it's a complete new Hack, so it will be the best, you remove the other version of the hack.

[UPDATE]
I have forgotten something in onlinetoday.php (Moderators have not been highlighted), thanx to genial for the Fix!

I have replaced the Attachment with the new version. off to add it now :)

eva2000
01-12-2002, 02:57 AM
great it works perfectly.. screen cap of today so far :)

eva2000
01-12-2002, 03:07 AM
another request... how would you allow

registered and guest users to view the onlinetoday.php page ? right now i have online.php only mod and admin viewable and it seems onlinetoday.php is the same..

i'd like

online.php to retain it's normal mod /admin only viewing

but

onlinetoday.php to be viewabe by guest and registered users as well as mods/admin

FWC
01-12-2002, 03:30 AM
Originally posted by eva2000
another request... how would you allow

registered and guest users to view the onlinetoday.php page ? right now i have online.php only mod and admin viewable and it seems onlinetoday.php is the same..

i'd like

online.php to retain it's normal mod /admin only viewing

but

onlinetoday.php to be viewabe by guest and registered users as well as mods/admin Eva, I commented the following out at line 15 of of onlinetoday.php and it did what you wanted:if (!$usergroupdef['canwhosonline']) {
show_nopermission();
}

eva2000
01-12-2002, 03:43 AM
Originally posted by FWC
Eva, I commented the following out at line 15 of of onlinetoday.php and it did what you wanted:if (!$usergroupdef['canwhosonline']) {
show_nopermission();
} thanks :D

FWC
01-12-2002, 06:01 AM
Originally posted by eva2000
thanks :D You're welcome. :)

SgtSling
01-12-2002, 06:34 AM
for some reason my

Most users ever online was 35 on 01-12-2002 at 08:31 AM.

keeps changing to whatever I have on at that given time

here is the code I am using for that

<tr id="cat">
<td bgcolor="{categorybackcolor}" colspan="6"><a href="online.php?s=$session[sessionhash]"><normalfont color="{categoryfontcolor}"><b>Currently Active Users</b></normalfont></a><normalfont color="{categoryfontcolor}"><b>: $totalonline</b></normalfont></td>
</tr>
<tr>
<td bgcolor="{firstaltcolor}" colspan="6"><smallfont>
<nobr>There are currently $numberregistered members and $numberguest guests on the boards.</nobr> |
<nobr>Most users ever online was $recordusers on $recorddate at $recordtime.</nobr><br>
$activeusers
$birthdaybits</smallfont></td>
</tr>

Any clues?

FWC
01-12-2002, 08:07 AM
I found a slight problem with onlinetoday.php when the day changed. Max users and date is fine on forumhome, but it's showing todays information on onlinetoday.php instead of the max number. I looked at Eva's board and it's doing the same thing. I've been tinkering with the code. I've managed to break it several times, but I haven't gotten it right yet. :)

eva2000
01-12-2002, 09:03 AM
Originally posted by FWC
I found a slight problem with onlinetoday.php when the day changed. Max users and date is fine on forumhome, but it's showing todays information on onlinetoday.php instead of the max number. I looked at Eva's board and it's doing the same thing. I've been tinkering with the code. I've managed to break it several times, but I haven't gotten it right yet. :) yeah noticed that on my forums too :(

waiting for a fix :)

genial
01-12-2002, 11:04 AM
in the near future i will make a new release of this hack. ;)

the new release includes all existing features and an extra todayonline-page in "who is online"-style. the display on forumhome will be dis- or enabled in admin-cp options. and specially guests will be counted. :)

Mystics
01-12-2002, 11:10 AM
Originally posted by FWC
I found a slight problem with onlinetoday.php when the day changed. Max users and date is fine on forumhome, but it's showing todays information on onlinetoday.php instead of the max number.Sorry for that. While waiting for the new Hack of genial, download the new onlinetoday.php to fix it.

Download in old posting above...or use this link:
https://vborg.vbsupport.ru/attachment.php?s=&postid=212603

Frank
01-12-2002, 12:47 PM
Uhm could we have the latest files in the 1st post of the thread please, I'm confused as to all the different versions of this hack?

Cheers.

Mystics
01-12-2002, 12:52 PM
Originally posted by Frank
Uhm could we have the latest files in the 1st post of the thread please, I'm confused as to all the different versions of this hack?The first post already got updated. The original Hack (with all usernames on the Main Page) is attached there in the most recent version.

In the first post is also a link to the other version of the Hack, this link directly points to the download of the actual version (https://vborg.vbsupport.ru/attachment.php?s=&postid=212603)

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 (https://vborg.vbsupport.ru/attachment.php?s=&postid=212495)

or this
Version with usernames on extra site (onlinetoday.php) (https://vborg.vbsupport.ru/attachment.php?s=&postid=212603)

Greetz,
Mystics

SgtSling
01-12-2002, 03:39 PM
| Most users ever online was 43 on 01-12-2002 at 05:38 PM.

Why does my record for online users keep changing to the number that is currently online?

is something not gettig updated?

$recordusers seems t just point to whatever number I currently have online now.
how can I fix this .
I posted my code for loggedinusers on page 2
Sarge

Mystics
01-12-2002, 04:10 PM
Originally posted by SgtSling
| Most users ever online was 43 on 01-12-2002 at 05:38 PM.

Why does my record for online users keep changing to the number that is currently online? Hm, that has nothing to do with the hack I posted.....you are talking about the "Current Active Users". The "Who was online today"-Hack does nothing change at $recordusers....maybe the number is changing at your board, because there are more and more users online than ever before?

FWC
01-12-2002, 04:48 PM
Originally posted by Mystics
Sorry for that. While waiting for the new Hack of genial, download the new onlinetoday.php to fix it. Thanks, that fixed it. :)

Shenlong
01-12-2002, 05:17 PM
great hack! thanx

Lionel
01-12-2002, 09:14 PM
After I installed today, vb's time got offset by + 6 hours. I am in Florida and all my settings, personal and admin are set to -5 from gmt. Now it is 6:00 PM, I show 12:00 AM. Anyone else noticed?

genial
01-12-2002, 09:16 PM
today i have found a little bug in this hack, by showing the today-record-user count for members.

to fix it, replace from the hack in index.php and, if you have in mystics onlinetoday.php, following line:$maxusers[2] = $todayonline;in this line:$maxusers[2] = $numbertodayonline;

Mystics
01-12-2002, 09:43 PM
Thx genial, have updated the instructions.

eva2000
01-13-2002, 05:40 AM
i double checked and the

Active users today figure is resetting itself based on my server time ?

it's 5 pm where I am and it was reset to zero just now.. i checked and my server time is 12 am....

probably no way to fix that since every member would then see a different figure from different time zones ?

or can you define in the script the reset time or allow vB admins to define that time ?

i.e. based on the vB admin's GMT offset time..

Erwin
01-13-2002, 09:11 AM
Eva is absolutely right, the same thing happens to me, so I figure it must be set to the server's time.

genial
01-13-2002, 01:39 PM
Originally posted by eva2000
Active users today figure is resetting itself based on my server time ?yes so it is. the active users today figure will be reseted on 0:00 am servertime.

our server is in the same timezone as the members and so that was not importend for me and i didn't consider that.

i will see to fix it, so that showing to the members the active today figure according to there members-timezone and the todayrecord to the selected timezone in the vbb-options.

Admin
01-13-2002, 01:56 PM
Great hack, I love the concept. :D

One thing, you might want to consider indexing the lastactivity column in the user table, otherwise the query scans a HUGE table (several thousands sometimes! :eek:)

genial
01-13-2002, 02:14 PM
Originally posted by FireFly
One thing, you might want to consider indexing the lastactivity column in the user table, otherwise the query scans a HUGE tableit's a good idea. :)

i will consider this in the next release of this hack, because the next release needs changes in the database for count guests. ;)

Admin
01-13-2002, 02:39 PM
Just installed this here btw, works great. :)

genial
01-13-2002, 03:22 PM
@all with the timezoneproblem of this hack:

i am not sure if this changes fix the problem, because our server is in the same timezone as the members and so i can't test it.

please test the changes for me. :D

find:$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, invisible FROM user
WHERE lastactivity > " . mktime(0,0,0,date("m"),date("d"),date("Y")) . "
ORDER BY username");
and replace with:$unixtoday = mktime(0,0,0,date("m"),date("d"),date("Y"));
$unixtoday = $timeoffset * 3600 + $unixtoday;
$numbertodayonlinerecord = $DB_site->query("SELECT COUNT(*) AS count FROM user
WHERE lastactivity > " . $unixtoday . "
ORDER BY username");
$numbertodayonlinerecord = $numbertodayonlinerecord[count];
$unixtoday = $bbuserinfo[timeoffset] * 3600 + $unixtoday;
$todayusers=$DB_site->query("SELECT userid,username,usergroupid,lastactivity,invisible ,lastpost FROM user
WHERE lastactivity > " . $unixtoday . "
ORDER BY username");and find:if ((int)$maxusers[2] <= $numbertodayonline) {
$time = time();
$maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . $time;
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
$maxusers[2] = $numbertodayonline;
$maxusers[3] = $time;
}replace with:if ((int)$maxusers[2] <= $numbertodayonlinerecord) {
$time = time();
$maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonlinerecord " . $time;
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
$maxusers[2] = $numbertodayonlinerecord;
$maxusers[3] = $time;
}

genial
01-13-2002, 04:00 PM
<font size="3">important: please notice</font>

the fix for the timezone problem has changed at this moment, please check your code if you have this fix installed before.

Lionel
01-13-2002, 04:21 PM
Does this only count members or can it count guests too?

TELEK
01-13-2002, 04:29 PM
Ok, I did everything in the instructions, and nothing happened. I did the one on the seperate page. Anyways, nothing changed on the main page, and if I go to onlinetoday.php, it is just a blank white page.

Mystics
01-13-2002, 04:31 PM
Originally posted by TELEK
Ok, I did everything in the instructions, and nothing happened. I did the one on the seperate page. Anyways, nothing changed on the main page, and if I go to onlinetoday.php, it is just a blank white page. Have you adjusted the existing templates and created the new templates? Seems so, if you don't have done that :rolleyes:

TELEK
01-13-2002, 04:50 PM
yeah, I did

genial
01-13-2002, 05:17 PM
Originally posted by Lionel
Does this only count members or can it count guests too? the current release count only members.

i will release a new version of this hack in the near future, which counts members and guests. guests will be differentiated through their ip, that means two guests with the same ip will be counted as one guest and a guest with different ips (surfing the web through a proxy-server) will be counted as more guests.

Lionel
01-13-2002, 05:25 PM
Originally posted by genial
the current release count only members.

i will release a new version of this hack in the near future, which counts members and guests. guests will be differentiated through their ip, that means two guests with the same ip will be counted as one guest and a guest with different ips (surfing the web through a proxy-server) will be counted as more guests.

Great because it can only look good when you display more. :D

TELEK
01-13-2002, 05:25 PM
OK, I figured out how to work it, kind of. I don't understand what templates are, and how template sets work. The reason why it wasn't working was because the style set I was using, had the template set Hyren Village selected, and the templates I made for the hack were in default template set. But when i switch my style to default, the layout changes. Should I put those templates you make (for the hack) in every template set?

Mystics
01-13-2002, 05:29 PM
Originally posted by TELEK
Should I put those templates you make (for the hack) in every template set? Yes! If you want to use the hack in every of your styles! But if you never use the default template set, you only have to insert the hack into your "Village"-Style-Templates.

Erwin
01-13-2002, 05:38 PM
Hi genial,

Iinstalled the updated code. No way of knowing if it does work until tonight, but it looks like it's working. The numbers did change.

Just one IMPORTANT NOTE for potential installers:

Remove the "color" variable from the first code change if you do NOT have the color hack installed (or whatever that color variable is for) - otherwise your index.php will not work as you will get a database error! :)

Will let you know if there are any problems. Thanks!

Erwin
01-13-2002, 05:46 PM
On second thoughts, I don't think the updated code is working. On the "visitors who have visited today" I am seeing members who was on definitely yesterday according to my timezone, and not since. I think you are using the DEFAULT timezone for VB - not the server one, but the default one, not the member's own timezone.

Server time zone: GMT -6
VB default: GMT 0
My timezone: GMT +10

Instead of using GMT -6 which was what it was using, it is now using GMT 0 (I think).

Anyone else with the same problem?

genial
01-13-2002, 09:25 PM
Originally posted by Erwin Loh
Just one IMPORTANT NOTE for potential installers:

Remove the "color" variable from the first code change if you do NOT have the color hack installed (or whatever that color variable is for) - otherwise your index.php will not work as you will get a database error! :)uups sorry, i overlooked this. :o

i have fixed this little mistake in the posted code. ;)

i will check the fix for the timezone problem tomorrow, if i find time for. :D

DarkReaper
01-14-2002, 01:50 AM
Cool. :)

http://www.seriouscommunity.com

Installed there earlier today :)

Twig Deez
01-14-2002, 09:00 PM
working well over here. great hack!

a couple of screenshots:
> how it looks on the forumhome page (http://souljamuzic.hypermart.net/whos_online_forumhome.jpg)
> how it looks when the new window pops up (http://souljamuzic.hypermart.net/whos_online_onlinetoday.jpg)

:)

skyline2002
01-15-2002, 09:54 PM
hi, guys!! how can i let the second version(Version with usernames on extra site) work for my vb 2.01??

the first version works fine, but the second version I got nothing show up in Onlineday.php. I found some codes in onlinetoday.php
is only for vb 2.21. That may be the problem.

so can any one help me with the problem??
thank you guys so much!!!

Here is the pic. what I got :

skyline2002
01-16-2002, 07:13 AM
Originally posted by skyline2002
hi, guys!! how can i let the second version(Version with usernames on extra site) work for my vb 2.01??

the first version works fine, but the second version I got nothing show up in Onlineday.php. I found some codes in onlinetoday.php
is only for vb 2.21. That may be the problem.

so can any one help me with the problem??
thank you guys so much!!!

Here is the pic. what I got :

no one help me ??? :(

genial
01-16-2002, 10:36 AM
Originally posted by Erwin Loh
On second thoughts, I don't think the updated code is working. On the "visitors who have visited today" I am seeing members who was on definitely yesterday according to my timezone, and not since. I think you are using the DEFAULT timezone for VB - not the server one, but the default one, not the member's own timezone.

Server time zone: GMT -6
VB default: GMT 0
My timezone: GMT +10

Instead of using GMT -6 which was what it was using, it is now using GMT 0 (I think).from the timezone-fix, which was posted here (https://vborg.vbsupport.ru/showthread.php?postid=213023#post213023) , please delete this line:$unixtoday = $timeoffset * 3600 + $unixtoday;and replace this line:$unixtoday = $bbuserinfo[timeoffset] * 3600 + $unixtoday;with this:$unixtoday = $unixtoday + ($bbuserinfo['timezoneoffset'] - $timeoffset) * 3600;and test it again. ;)

i hope so it will work well. please give me your feedback about it.

Jawelin
01-16-2002, 04:36 PM
Originally posted by Mystics
The Hack only works 100% correct, when each member is in the same time zone as the Server!
Well. If I was about 6 hours behind the server ? :eek:
Is there any setting to modify (traslation) to make the daytime interval synchronized to my time and not to server one ?
Thanks a lot

Otherwise I think it'll not useful to me ... :(

Erwin
01-16-2002, 07:32 PM
Hi genial,

No, your time fix did not work.

It looked as though it was okay when a user is unregistered, but when I log on as a registered user, there was 0 number shown. Not sure why to be honest - your fix should have worked.

I reverted back to the original fix.

S0uL
01-16-2002, 08:18 PM
i have one problem the - Most users ever online on a day was - it keeps changing from day to day.

Lucky
01-17-2002, 08:10 AM
Great Hack!

Thank you :)

DarkReaper
01-17-2002, 08:47 PM
Could you make it so guests count as well? :)

Psychdrone
01-17-2002, 11:39 PM
errr Great hack! as I said before!

But now I changed it to where the users lists is located on another page, and All it doseit tell me how many people have been online. but dose not include a list of people? anyhelp thanks!!!!!!!

Mystics
01-18-2002, 10:33 AM
Originally posted by Psychdrone
errr Great hack! as I said before!

But now I changed it to where the users lists is located on another page, and All it doseit tell me how many people have been online. but dose not include a list of people? anyhelp thanks!!!!!!! Check if you have done all necessary template changes and if you have uploaded onlinetoday.php! (You only see the list of usernames on onlinetoday.php in the second version of the Hack!)

Psychdrone
01-18-2002, 09:00 PM
the second version??

so just redownload that zip?

allright I will try this again

Mystics
01-18-2002, 09:08 PM
Originally posted by Psychdrone
the second version?? Look at my first Posting in this Thread.....there are two Versions of the Hack

1. All names of the Users who where online today are listed on the Forum-Home just below the "Curent Active Users"

2. All names of the Users who where online today are listed on a separate Site (onlinetoday.php)

That's what I meant with the "second version"! :p

And it seems, you have installed the second version...because you don't see the names on the Forum Home !!! So, upload onlinetoday.php and open it....you can see the names there (and first, follow all instructions in "who-was-online-today-with-extra-window.txt" !)

Psychdrone
01-20-2002, 01:29 AM
heh didn't see your second post! :zzz:

anyways thanks bud, got it working, :)

If you ever need anything give me a holla :cool:

L'Bo
01-20-2002, 01:22 PM
this seems like a great hack.. but when i try to install it on index.php i get a error

Parse error: parse error in /home/lbo/public_html/forums/index.php on line 267

thats what happend i am running 2.2.1

some one please help me

Shenlong
01-20-2002, 01:37 PM
im running 2.2.1 and it works perfectly,

post line 267

Dark_Wizard
01-20-2002, 11:41 PM
Awesome hack...thx!

SWFans.net
01-21-2002, 10:32 PM
Thank you for the great hack. :)

I would like to make a request of anyone who might be able to answer.

I?d like to make the onlinetoday.php file also show invisible users to my mods, but I am unable to do so on my own. Can anyone provide the code that would allow usergroup 7 to see invisible users in onlinetoday.php?

Lucky
01-22-2002, 05:19 AM
Sounds like a good idea!

genial
01-22-2002, 06:17 AM
Originally posted by SWFans.net
I?d like to make the onlinetoday.php file also show invisible users to my mods, but I am unable to do so on my own. Can anyone provide the code that would allow usergroup 7 to see invisible users in onlinetoday.php?this changes will allow supermoderators and moderators to see the invisible user, no matter what there usergroupid is.

search for this line in the hack:if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6) {and replace it with this line:if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6 and $bbuserinfo['usergroupid']!=5 and !$mod["$bbuserinfo[userid]"]) {

SWFans.net
01-22-2002, 02:19 PM
Works great. :D Thanks again.

Wolf42
01-25-2002, 12:30 PM
Dein Hack funzt tadellos! THX!!

Jawelin
01-28-2002, 03:24 PM
Very very useful hack, but I have some synchro problem... :greedy:

Installation type #1: I definetively don't think the followin code finds out the right midnight time when the server hasn't the same user's time zone... :pleased: WHERE lastactivity > " . mktime(0,0,0,date("m"),date("d"),date("Y")) . "

???

Thanks a lot.
Bye

Jawelin
01-28-2002, 03:41 PM
Originally posted by genial
[...]and replace this line:$unixtoday = $bbuserinfo[timeoffset] * 3600 + $unixtoday;with this:$unixtoday = $unixtoday + ($bbuserinfo['timezoneoffset'] - $timeoffset) * 3600;and test it again. ;)
i hope so it will work well. please give me your feedback about it.
Excuse me.
If you make the correction to $unixtoday between the two SELECTs, you'll obtain different results from SELECT COUNT and SELECT... Shouldn't you ?

I think it should be bette place the $unixtoday = $unixtoday + ($bbuserinfo['timezoneoffset'] - $timeoffset) * 3600; right after the first $unixtoday = assignment.

Do you agree ?

genial
01-28-2002, 09:38 PM
The problem is, if the timezone of a member is -5 cet and another user has +7 cet, then there are problems with the correct count of today-online-record. Therefore, for the online record counts it has to be taken an uniform timezone, namely the servertime.
To reset the display of the today-online-member-names at 0:00 hours of his time zone the display of the today-member-names has to be called up separately at his timezone.

I have a solution for this problem in my head, but momentarely i don't have the time to realize this. therefore it needs much more time to release the new version of this hack, that includes a fix for this problem. to this point the present hack works only 100%, when each member is in the same timezone as the server.

Jawelin
01-29-2002, 08:23 AM
Yeah. Infact yesterday I applied the hack and found about 270 users from the midnight with all your corrections.
Today I have 0 (zero!) users, according to the same hack... :confused:

Actually I think the traslation you made to $unixtoday var had the wrong sign ... :?:

I though to a simpler solution, I guess.
Simply, replace in the ORIGINAL HACK CODE:mktime(0,0,0,date("m"),date("d"),date("Y"));with:mktime($timeoffset-$bbuserinfo['timezoneoffset'],0,0,date("m"),date("d"),date("Y"));This should traslate the server's midnight time towards the user one.

What do you thin about ?

Jawelin
01-29-2002, 08:43 AM
Originally posted by Mystics
[...]"Most users ever online on a day".
[...]Greetz,
Mystics
Excuse me. I don't understand how this hack make the difference between storing into db the maxusers of the original VB index.php and the maxusers for the entire day.
It seems these two numbers are stored in the same field of the same table, and the second overwrites the first one.

Mystics, please, could you explain better those steps:
if ((int)$maxusers[0] <= $totalonline) {
$time = time();
$maxloggedin = "$totalonline " . $time . " " . $maxusers[2] . " " . $maxusers[3];
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
$maxusers[0] = $totalonline;
$maxusers[1] = $time;
}

[...]
[...]
[...]

if ((int)$maxusers[2] <= $numbertodayonline) {
$time = time();
$maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . $time;
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
$maxusers[2] = $numbertodayonline;
$maxusers[3] = $time;
}


Thanks a lot.
Bye

Mystics
01-29-2002, 11:35 AM
Originally posted by Jawelin
Mystics, please, could you explain better those stepsThe records are stored in the Template maxloggedin

Before the hack: only the number and the Time of the "Most users ever online at the same time" was stored in this Template.

Therefore the content looked like:21 101071001521 = $maxusers[0] = $totalonline = Number of the "Most users ever online at the same time"
1010710015 = $maxusers[1] = $time = Unix-Time of the moment when the record was reached

After the Hack: First the number and the Time of the "Most users ever online at the same time" and then the number and the Time of the "Most users ever online on a day" is stored in this Template.

Therefore the content look like:21 1010710015 84 101053033684 = $maxusers[2] = $numbertodayonline = Number of the "Most users ever online on a day"
1010530336 = $maxusers[3] = $time = Unix-Time of the moment when the record was reached

Jawelin
01-29-2002, 02:00 PM
Thanks a lot for such an exaustive answer.
I asked because, after having installed the hack for two days, I always got 0 as the maximum value and today as the date.
But I think it was due to the timezone problem.
About that, what do you think about my simple workaround of your hack code (3 posts above here) ?Originally posted by Jawelin
Simply, replace in the ORIGINAL HACK CODE:mktime(0,0,0,date("m"),date("d"),date("Y"))with:mktime($timeoffset-$bbuserinfo['timezoneoffset'],0,0,date("m"),date("d"),date("Y"))This should traslate the server's midnight time towards the user one.
Thanks again.

zadi
01-30-2002, 04:17 AM
On our forums we use the colored users online hack which colorizes members by usergroups. When we added the "Who-was-Online-Today" we noticed that it showed up in "black" (our link color). Well we wanted one that matched the colors shown in the CUO hack and so my co-admin hacked the hack. Enjoy. :) Remember to modify $mod["$userid"] or $todayuser['usergroupid'] == # to reflect your usergroup colors & ids.


created by genial @http://www.skats-board.de (eMail: phenomenal_genial@hotmail.com)
documentation & posted (with a few little changes) by Mystics (eMail: mystics27@gmx.net)

Modified by The Tech for Zadi

zadi
01-30-2002, 04:24 AM
?

Jawelin
01-30-2002, 11:08 AM
Nice!

What about the 'today' concept on board with different timezone from the users ?

It was the biggest - my own opinion - problem on the original hack.
Thanks.

Jawelin
01-30-2002, 11:17 AM
The above patch works correctly to 'identify' the midnight away from the server's timezone, but there's still a problem with the $time variable, I guess.
Infact, when a new day arrives across midnight on the user's timezone (me, for instance, the Admin), this hack goes on adding the user number to the new-day counter as it was the previous day.... :(

I can't get out !!! Heeeellllppppp, please!

Note: my time = +1, server's time -5 = vbdate difference +6

Thanks a lot.
Bye

-=dm=-
01-30-2002, 11:54 AM
great:)

is the hack on first page updated?
is there no need for add those changes?

thanx
dm

-=dm=-
01-30-2002, 12:43 PM
btw I noticed the "Most users ever online was 1 on 30-01-2002 at 03:48 PM."

its reseted and dont update :(
How do I fix this?

I have this one on bottom of the page and its working fine(but also reseted after this hack)

"Number of Active Users Today": 6
Most users ever online on a day was 6 on 30-01-2002


and I have this one on the top:

this one are not updating
"Currently Active Users:"
Most users ever online was 1 on 30-01-2002 at 03:50 PM.

Mystics
01-30-2002, 12:53 PM
is the hack on first page updated?No, the Hack on the first page only works 100% correct, when the server is in the same time zone as all users.


Originally posted by -=dm=-
its reseted and dont update :(
How do I fix this?Please check, if you have done really all changes in your Templates and your PHPs! The record doesn't get reset if everything is built-in correct :)

Jawelin
01-30-2002, 01:17 PM
Originally posted by Mystics
the Hack on the first page only works 100% correct, when the server is in the same time zone as all usersSURE! Of course.
Sorry having confused someone.

Even, does anybody have a solution to my problem with 6 hours more than the server ?

Mystics, which point should I modify to change the day for the stored counter ??? :(

Thanks

zadi
01-30-2002, 05:13 PM
What ever problems the original hack had with the today concept will be in this one as well. All my friend did was modify it to use with the colored online users. ;) We didn't anticipate the time zone problems.

Waterski
01-30-2002, 07:59 PM
Any chance to make this only visible to registered users or Admin?

Waterski

kc5uyw
02-02-2002, 08:32 PM
Excellent ... been looking for this.

1yesfan
02-05-2002, 09:30 PM
Not workign for me. I loaded everything, getting no error messages. Nothing is showing up!?!?!? Being new to this stuff, the templates I am making is a new one that will be in the customized area?

danielillo
02-08-2002, 04:15 PM
Great Hack,

I'm also +6 hours form my server.... What did I do? Easy, just typed:
"Registered Users Online today (From 06:00 am to 06:00 am)" http://www.dondepuedo.com/foro/onlinetoday.php?s=
:D hehehehhee

I have one question, my VB is 2.0.3, the hack works perfect, but Mods and Admins are not showed in bold or bold + italic. Does it work only for 2.2.x?

Thanks and, please, excuse my English ;)

Mystics
02-08-2002, 04:33 PM
Originally posted by danielillo
but Mods and Admins are not showed in bold or bold + italic. Does it work only for 2.2.x?This feature first was implemented in vB 2.2.x...so it doesn't work in 2.0.3, neither in "Who's online", nor in "Who was online today".

Jawelin
02-08-2002, 06:21 PM
Originally posted by danielillo
Great Hack,

I'm also +6 hours form my server.... What did I do? Easy, just typed:
"Registered Users Online today (From 06:00 am to 06:00 am)" http://www.dondepuedo.com/foro/onlinetoday.php?s=
:D hehehehhee

I have one question, my VB is 2.0.3, the hack works perfect, but Mods and Admins are not showed in bold or bold + italic. Does it work only for 2.2.x?

Thanks and, please, excuse my English ;)
I realized a little upgrade to the hack to manage other local times than the server.
Unfortunately, as it should be an absolute value to show an user the onlines from midnight, any admin should choose only ONE midnight for his server, and all the other time-zoned users will see the admin's midnight.
If someone is interested and with the permission of the author of this hack, I could post mine ...

LMK.
Thanks

X-Fan
02-10-2002, 12:32 PM
Don't know if this has been asked before (and if it has, my apologies in advance), but would it be possible to do a variant of this hack that doesn't store all the names of those that have visited in a day, just the number, and to have that displayed in the Currently Active Users section (ie included in the forumhome_loggedinusers template)?

If it is, could someone give me a step-by-step on how to do that, please?

Thomas P
02-10-2002, 03:44 PM
Hi there,

nice hack, works great and was very easy to install!

Guests would be nice as mentioned, what about storing visitors in "whois online"?
Then stored visitors online today + members online today = all sessions served today... please state if I see things to easy ;)
Anyway: Great hack!

Super Sache: Gute Arbeit! :)
cu,
-Tom

Jawelin
02-10-2002, 06:19 PM
Originally posted by X-Fan
Don't know if this has been asked before (and if it has, my apologies in advance), but would it be possible to do a variant of this hack that doesn't store all the names of those that have visited in a day, just the number, and to have that displayed in the Currently Active Users section (ie included in the forumhome_loggedinusers template)?

If it is, could someone give me a step-by-step on how to do that, please?
The hack DOESN'T store anyway all the users.
Simply searches into DB for all contacts within the day (for each user is keepen the timemark of last access).
The hack infact contains two selects: first for COUNT, second for retrieve rows.
Simply, use only the first one... ;)
Hwr I suggest you to use the second variation (with new page).
Simply you can modify index.php as written and don't create the link into template.

Bye

X-Fan
02-11-2002, 01:41 AM
Originally posted by Jawelin
Hwr I suggest you to use the second variation (with new page).
Simply you can modify index.php as written and don't create the link into template.

But that would still show the users online today in a separate "box" to the currently active users box. How would one incorporate the two together?

Sorry if the answer to this is an obvious one, but I'm still getting to grips with vBulletin!

Jawelin
02-11-2002, 12:03 PM
They are in different bits in templates.
You should merge that bits in one, but shall work a little with cut&paste... ;)

Martz
02-11-2002, 05:10 PM
How difficult would it be to change the query to show the the maximum number of users today, concurrently? This would be good for checking how many people have been on at once, instead of in total. It would be a great addition!

What would the query be?

Mystics
02-11-2002, 05:22 PM
Originally posted by Martz
How difficult would it be to change the query to show the the maximum number of users today, concurrently? This would be good for checking how many people have been on at once, instead of in total. It would be a great addition!Uhm.......are you talking about "Currently Active Users", which is a standard feature of vBulletin? :confused:

mondaynightmike
02-15-2002, 01:36 AM
Hhi i have the coloured user hack installed and i can't get this to run with it. Sorry i am a newbie.

The currently active users work fine shows me as red etc

but current active users today (this hack) just shows everyone as black. Can anyone help???

Mystics
02-15-2002, 01:40 AM
Originally posted by mondaynightmike
but current active users today (this hack) just shows everyone as black. Can anyone help??? -> Who-was-Online-Today [Modified to use with Colored Users Online] (https://vborg.vbsupport.ru/showthread.php?s=&threadid=34620)

mondaynightmike
02-15-2002, 01:41 AM
thanks

Tim Wheatley
02-16-2002, 02:20 AM
If anyone uses the seperate page to show their today online users, this is what they need in that pages php file:

<?php

error_reporting(7);
$templatesused = 'error_whosonlinedisabled,maxloggedin,whowasonline _todayloggedinusers,whowasonline_todayloggedinuser ,whosonline_legend,whowasonline';
$loadmaxusers=1;

require('./global.php');

if (!$WOLenable) {
eval("standarderror(\"".gettemplate("error_whosonlinedisabled")."\");");
}

$permissions = getpermissions(0,-1,$bbuserinfo['usergroupid']);
$usergroupdef = $permissions;

if (!$usergroupdef['canwhosonline']) {
show_nopermission();
}

$forummoderators=$DB_site->query('SELECT user.userid,user.username,moderator.forumid
FROM moderator
LEFT JOIN user
ON (moderator.userid=user.userid)
ORDER BY user.username');
while ($moderator=$DB_site->fetch_array($forummoderators)) {
$imodcache["$moderator[forumid]"][] = $moderator;
$mod["$moderator[userid]"] = 1;
}
$DB_site->free_result($forummoderators);
unset($moderator);

$maxusers=explode(" ", gettemplate('maxloggedin',0,0));

// today online hack begin
if ((int)$maxusers[0] <= $totalonline) {
$time = time();
$maxloggedin = "$totalonline " . $time . " " . $maxusers[2] . " " . $maxusers[3];
$maxusers[0] = $totalonline;
$maxusers[1] = $time;
}

$todayloggedinusers = "";
$numbertodayonline = 0;
$numbertodayonlineinvisible = 0;
$numbertodayonline = 0;

$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, invisible FROM user
WHERE lastactivity > " . mktime(0,0,0,date("m"),date("d"),date("Y")) . "
ORDER BY username");
while ($todayuser=$DB_site->fetch_array($todayusers)) {
$numbertodayonline++;
$invisibleuser = '';
$userid = $todayuser['userid'];
$lastactivetime = vbdate($timeformat, $todayuser[lastactivity]);
if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6) {
$numbertodayonlineinvisible++;
continue;
}
if ($todayuser['invisible'] == 1) { // Invisible User but show to Admin
$invisibleuser = '*';
}
if ($todayuser['usergroupid'] == 6 and $highlightadmin) {
$username = "<FONT COLOR=#FF0000>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 5) and $highlightadmin) {
$username = "<FONT COLOR=#FF5501>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 7) and $highlightadmin) {
$username = "<FONT COLOR=#A46F0A>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 14) and $highlightadmin) {
$username = "<FONT COLOR=#A46F0A>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 10)) {
$username = "<FONT COLOR=#00CC00>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 13)) {
$username = "<FONT COLOR=#00CC00>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 9)) {
$username = "<FONT COLOR=#0945A9>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 8)) {
$username = "<FONT COLOR=#5409A9>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 2)) {
$username = "<FONT COLOR=#666666>$todayuser[username]</FONT>";
} else {
$username = $todayuser['username'];
}
if (!$todayloggedinuser) {
eval("\$todayloggedinuser = \"".gettemplate('whowasonline_todayloggedinuser')."\";");
} else {
eval("\$todayloggedinuser .= \", ".gettemplate('whowasonline_todayloggedinuser')."\";");
}
}

$DB_site->free_result($todayusers);

if ($bbuserinfo[usergroupid] == 6) {
$todayonline = $numbertodayonline;
} else {
$todayonline = $numbertodayonline - $numbertodayonlineinvisible;
}

if ((int)$maxusers[2] <= $numbertodayonline) {
$time = time();
$maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . $time;
$maxusers[2] = $numbertodayonline;
$maxusers[3] = $time;
}

$todayrecordusers = $maxusers[2];
$todayrecorddate = vbdate($dateformat,$maxusers[3]);

eval("\$todayloggedinusers = \"".gettemplate('whowasonline_todayloggedinusers')."\";");

if ($WOLrefresh) {
$metarefresh = "<META HTTP-EQUIV=\"refresh\" CONTENT=\"$WOLrefresh; URL=onlinetoday.php?s=$session[sessionhash]$formeta\"> ";
}
if ($highlightadmin) {
eval("\$legendtable = \"".gettemplate("whosonline_legend")."\";");
}
eval ("\$tablehead = \"$tablehead\";");
eval("dooutput(\"".gettemplate("whowasonline")."\");");

?>

Tim Wheatley
02-16-2002, 02:33 AM
Here's the colors which match the ones used in VBStats and also the other colored CURRENT online users hack.

if ($todayuser['invisible'] == 1) { // Invisible User but show to Admin
$invisibleuser = '*';
}
if ($todayuser['usergroupid'] == 6 and $highlightadmin) {
$username = "<FONT COLOR=red>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 5) and $highlightadmin) {
$username = "<FONT COLOR=darkred>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 7) and $highlightadmin) {
$username = "<FONT COLOR=green>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 4)) {
$username = "<FONT COLOR=black>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 8)) {
$username = "<FONT COLOR=orange>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 3)) {
$username = "<FONT COLOR=black>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 1)) {
$username = "<FONT COLOR=black>$todayuser[username]</FONT>";

} else if (($todayuser['usergroupid'] == 2)) {
$username = "<FONT COLOR=blue>$todayuser[username]</FONT>";
} else {
$username = $todayuser['username'];
}

mondaynightmike
02-16-2002, 11:25 AM
ok another quesiton yeturdya my most ever users online in one day was 18 today it says 11. Whats going on? i looked through these pages but ocuold not find it, you may have posted it and i missed it. Can anyone help? I am using at the bottom of my forums http://www.f1modelnews.com/modelforums

thanks

Edgar
02-16-2002, 04:47 PM
Great hack,works like a dream:)

Jawelin
02-16-2002, 09:03 PM
Originally posted by mondaynightmike
ok another quesiton yeturdya my most ever users online in one day was 18 today it says 11. Whats going on?
thanks Is your timezone the same of your server one ?

mondaynightmike
02-16-2002, 09:12 PM
um i have mine set a GMT i use 34sp.com as a server. I don't know what they run at. Can i change what time they run at?

Lesane
02-17-2002, 05:30 PM
Thanks for the addon. Worked great :up:

Floris
02-24-2002, 11:36 AM
Hey there :)

I have applied this hack, but didn't quite stick to your installation instructions :) Sorry! I have applied it by altering the forumhome_loggedinuser(s) template and now I have it split up next to the WOL !! Actually looks pretty cool :)

Thank you for the code!! Very easy to apply and when its time to goto vB3 I can just put index.php back and upgrade, and re-apply this simple hack! Way cool

onliner
02-27-2002, 04:36 AM
thanks!

datatec
02-28-2002, 02:56 AM
thanks

Gamingforce
03-05-2002, 03:00 AM
This is a wonderful hack! Attached is your awesome script at work on my site.

Lucky
03-05-2002, 05:18 PM
Works great

Buster.de
03-06-2002, 12:31 PM
It's a great hack, thx.

Is there any version of this hack including all fixes?
What's about the "next version" of the hack as mentioned some posts before?

Mr. Slugworth
03-06-2002, 05:26 PM
I installed the hack, and it looks great (version #2). Thanks!!! I just had one problem with the onlinetoday.php file. When it is shown, I get a header problem at first, and then after refresh, I get the following above the header: ( onlinetoday.php§¸fƒ°¸fƒ°mBIN‚?¸ä )

Any ideas? It only shows up on macs, but it is still a pain. The header problem is universal.

Mr. Slugworth
03-08-2002, 10:18 PM
I figured out the header problem, just changed the error reporting to a lower number, no problem.

Now, I have a problem with the "Most ever online on a day" number. Here is what happened:

First day, worked great, had 41 people on board. Second day, same thing, but only had 32 people on board, and so it didn't change from day 1. Third day, today, we had a record amount of people online at the same time, so the "Most ever online" was changed from 23 to 25, and for some reason the "Most ever online on a day" was reset, and is currently 29, which is my total for today.

Any ideas why this is reset?

Mr. Slugworth
03-12-2002, 06:47 PM
Anyone, anyone....?

nafae
03-15-2002, 06:01 PM
Mr. Slugworth-I installed this hack, and it sayes:

Number of Active Users Today: 13
Most users ever online on a day was 25 on Today.

(I have yesterday-today hack installed)

however notice if only 13 were on today, 25 can't be the record so I think I am having the same problem as you.

Anyone have any idea?

Mr. Slugworth
03-15-2002, 06:24 PM
Yah.

Any time I have a record number of people online at the same time (members and quests), my most ever online on a day resets to the current day's figure. So, I am racking up three or four days, and then it gets reset. Bothersome.

69-FLy-gUy
03-16-2002, 04:09 AM
so has anyone ever figured out the timezone thing?

nafae
03-16-2002, 02:42 PM
It appears firefly has :) its running fine here. Just not on my forums :(

nafae
03-16-2002, 09:22 PM
Bump :(

69-FLy-gUy
03-20-2002, 11:46 PM
I am woindering if FireFly will tell us how he did it????

FireFly?

I wonder how we get his attention to this thread?????

Gamingforce
03-30-2002, 03:10 AM
I love this hack. Really busy day at my place yesterday. Took a screenshot. Over 3000 people active o_O.

http://www.xarcos.com/gff/activetoday1.gif
http://www.xarcos.com/gff/activetoday2.gif

Martz
03-30-2002, 09:58 AM
Originally posted by Mystics
Uhm.......are you talking about "Currently Active Users", which is a standard feature of vBulletin? :confused:

No, I am talking about "Currently Active Users Maximum" for today. Our record is 71 users online, concurrently. That was 3 months ago or something. Re usually hit 50/60 some days - but I have to be around to see it. My suggestion was to show:

Currently Active Users: 31
There are currently 27 members and 4 guests on the boards. | Most users ever online was 71 on 18-11-2001 at 23:24. The most users on-line today at one time was: 54


The red being the bit I am after. Hope that is clear enough. :paranoid:

boatdesign
04-01-2002, 12:15 AM
Just wanted to say very nice mod and a big thank you! I really like this one. The only thing which would make it even better would be to also include the number of guests who visit in addition to logged in members.

babo
04-02-2002, 01:58 PM
Originally posted by Jawelin
Yeah. Infact yesterday I applied the hack and found about 270 users from the midnight with all your corrections.
Today I have 0 (zero!) users, according to the same hack... :confused:

Actually I think the traslation you made to $unixtoday var had the wrong sign ... :?:

I though to a simpler solution, I guess.
Simply, replace in the ORIGINAL HACK CODE:mktime(0,0,0,date("m"),date("d"),date("Y"));with:mktime($timeoffset-$bbuserinfo['timezoneoffset'],0,0,date("m"),date("d"),date("Y"));This should traslate the server's midnight time towards the user one.

What do you thin about ?
It does not give desirable outcomes!
I have other solution:
in the ORIGINAL HACK CODE (index.php & onlinetoday.php):
replace:mktime(0,0,0,date("m"),date("d"),date("Y"))
with:
mktime(0,0,0,vbdate("m", time()),vbdate("d",time()),vbdate("Y", time()))
It should work.

centris
04-02-2002, 05:38 PM
I don't know if this is a 2.2.4 issue I think not. But I noticed the other day a member who had visited the forums. Now I know for a fact that on that occasion it was impossible WHY, he was with me the whole day thats why. So I began looking at the visitors in the last 24hrs which might show 7 but the hack reported 9? Over the last few days this has happend several times, the members visiting (who have not) have their last visit date reset to 1970??

Hope this all makes sense. The issue is still there in 2.2.5.

Jawelin
04-02-2002, 08:23 PM
Originally posted by babo

It does not give desirable outcomes!
I have other solution:

It should work.
I underlined myself that wasn't a right solution because of date changing line ...
Even I specified I found a corrected translation (I mean an algebric value with a post correction for the date around midnight) and asked if anybody was interested in.
Mine is stable and full working (I use for all other 'midnight' timeline need like the posts made today, etc.) for a server lated than the admin's time ... ;)
I.e., when on my server is midnight, my time is 0600 in the morning...

LMK

P.S.: any case, apart you forgot a parenthesis, the solution couldn't work on a left around of midnight ... as you loose the day change, this way.

unclejojo16
04-03-2002, 11:26 PM
On our forums we use the colored users online hack which colorizes members by usergroups. When we added the "Who-was-Online-Today" we noticed that it showed up in "black" (our link color). Well we wanted one that matched the colors shown in the CUO hack and so my co-admin hacked the hack. Enjoy. Remember to modify $mod["$userid"] or $todayuser['usergroupid'] == # to reflect your usergroup colors & ids.


created by genial @http://www.skats-board.de (eMail: phenomenal_genial@hotmail.com)
documentation & posted (with a few little changes) by Mystics (eMail: mystics27@gmx.net)

The reason im postin this..iz cus millions of peoples asked me to get them this hack for 2.2.1...hear it is...but im also releasin for newer versions soon..unles itz been released already

unclejojo16
04-03-2002, 11:27 PM
<a href="https://vborg.vbsupport.ru/attachment.php?s=&postid=216801" target="_blank">https://vborg.vbsupport.ru/attac...&postid=216801</a>

Screen Shot

Neo
04-03-2002, 11:29 PM
WOW... that is sure a colorful picture you have there O_O

unclejojo16
04-03-2002, 11:37 PM
indeed.....

Rick
04-04-2002, 01:31 AM
Thanks, nice hack. Can I make this show up on a seperate page so you would have to click on a link to view it?

I ran it and it showed 549 users were active today. The printout is a bit overwhelming in the main page :D

Does it count guest users in the total? If not could it be made to do so??

Thanks again.

ZiRu$
04-04-2002, 01:43 AM
Originally posted by Rick
Thanks, nice hack. Can I make this show up on a seperate page so you would have to click on a link to view it?

I ran it and it showed 549 users were active today. The printout is a bit overwhelming in the main page :D

Does it count guest users in the total? If not could it be made to do so??

Thanks again.

me want to

unclejojo16
04-04-2002, 11:18 AM
Um...It does count guests...If nto i'll tryn and get it to..

Rick
04-04-2002, 02:23 PM
Maybe they are just included in the total and not seperate from the logged in users?

Also, what about my question:

Can I make this show up on a seperate page so you would have to click on a link to view it?

unclejojo16
04-04-2002, 08:00 PM
That would have to include a hole new template under forum display.,....work on it wouldnt be hard to figure out....

Rick
04-04-2002, 10:02 PM
I would have no clue where to begin. I just implement hacks.. not create them. I wish I could.

lifesourcerec
04-09-2002, 06:08 PM
What does the "*" means after the names?

Mystics
04-09-2002, 06:18 PM
Originally posted by lifesourcerec
What does the "*" means after the names? That this user is invisible (only Admins can see him)

wooolF[RM]
04-12-2002, 08:38 PM
]just changed from one version of this hack to another one :) still great! :D

BBurns
04-16-2002, 12:25 AM
I attached the screenshot. Mine keeps counting the members who were online, but it doesn't give the names.

just the same number of commas as the number who was online! ha ha

PEACE

Mystics
04-16-2002, 06:30 AM
Originally posted by BBurns
I attached the screenshot. Mine keeps counting the members who were online, but it doesn't give the names.

just the same number of commas as the number who was online! ha haPEACE Re-Check your index.php and the Templates and compare it with the instructions. It is not built-in correct.

BBurns
04-16-2002, 08:54 PM
I found it, thanks, I didn't create one of the templates.

ThePeak
04-17-2002, 02:11 AM
Will this work for 2.2.5?

FWC
04-17-2002, 03:45 AM
Originally posted by ThePeak
Will this work for 2.2.5? Yes, it works fine with 2.2.5.

-=dm=-
04-23-2002, 10:55 AM
Originally posted by xiphoid
Hey there :)

I have applied this hack, but didn't quite stick to your installation instructions :) Sorry! I have applied it by altering the forumhome_loggedinuser(s) template and now I have it split up next to the WOL !! Actually looks pretty cool :)

Thank you for the code!! Very easy to apply and when its time to goto vB3 I can just put index.php back and upgrade, and re-apply this simple hack! Way cool

Hi xiphoid
Your "online users" looks great, how did you split it that way, can you please explain, I like it very much looks much better this way :)
thanx

mashby
04-29-2002, 03:33 AM
Just installed the hack and it was a piece of cake! Great work and thanks for making such a wonderful hack.

Now just to figure out how to list the names on a separate page like they do on this forum. :) Back to reviewing the thread to find out!

Angelus1753
04-29-2002, 10:09 AM
Hi, love this hack :)

One question,

I'd like to know if there was a way to hide it from guests and put an option in the user cp to ask if they want to show up on 'online today' but still show up on the normal who's online.

If the user selects 'no, I don't want to show up on 'online today'' than they become invisible (just for the 'online today') but the admin can see them.

That make sense?

|-Last-Spirit-|
04-30-2002, 03:29 PM
Hi,
I installed the hack on my board, but when I edit my index.php I have the following line on top of my forum :

tr id="cat"

..... I didn't do anything wrong so what can I do to squash this bug ?

Mystics
04-30-2002, 03:32 PM
@|-Last-Spirit-|
Maybe you edited a template in the wrong way or you added one template not correct.

|-Last-Spirit-|
04-30-2002, 03:45 PM
Originally posted by Mystics
@|-Last-Spirit-|
Maybe you edited a template in the wrong way or you added one template not correct.

I wish but I don't think that's possible, all that has to be done is adding 2 new templates (can't see how my ctrl+v button screwed up) and replacing some text in the index.php....

When I restore my old index.php the prob is gone but also the hack ofcourse....

Dark Odin
04-30-2002, 07:47 PM
How many queries does this add?

Mystics
04-30-2002, 08:33 PM
Originally posted by Dark Odin
How many queries does this add? It adds one Query in index.php, and a second one only when there is a new record.

Mental Stamina
05-02-2002, 10:31 PM
i attempted to install this
but my onlinetoday.php page shows no names
i need the whosonline_legend template

Mystics
05-03-2002, 11:44 AM
Originally posted by Mental Stamina
i attempted to install this
but my onlinetoday.php page shows no namesPlease check the instructions to see what you have done wrong....you have forgotten one or more templates (I think "whowasonline_todayloggedinuser")Originally posted by Mental Stamina
i need the whosonline_legend template
whosonline_legend is a standard Template in vBulletin since 2.2.x<br>
<!-- Legend -->
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
<td bgcolor="{firstaltcolor}"><smallfont>
Names in <b>Bold</b> are forum Moderators. Names in <b><i>Bold & Italics</i></b> are forum Administrators.
</smallfont></td>
</tr>
</table>
</td></tr></table>
<!-- /Legend -->

mashby
05-03-2002, 02:58 PM
The hack is working perfectly and makes a great addition to my board! I just have one question.

Is there any way to create a history of how many people have logged on each day for say a week, or a month? I'd like to see just how the days are averaging, etc.

Renegade
05-04-2002, 02:53 PM
Very cool hack, now I can easily see who visited the board in a day!

thx

morrow
05-07-2002, 07:02 PM
Nice hack, but I seem to have a minor issue.

"The following members have already visited the Board today:"

is always blank.

any ideas?

see for yourself,

http://www.njflyfishing.com

Mystics
05-07-2002, 08:44 PM
Originally posted by morrow
Nice hack, but I seem to have a minor issue.

"The following members have already visited the Board today:"

is always blank.Recheck your changes in index.php and your Templates.

Maybe your have forgotten the Template forumhome_todayloggedinuser

morrow
05-08-2002, 02:42 PM
I misunderstood the instructions for the last part, but once I created that template, it worked out just fine.

Very nice hack!

Thanks for everything.

:classic:

Boofo
05-12-2002, 12:05 AM
I'm having a probelm with it showing the right amount of users now. Here's what it says:

Number of active users today: 2
Most users ever online on a day was 5 on Today.

And it only lists 2 names when I know for sure there were 5 users on line today.

Anybody have any ideas? I have checked and re-checked everything and even re-stalled the templates and checked to make sure the code was right where is needed to be.

BTW: The reason the number of users is so small is because I am still setting the board up :) )

Anybody have any ideas as to why this is happening now? It worked great yesterday when I installed it but now it is showing wrong.

Mystics
05-12-2002, 12:07 AM
@Boofo

"Who is online" includes Guests, "Who was online" doesn't include Guests, maybe that's the reason.

Boofo
05-12-2002, 12:15 AM
I thoght of that, but the other 3 users that are missing on the listing were actually on there today. :)

Mystics
05-12-2002, 12:20 AM
Which version of the Hack have you installed (extra Page/Non extra Page)?

Have you applied the "Time-Fixes" which are posted somewhere in this Thread?

Boofo
05-12-2002, 12:43 AM
I installed the extra page version and as far as the time fix thing, I either missed that or didn't understand it. Do I need to apply it becuase it was fine yesterday and after midnight it must have gone wrong, is that it?

Mystics
05-12-2002, 12:47 AM
You maybe need to do this:

Open onlinetoday.php and search:
WHERE lastactivity > " . mktime(0,0,0,date("m"),date("d"),date("Y")) . "
Replace it with:
WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . "

Mystics

Boofo
05-12-2002, 12:54 AM
It worked, thank you very much. It says Number of avtive users today is 4 and the most ever online in a day is 5 on Today (which would mean a guest was on, right?) That is where the extra number comes up? Is there any way not to make it count guests?

Mystics
05-12-2002, 01:06 AM
The Hack does not count Guests.

The fact that the record today is higher than the number today is a bug which you cannot avoid.

Because the number of today users is generated dynamically based on each users local time and the record number of online users can be set by any user and is stored fixed in the database.

So a user in an other timezone can set an higher record than an other user in an other timezone actually will get.

Hm, I hope you understand, what I'm trying to say :)

Boofo
05-12-2002, 01:36 AM
I'm really lost on this one. take a look at waht I mean and maybe it will make more sense to me. Also, notice that on the main page at the bottom the Number of Avtive users today is different than it is on the page it links to. Why is that?

My Site (http://www.bearfacts2.com/forum/index.php)

Let me know what you think. I doubled checked everything and I must have missed something.

Mystics
05-12-2002, 01:41 AM
You can't do anything against your first Problem as I wrote in my last Posting.

>>Also, notice that on the main page at the bottom the Number of Avtive users today is different than it is on the page it links to

I have updated the instructions of the Hack.
To fix this, you also have to change the line in index.php (same changes you have done in onlinetoday.php)

Boofo
05-12-2002, 02:02 AM
Thank you (again). Everything seems to be in working order now. I guess I still don't quite fully understand the difference in most users ever line being different, but if you say that is normal and how it works, then I will leave it at that and not hurt myself trying to figure it out anymore. :) One last question, is there way to color the names like in Currently active Users for the Admin, Mod and Super Mod? I tried the one that was posted in this thread a ways up, but that was for the same page version and I couldn't get it to work.

Thanks again for a great hack and sorry about all of the problems. :)

HappyPike
06-05-2002, 06:57 AM
hey Mystic, I just installed the extra page version. The weird thing is it says "Number of Active Users Today: 0
Most users ever online on a day was 169 on Jun 05, 2002." It shows up correctly for some people (i.e. not zero). Do you know what's wrong?

My forum (http://forums.civfanatics.com)

Mystics
06-05-2002, 05:16 PM
Originally posted by HappyPike
hey Mystic, I just installed the extra page version. The weird thing is it says "Number of Active Users Today: 0
Most users ever online on a day was 169 on Jun 05, 2002." It shows up correctly for some people (i.e. not zero). Do you know what's wrong?It it shown correct for me, maybe it depends on the user's time zone (as I wrote, it only works 100% correct, if each User is in the same time zone as the Server :))

And maybe it needs some time to show a value>0 for each user.

Mystics

HappyPike
06-05-2002, 07:49 PM
It's working for me now also (although not 100% correct).

Now it says: "Number of Active Users Today: 750
Most users ever online on a day was 811 on Today. "

Thanks for the cool hack. :)

Mystics
06-05-2002, 07:56 PM
To explain the difference between the two numbers:

"Number of Active Users Today" is generated dynamically according to your time zone.

"Most users ever online on a day" is a static value saved in the database; each user can update this value, and according to the time zone of each user, User #1 maybe can have more people online on his "Today" as User #2 (because they are in different time zones)

I hope anybody could understand this ;)

Mystics

CRego3D
06-06-2002, 03:39 AM
Excellent Hack

just a question, is there a way to merge online.php and onlinetoday.php so the users that have been on today show below those who are on now ?

Mystics
06-06-2002, 05:33 PM
Originally posted by CRego3D
just a question, is there a way to merge online.php and onlinetoday.php so the users that have been on today show below those who are on now ? Here ya go :)

CRego3D
06-07-2002, 06:25 AM
Great .. it works 99.99%

I was gettign this error

Fatal error: Call to undefined function: getusercolor() in /home/yaxay/public_html/yack/online.php on line 1829

line 1829 was

$usercolor=getusercolor($todayuser['usergroupid'],$mod["$userid"],$highlightadmin,$userid);

so I commented it out, but now the admins and mods do not show in bold or italic :( .. any way we can fix this ? :)

Mystics
06-07-2002, 07:11 AM
Originally posted by CRego3D
I was gettign this error

Fatal error: Call to undefined function: getusercolor() in /home/yaxay/public_html/yack/online.php on line 1829Sorry for that, I have copied the wrong code (I adjusted the Hack in my Forum a little bit).

Please download the attachment again and redo the changes in online.php.

Mystics

CRego3D
06-07-2002, 10:36 PM
Ok, small problem

Most ever online: 57 on Today at 07:26 PM (on MAIN page)

that number was 73 ,, and it keeps changing .. I am not using this hack on the main page, but in combination on online.php

Any ideas

CRego3D
06-07-2002, 10:40 PM
actually, it's as if every x minutes it resets itself to whathever number users is on

Mystics
06-07-2002, 11:14 PM
ok, updated again.

CRego3D
06-08-2002, 01:48 AM
I am not sure I undersatand what was updated .. on my instructions I see version 1.0.3 .. that's what I already had

CRego3D
06-08-2002, 01:53 AM
it sems it's thje $recordusers variable that is getting messed up :p

CRego3D
06-08-2002, 01:57 AM
Originally posted by SgtSling
| Most users ever online was 43 on 01-12-2002 at 05:38 PM.

Why does my record for online users keep changing to the number that is currently online?

is something not gettig updated?

$recordusers seems t just point to whatever number I currently have online now.
how can I fix this .
I posted my code for loggedinusers on page 2
Sarge

that is my problem .. lookign thru the thread .. see if anybody foudn how to fix it

Mystics
06-08-2002, 06:31 AM
Have you replaced the code in online.php with the newest version??? (it got changed in 1.3 (I started to use version number in 1.3))

If not, do it ;)

CRego3D
06-08-2002, 03:39 PM
I replaced it with the code you gave me in the previous page .. yes

chris frolic
06-11-2002, 05:56 AM
Hmmm, I seem to be experiencing the same problem as above.

I installed the first version of this hack, and it worked fine. Problem was my board had over 200 visitors for the day, so at that point I decided to install the window version.

I replaced the original with the window version. At that point it stopped working, reporting 0 visitors today.

I triple checked and re-installed the installation to make sure there wasn't anything left over from the original. I reinstalled it over a older version of index.php that hadn't been hacked. I recopied the templates. Still no joy.

I also tried installing the version thats merged with online.php, and that one doesn't work either (0 visitors today).

Then I noticed something wierd (but probably related in some way); my "Most users ever online" has reset to today, with a very small number.

Anyone have any idea what might be causing this?

mashby
06-30-2002, 06:38 AM
I like this hack so much, I just installed it on a new board that I'm creating. This is my second vB board to use this hack. It installed like a piece of cake. Thanks for all the hard work Mystics! Great job. :)

Velocd
07-03-2002, 06:44 PM
I'm having a weird problem with this hack. Recently I found my homepage was generating an abnormal amount of queries for the small amount of hacks consisting on it. It was creating 43 queries, and that is even after I included all the templates in the $templateused="" list.

Well I was going through the index.php code, trying to find the suspect involved and I reached this hack. I was basically commenting out all the hacks individually on my index.php till I found which one was creating the excessive queries. When I commented out the who-is-online-today hack, it reduced my queries by 20! That makes me sad though, because this is one of my favorite and most useful statistical hacks I have :(

I installed everything perfect, does anyone know why this could be happening?? PM me if you would like to see my index.php.

Regards,
Velocd

g-force2k2
07-03-2002, 06:58 PM
Only code from looking at the file that i don't recognize is this:

$DB_site->free_result($todayusers);

Im not sure if its needed in the hack or not... not really sure of this free_result function but it may be the problem? just a suggestion that im not really sure about:p

g-force2k2

Velocd
07-03-2002, 07:40 PM
Unfortunantly, no that wasn't the source of the problem. I tried commenting just that out but I still recieve 20 extra queries. :(

Does anyone else get this affect from using this hack?

g-force2k2
07-03-2002, 07:50 PM
Code out this part

if ((int)$maxusers[2] <= $numbertodayonline) {
$time = time();
$maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . $time;
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
$maxusers[2] = $numbertodayonline;
$maxusers[3] = $time;
}

Then see if the amount drops or not ;\ i'd test but i don't have a server at the moment ;p

g-force2k2

Gary King
07-05-2002, 03:04 PM
Popular hack :) I've seen it around most boards :D

Gary King
07-05-2002, 03:16 PM
Installed :D

69-FLy-gUy
07-07-2002, 08:28 AM
so... has anyone figured out the timezone problem?

FleaBag
07-08-2002, 11:08 PM
Installed on 2.2.6 and working well. Thanks! :D

Schorsch
07-09-2002, 02:25 AM
thanks for this nice hack!! seems to work fine up to now.

what about the timezone ?? what happens when not ALL users have the same time zone like the server ?

FleaBag
07-10-2002, 11:10 PM
How can I stop admins from being italicized in this hack? Thanks in advance for your help.

Mystics
07-11-2002, 01:09 PM
Originally posted by GamerForums
How can I stop admins from being italicized in this hack? Thanks in advance for your help. Replace this if ($todayuser['usergroupid'] == 6 and $highlightadmin) {
$username = "<b><i>$todayuser[username]</i></b>";
} else if (($mod["$userid"] or $todayuser['usergroupid'] == 5) and $highlightadmin) {
$username = "<b>$todayuser[username]</b>";
} else {
$username = $todayuser['username'];
}with:
if (($mod["$userid"] or $todayuser['usergroupid'] == 5) and $highlightadmin) {
$username = "<b>$todayuser[username]</b>";
} else {
$username = $todayuser['username'];
}

FleaBag
07-11-2002, 02:50 PM
Thanks very much, this is a fantastic addition to my forums! :D

Velocd
07-11-2002, 06:45 PM
We'll I'm still having that query problem, what is the status on that Mystics? I sent that PM to you with my debug query info a while ago :(

edit:
How strange, I just uncommented the code and I'm only getting 27 queries (an increase of 2). Although I'm running my forums currently on my computer, but this is strange...hopefully it doesn't go back when I upload to my server..

Mystics
07-11-2002, 07:44 PM
@Velocd

Sorry, I think I have forgotten you ;)

I also had only 27 Querys when I used your index.php.

I don't know why there are more querys when you use it on your server.

Velocd
07-15-2002, 03:27 PM
Heh, this problem has turned very strange. On my localserver running on my computer, my forum with this hack installed generates just 27 queries. All files on my localserver are EXACTLY the same as the ones running on my webserver. Well, my forums on my webserver with this hack installed generate 43 queries. :dead:

When I comment out the hack I get down to 23 queries. So this appears to be some type of weird database error, since I'm sure it's not in the files. Anyway to zero in on the source of the problem? If it's a database glitch or something.. where might I start looking?

Velocd
07-15-2002, 03:37 PM
lol, my forum isn't even generating 43 queries anymore with this on, it's generating 49..*dies*
There is something screwed up in my database for sure...

c-pr0mpt
07-26-2002, 10:56 PM
On a forum I work on, the todaylogged in users shows the correct number to me if I am logged in as admin, but if I log out or sign in under a normal user it doesnt count invisible users.

Now I know about the fix to changing the code to $numbertodayonline

But it doesnt work. It still stays the same. Any help?

Here is my code in index.php

// today online hack begin
if ((int)$maxusers[0] <= $totalonline) {
$time = time();
$maxloggedin = "$totalonline " . $time . " " . $maxusers[2] . " " . $maxusers[3];
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
$maxusers[0] = $totalonline;
$maxusers[1] = $time;
}

$todayloggedinusers = "";
$numbertodayonline = 0;
$numbertodayonlineinvisible = 0;

$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, invisible FROM user
WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . "
ORDER BY username");
while ($todayuser=$DB_site->fetch_array($todayusers)) {
$numbertodayonline++;
if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6) {
$numbertodayonlineinvisible++;
continue;
}
}

$DB_site->free_result($todayusers);

if ($bbuserinfo[usergroupid] == 6) {
$todayonline = $numbertodayonline;
} else {
$todayonline = $numbertodayonline - $numbertodayonlineinvisible;
}

if ((int)$maxusers[2] <= $numbertodayonline) {
$time = time();
$maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . $time;
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
$maxusers[2] = $numbertodayonline;
$maxusers[3] = $time;
}

$todayrecordusers = $maxusers[2];
$todayrecorddate = vbdate($dateformat,$maxusers[3]);

eval("\$todayloggedinusers = \"".gettemplate('forumhome_todayloggedinusers')."\";");
//today online hack end


And in te template I am using, $numbertodayonline.

Thanks!

Schorsch
08-06-2002, 04:19 AM
here the ultimate question :banana:

besides the number of registered members, how can I show the total number of guests who were online ?

I saw this feature on a phpBB2 board (http://www.phpbb2.de/phpBB/index.php), take a look at the screenshot.

isn't there a possibility to realize this cool feature for the hack for vBulletin ???

thanks,
Schorsch

disillusioned
08-08-2002, 01:34 AM
Parse errors hurt my brain...

I followed every step of this hack from beginning to end... And ended up with happy spiffy parse errors... I'm not sure why- Also, we use .php3 files for all of our forums... Now, I'll upload it and all user or $forum relative data is missing- including avatars, status, post counts, and everything else..
I also had a very similar- almost identical parse error with the 'what style are we all using' hack... I'm not sure why this is- I'm uploading in ASCII and everything... but it's quite frustrating to do all that vigorous copy/pasting ;-) and find your board all that much more worse for wear.

Would anyone like to cue me on on how stupid I'm being?
I'd greatly appreciate it!

Tony G
08-10-2002, 07:37 AM
Sorry for bumping, but there is a problem.

The time for when the most users online isn't working. Everything else works okay.

Any ideas?

Beams
08-10-2002, 08:06 AM
Installed fine but noticed it only starts counting the user online from 12midday it seems to work fine until 5-6 am then its back to 0 users. The problem is it doesn't count any users online until 12 midday again so missing 6 hours any ideas why??

Ideally it would be best if it would work from 12 midnight to 12 midnight :)

Great hack btw

Thanks for any help

Beams :D

NexDog
08-10-2002, 11:55 AM
Well, no suprise that this isn't working for me. :D

Folloowed the steps to the letter, editted index.php and created the 2 templates and editted forumhome. Nothing. :(

I'm using the instructions found here:

https://vborg.vbsupport.ru/attachment.php?s=&postid=212495

I thought the code might be commenting itself out. For example:

// today online hack begin if ((int)$maxusers[0]..........

So I did:

// today online hack begin
if ((int)$maxusers[0]........

And got a parse error on line 374. Weird.

Tony G
08-10-2002, 12:32 PM
Originally posted by Beams
Installed fine but noticed it only starts counting the user online from 12midday it seems to work fine until 5-6 am then its back to 0 users. The problem is it doesn't count any users online until 12 midday again so missing 6 hours any ideas why??

Ideally it would be best if it would work from 12 midnight to 12 midnight :)

Great hack btw

Thanks for any help

Beams :D

I'm assuming it's programmed to a certain time and so it will reset on that exact time. So for this cycle it should go for 24 hours.

NexDog
08-10-2002, 02:03 PM
Yep, just went through the hack again, step-by-step. I made no mistakes. But it just doesn't show up. :(

Tony G
08-11-2002, 01:01 AM
Now it aint showing anyone thats come online today. And it was working fine yesterday. Damn this hack. :p

NexDog
08-15-2002, 05:51 AM
Been through this hack with a fine tooth comb. Just doesn't display. :(

Tony G
08-15-2002, 10:51 AM
I found out it's the TimeZone problem, but none of those fixes posted worked for me. :/

Tony G
08-17-2002, 01:11 AM
*bump* annyone? Only place I have seen it work properly is here. :(

NexDog
08-17-2002, 05:08 AM
At least it is working for you. I can't even get anything to appear. :(

mbcguru
08-22-2002, 12:02 PM
Hi. I installed this hack and like it very much except for one thing....

It over-wrote the "most users ever online in a day" thing :( and is updating it every day now with the current count. I really liked that. Did I do something wrong? How can I resurrect that?

my forum: http://www.militantbreastfeedingcult.com/vbportal/index.php

Mystics
08-22-2002, 12:08 PM
@mbcguru
I don't think this is a problem of this hack, because it works perfect for me and hundred others.

There are probleme together with vBIndex....and maybe with vBPortal (which you use) too.

Mystics

mbcguru
08-22-2002, 12:15 PM
Ah. Could be. Can you suggest where I might look in the files and stuff to fix it?

Mystics
08-22-2002, 12:25 PM
Maybe something like that:

UPDATE template SET template='xxx' WHERE title="maxloggedin"

But I really don't know vBPortal.

joecool
08-27-2002, 02:23 PM
Hello,

how can I set the text: Number of Active Users Today

In the center of the page?

plz help

FleaBag
09-03-2002, 02:43 AM
Works with 2.2.7. Good work. :D

Keith
09-05-2002, 08:14 PM
I have same issue since day 1, resets back to 0 (zero) every day as opposed to storing and showing "most ever". I'm also using VBPortal, but dont understand how that would effect the hack. If it is interfering with the hack, there's no instructions on how to handle or fix.

Portal doesn't use the same params/variables as in the hack, unless I'm missing something. The forum index.php page generated is separate from the main portal page.

Keith
09-05-2002, 08:24 PM
Using the database access, I found this in the template maxloggedin.

5 1031260119 22 1031260119

I'm assuming this is actually 2 entries, quantity and date?

Tony G
09-08-2002, 03:23 AM
Originally posted by Keith
I have same issue since day 1, resets back to 0 (zero) every day as opposed to storing and showing "most ever". I'm also using VBPortal, but dont understand how that would effect the hack. If it is interfering with the hack, there's no instructions on how to handle or fix.

Portal doesn't use the same params/variables as in the hack, unless I'm missing something. The forum index.php page generated is separate from the main portal page.

Like most of us it's the timezone problem that resets it, and still no fix.

mbcguru
09-08-2002, 02:24 PM
I can't say it's a time zone problem on my forum. My "most users ever online" reflects current online. It fluctuates up and down all day. My "most ever online in a day" reflects the total that have been on that current day and resets at the beginning of the next day, then starts counting up again. The total for the day resets correctly.

Opie
09-09-2002, 04:12 AM
My onlinetoday.php is blank?

Pretty sure i did it right and im using 2.2.7.

Edit--
Nevermind i didn't add a (s) on one of the templates haha

Keith
09-13-2002, 01:51 AM
To all you php coding Einsteins!! :D :D Will this work?

What if we set the timezone to -5GMT, then hide this setting in the registration and profile area so members cannot change it. Also hide it from incoming members who are registering, then reset all my current members in the database to this same timezone.

Theoretically, the server time, the VBulletin time and all members would then be in the same timezone right? I have to mull this over some more, it's just a thought. Have no idea how to hide this though yet.

Keith
09-13-2002, 04:37 PM
Well, that didn't work. Hiding the timezone piece in all the templates and resetting all the members to the same timezone as the vbulleting timezone did absolutely nothing. So the search for a fix continues. :(

Keith
09-13-2002, 04:44 PM
Firefly, the hack appears to work fine here. Given you have members all around the world and the resulting amount of different timezones, why does it work here?

PHiXTiT
09-14-2002, 03:22 AM
Great HaCK!

ThanXZ

5 STaRZ

TheEDIGuy
09-18-2002, 12:51 PM
I'm running into the same problem. Glad it's not just me. Hopefully looking for a fix! Otherwise, great hack.

TheEDIguy
Fans of Reality TV
http://www.fansofrealitytv.com

TheEDIGuy
09-20-2002, 10:54 AM
Ah, screw it. I'm uninstalling. This is making me look bad, resetting the Most Users Online Ever count. No one seems to be near a solution, and the people who have it working aren't talking.