Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Aiheen aloitti: rowedf - huhtikuu 11, 2007, 11:57:55 AP

Otsikko: [Mod Request] User Login History
Kirjoitti: rowedf - huhtikuu 11, 2007, 11:57:55 AP
It would be really neat to be able to see login stats by user week by week or month by month.  A lot of forums require their members to be on the forum certain amount of times per week or month to keep their membership. Any chance this could be added?
Otsikko: Re: [Mod Request] User Login History
Kirjoitti: rowedf - huhtikuu 20, 2007, 01:15:13 IP
Is this even possible?
Otsikko: Re: [Mod Request] User Login History
Kirjoitti: BYUFanatic - toukokuu 26, 2007, 01:37:13 AP
*bump*

I'd like to see this as well.

Rob
Otsikko: Re: [Mod Request] User Login History
Kirjoitti: MegaTinkerCoder - toukokuu 29, 2007, 06:37:31 IP
You can check inactive users in the admin control panel so some of this info exists.
Otsikko: Re: [Mod Request] User Login History
Kirjoitti: rowedf - toukokuu 30, 2007, 01:46:00 IP
Inactive in terms of posting yes, but I want to see how many times people log in, not just post.
Otsikko: Re: [Mod Request] User Login History
Kirjoitti: angelofwisdom - toukokuu 30, 2007, 04:31:15 IP
I would agree on a slightly different thing...
I'd like to see some kind of "personal statistics" about user login history.
Like

[angelofwisdom]
29-05-2007 23:46
30-05-2007 02:13
30-05-2007 14:32
30-05-2007 15:50
30-05-2007 17:10
30-05-2007 17:26
30-05-2007 19:30
30-05-2007 21:48

and these statistics would appear on each user's profile.
I sometimes feel I need something like this to know if a specific user was online between <xx:xx> and <yy:yy>, even though I know it was online later.

Would this be too much? (or shall I create a new thread?)
Otsikko: Re: [Mod Request] User Login History
Kirjoitti: Captain_Morrigan - toukokuu 30, 2007, 04:51:51 IP
One thing that I can say as far as this. I would see about maybe resetting the Total Time online to be able to use that because there are people, like myself, that prefer to always stay logged in and therefore I wouldn't log into my account every day but I could very well be online that week for plenty of time.

Perhaps you are looking for something of a modification of the Total Time online feature?
Otsikko: Re: [Mod Request] User Login History
Kirjoitti: Rudolf - kesäkuu 02, 2007, 07:17:06 IP
Even if you keep yourself logged in all the time, there is a way to tell when you actually start a new browsing "session". It's enough to set an arbitrary period for the desired length. Every time you open a page on the forum, the system registers you as active. If the last "active" time was more then let's say 1 hours ago, then it's safe to assume that you just came back from somewhere and wasn't active in the past 1 hour. It's an assumption, and it could be that you spent all the hour at the computer browsing other sites, but that's irrelevant, because as a forum admin I only want to know when you are active on my forum. It's pretty rare that one will read a topic for one hour.
So what should be done in this case is to create a new log table in the database and save the approximate activity periods.

The table should have fields like: ID_MEMBER, start_time, end_time

On page load check if there is a last active time was set.
    If there was no last activity set then this is the first time, so just add a row in the table with the ID of the member and start_time with the current time. Leave end_time empty. Set the last_active field to the current time too.
    If there is a last active time set then check the difference between it and the current time.
                If it's smaller then x minutes then we're still in the same session, so just set the last_active to the current time.
                If it's larger then we have a new session. In this case you should have a row in the database with (ID_MEMBER,some_start_date, empty_end_date). You set the end_date of that row to (current_time-x minutes) to close down the session, and add a new row with the current_time as start_date. You also set last_active to current_time.

In this case you have an approximation on the periods the user is actually online on your forum. The x minutes can be a setting, so as a forum admin I can choose how approximate I want. It's not perfect, but close to.

I'm writing this so maybe someone can translate it in php. Unfortunately I don't really have the time to do it these days (read weeks).
Otsikko: Re: [Mod Request] User Login History
Kirjoitti: Captain_Morrigan - kesäkuu 18, 2007, 02:45:17 AP
Not necessarily, I browse a lot of RP sites where it could take me 2 plus hours to read one page of a RP depending on the length, amount of posts per page and quality of the posts it could take me more or less time then someone next to me.

I guess if you require a Max amount then it could work but not everyone that is active is clicking in the set amount of time you require but I guess you can get an average of the average people that click under that limit you personally set.
Otsikko: Re: [Mod Request] User Login History
Kirjoitti: Rudolf - kesäkuu 18, 2007, 03:08:10 AP
Lainaus käyttäjältä: Captain_Morrigan - kesäkuu 18, 2007, 02:45:17 AP
but I guess you can get an average of the average people that click under that limit you personally set.

That's the idea. Having it in like a setting would allow forum admins to adjust the length to their needs, communities.
Otsikko: Re: [Mod Request] User Login History
Kirjoitti: rowedf - syyskuu 25, 2007, 04:39:09 IP
That would be an awesome mod! Anyone up for it ? :)