![]() |
I got this wierd thing that happened and i cant explain why it happened. Soooo I am turning to you:).
I installed this hack with no problem. It worked for about 30 minutes and then I get nothing! No users online, not even me. No guests.........no nothing. Help Please!! I even attempted to check my work twice, everything turned out fine. I just dont understand i am using 2.3.0 the new one. |
anyway to get the whos online to show up on my vbportal home page in a center box?
i get this Parse error: parse error, unexpected $ in /home/weatherf/public_html/includes/center/php.php(21) : eval()'d code on line 1 |
Well, i changed the query a bit. I was wondering why the TZ made a diff, and I said screw it, the server is in EST, that is what I will use. Not gonna make it so it is a day from where the person is located, doesn't relly make sense to me. Anyway, here is my new query.
PHP Code:
|
I am trying to solve the timezone problem. How about this approach:
PHP Code:
1) Get the local time adjusted for the TZ == $localdate 2) Calculate the time that has passed between now locally ($localdate) and midnight locally (($localdate - ($localdate % 86400)) == $timepassed 3) Subtract the time that has passed locally since midnight from the servers time now == $startdate 4) Query user activity in the time between server time now ($enddate) and the time when it was midnight locally. I hope that I expressed myself somewhat clearly. I am an absolute PHP beginner, so I am not sure if what I did above is correct. However, the idea per se should be right. Would be glad for comments and possible corrections. Alexander |
Actually, I changed the way to calculate local midnight in the snippet below. I think now everything is correct.
PHP Code:
What is still not taken care of different TZs is the 'Most users ever online on a day' part. With the current implementation of the hack, I don't think this is possible. Why? -- Imagine that in the timezone of your user, until 23:59pm you had 100 visitors on your board. Further imagine that all these 100 visitors visited at 23:50pm (your time). Finally imagine that this is the greatest number of visitors your board has ever seen in one day. So for you, that is for your user and all other users in your timezone, 'Most users ever online on a day' is 100. So far so good. Now imagine that at 00:10am your time 10 more users logged in. For you, 'Most users ever online on a day' should be still 100, namely from the day before. However, for another user whose timezone is e.g. -1, 'Most users ever online on a day' is now 110, since he still hasn't reached midnight (it is 23:10pm) for him. As a result, the variable holding the Most users contains 110 now. And that means also for you, who is already in the next day, 'Most users ever online on a day' is suddenly 110. You see the problem?! Greets Alexander |
Very strange.. i applied this hack and it didnt display the new modifications at all :confused:
|
ok.. i just tried it on another forum and it worked fine. strange.
|
Quote:
The hack does not seem to be calculating correct "MOST users ever online..." (I've attached an image capture). In the top line that reads: "most users ever online was X..." this just keeps a total of how many online users at the moment. In the bottom line that reads: "Most users ever online on a day was X..." this is just giving me a total for users connected that day. Seems to me they're both doing similar jobs? first one is telling me how many online users there are, the second line is giving me a total connected users for the day, but none is giving "Most users every online" Please can someone asssit in correcting this? |
I have read all 338 posts and cannot find how to make "Currently active users" only visable to admins. There was reference to it by someone.
Could someone please post how to do that. (make Currently Active users" only visable to admins) Thanks Great hack by the way. |
Quote:
|
All times are GMT. The time now is 11:02 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|