Advertisement:

Poll

you find this idea

Absolutely needed
11 (64.7%)
good
6 (35.3%)
not interessed
0 (0%)

Total Members Voted: 17

Author Topic: Display ONLINE when user is online !!!  (Read 1887 times)

anaya2007

  • Jr. Member
  • **
  • Posts: 91
Display ONLINE when user is online !!!
« 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
« Last Edit: March 31, 2012, 05:28:43 am by anaya2007 »

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Display ONLINE when user is online !!!
« Reply #1 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.

palsecam

  • Newbie
  • *
  • Posts: 15
Re: Display ONLINE when user is online !!!
« Reply #2 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