Author |
Topic |
tribaliztic
Senior Member
Sweden
1532 Posts |
Posted - 24 July 2007 : 15:29:19
|
But this will only show online time for THIS session? Not all sessions since registering? Or am I wrong? < |
/Tribaliztic - www.gotlandrace.se -
|
|
|
PPSSWeb
Junior Member
312 Posts |
Posted - 24 July 2007 : 15:46:04
|
quote: Originally posted by tribaliztic
But this will only show online time for THIS session? Not all sessions since registering? Or am I wrong?
Very true., I guess that is what I get for answering without fully understanding the question. Sorry for the hasty reply.
In that case, it looks like Shaggy hit it right on the head in the post above.
I think you will also have to add the calculation to the deleteInactiveUsers() function to capture all cases where the user is removed from the active users.
If I am looking at this right though, I am not sure this will be accurate. I think both of these functions operate on timeouts, so this will not cover the function where they log out directly. In this case their time will keep increasing until the next timeout. Is this right? Even still, this will only execute when someone else loads these functions. So if I am thinking right, this could keep counting users time until someone else logs in, even if the other user left a and timed out a long time ago.< |
Edited by - PPSSWeb on 24 July 2007 16:15:14 |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 25 July 2007 : 04:07:06
|
I'd be careful of making this information publicly available in profiles; personally, I wouldn't hang around a forum for too long if anyone could register and see this information, best to keep it for admins only.
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
PPSSWeb
Junior Member
312 Posts |
Posted - 25 July 2007 : 07:49:37
|
quote: Originally posted by Shaggy
I'd be careful of making this information publicly available in profiles; personally, I wouldn't hang around a forum for too long if anyone could register and see this information, best to keep it for admins only.
Good point Shaggy. I agree completely.< |
|
|
tribaliztic
Senior Member
Sweden
1532 Posts |
Posted - 25 July 2007 : 17:13:02
|
quote: Originally posted by Shaggy
I'd be careful of making this information publicly available in profiles; personally, I wouldn't hang around a forum for too long if anyone could register and see this information, best to keep it for admins only.
I'm registered at two other forums that do show this in the profiles, only the user can se his/her own time. I don't really see the problem with showing this for everyone though? < |
/Tribaliztic - www.gotlandrace.se -
|
|
|
pitstraight
New Member
Australia
82 Posts |
Posted - 25 July 2007 : 23:54:32
|
I don't see the problem with everyone seeing it, but if someone can write the code Im sure I can make it show the way I want.
also VERY glad to see some life in this thread < |
|
|
PPSSWeb
Junior Member
312 Posts |
Posted - 26 July 2007 : 10:06:17
|
I am not sure how this will work as I havn't had time to really test it, but maybe this will give you a start.
As stated you will need to add a field to the Members table. With a numeric value started at 0. Make sure you chose a data type that will have enough room so you will not be likely to over run the value if you forum stays up for a number of years.
To get the total time value from the database and current active time then add the two and update the total time, you will need something like this.
It has been mentioned that this should go in inc_func_common. I am just not sure where it is best to put it at the moment. I added it to the ActiveUserTracker() function and it has not run when I expected it to. Or maybe I was just too impatient.
Where you want to display this information, you will need to put something like this:
I am pretty sure this code will need some tweaking and cleanup. But perhaps it will give you a start.
< |
|
|
Topic |
|