I'm not using all of this hack, just the part that shows which members have "already visited the board today". So I dont know what affect it will have on "Number of Active Users Today:"
My forum (ver 2.2.8) is in the 'GMT' timezone but the server it is hosted on is US Eastern (-5) timezone.
After installing the hack everything worked as expected until 24hrs later when the "already visited the board today" showed 'nil' member 'names', even though members had been visiting my forum.
So I am experimenting with using 'gmmktime' instead of 'mktime' as used in the hack, which creates the Unix timestamp from the server.
I found this little snippet of information on a WWW search that provoked me to change the function.
"The timestamp returned is based upon the number of seconds from the epoch GMT, and then modified by the time zone settings on the server. Where you want time zone independence, you should use the function gmmktime"
So far so good, in that the member list now shows in "already visited the board today". This might be a solution for some others who run forums in a different timezone to the server that it is hosted on.
I've only been running with 'gmmktime' for a few hours so it is impossible to say if this will work permanently, if it still shows the 'members' 24 hours from now then it might be a solution.
The change is to the hack in index.php
Change
WHERE lastactivity > " . (mktime
To
WHERE lastactivity > " . (gmmktime
Like many others I am very new to coding in PHP so maybe an 'expert' or two might like to comment.
|