It more or less works off of a last activity field in the database (I am guessing here, I don't have a VB installation to look at right now).
For example when you view a thread, make a post, etc.. it updates your "last activity" by your username. Then the online users shows all users who have been active in a given amount of time (i.e. less than 15 minutes). If you don't do anything for 15 minutes you will not be displayed on the active users area.
hmm that makes sense but it seems so expensive in terms of database use.
Every action you make (posting, viewing a page, etc) causes a field in the DB to be updated....
I guess it would make more sense just to do it when you view a thread since you can't really reply or do other things without seeing the page first.
What do you guys think?
Definitely not very database efficient.
Ideally the 'number of users active' could be something caculated every 5-10 minutes and stored in a memcache. It wouldn't have to be real time.
If you are performing an auto-logout on idle (which for security most people do) then you are updating their last_active in the database on page load anyways, so a cron script parsing these and calculating if they are active or not would be easier on the database.