Osclass forums

Support forums => Suggestions => Topic started by: anaya2007 on March 31, 2012, 05:26:44 am

Title: Display ONLINE when user is online !!!
Post by: anaya2007 on March 31, 2012, 05:26:44 am
hi :)

i have a special suggestion:

how to display ONLINE when user is online in his statu ? and OFFLINE when hi's go offline ?
or green boutton when online and red when offline
Title: Re: Display ONLINE when user is online !!!
Post by: Jesse on March 31, 2012, 06:33:36 am
Firstly, you'd have to store a registered user's IP address. Then, you'd need to watch for both:

- When the user is logged in
- AND when the user is "active". By active, it means the user's IP address made a page hit within a specified amount of time.

If the user was "active" in the last, say, 15 minutes, you could show that they're online. If there is no activity by that user in the last 15 minutes, you could display his status as "offline".

You'd need to make a plugin to do this. Not hard.


The method described above is exactly how this SMF forum tracks user's online/offline status.
Title: Re: Display ONLINE when user is online !!!
Post by: palsecam on March 31, 2012, 07:31:24 am
smart idea, thanks jesse  its useful to member know some other members's online or not for contact him directely, but its difficult to creat a plugin