Who's Online

Forum
Last Post
Threads / Messages
I had made a whose online add-on a long time ago, I wouldnt suggest using it.

I need to get it to work with cookies before using it. It would be safer that way.
 
I would absolutely love to be able to have a who's online feature!!

I've tried to mod this myself and failed!
 
Couldn't you just add a time stamp to the user table for when they login and then have it show who is there for a certain count of minutes? That is how i have it on my game.
 
That's not really accurate though. If they log out you could do that, but if they don't log out or they're still playing a couple hours later it doesn't show they are online.
 
ok so why not add something to the header that just adds say a one to the a cell in the user table everytime the header loads and then make a cron that takes away the one each minute.

It would be off by 59 seconds give or take but but if a person just wanted an idea of the useage that would work.

Or make it add the new time stamp to header so each time it loaded they put in a new time stamp.

My game shows the users online and it shows the number of seconds since they made their last click.

if something like this is still wanted I can make it work but I don't want to put a lot of time into something that people don't really want.

I'll be honest tho this script is written in a code that I don't really work with a lot, I was playing with it just to see and I got the cron 1 minute thing working, that is pretty simple but i was having a problem getting it to read the time stamp right.

I work in php but this thing is totally different from the way that I write. I am sure I can get the time stamp to go but like i said i don't want to spend a lot of time if really isn't wanted.
 
Last edited by a moderator:
Sorry old habit I am use to my forum and in that one people use it for more of a chat than a forum, i will refrain from doing so in the future.
 
ok so why not add something to the header that just adds say a one to the a cell in the user table everytime the header loads and then make a cron that takes away the one each minute.

It would be off by 59 seconds give or take but but if a person just wanted an idea of the useage that would work.

Or make it add the new time stamp to header so each time it loaded they put in a new time stamp.

My game shows the users online and it shows the number of seconds since they made their last click.

if something like this is still wanted I can make it work but I don't want to put a lot of time into something that people don't really want.

I'll be honest tho this script is written in a code that I don't really work with a lot, I was playing with it just to see and I got the cron 1 minute thing working, that is pretty simple but i was having a problem getting it to read the time stamp right.

I work in php but this thing is totally different from the way that I write. I am sure I can get the time stamp to go but like i said i don't want to spend a lot of time if really isn't wanted.

I fixed the posts. ^.^

Anyway, some of your suggestions might work, but they'd take up a lot of resources. Redoing a timestamp EVERY time someone loaded a page? I had a small site that got over 2000 page loads a day. I can't imagine how much it would be for a larger site.

Maybe make the session time out shorter, then everytime someone logs in record in it a new table and have a cron run by every hour to check to see if they're still logged in.
 
The easiest way to do it is to have the cookie from the login, store an 'isonline' variable, and have it delete itself after 15 minutes of no activity on the site, in case people forget to log out.
 
Below... Possible idea... may make a plugin if anyone says they want it, I will gladly code it

... Pseudo-code ACTIVATE

Code:
$var = Get Current Page

$res = Select all rows from table $prefix_activity

if Number of Rows in $res > 249 {
Delete oldest activity
}

Insert into $prefix_activity user, time, and current page

//Show page normally
ONly bad part is, you would have to insert on every page you want it to work on OR put it in functions.php or (if my idea is used...) templatedeff.php (or whatever i called it, i forgot)

This would work similar to the way you can view what the last activity on MyBB forums were, like whenever I go to HallOfFamer's profile, Majority of the time, hes lurking on the WHo's Online page... and i can see that

So on the Latest Activity page of this mod It will list UP TO 250 Latest page visits and who was it, and WHen they did it

You could optionally set it lower, just so it takes up less database space...


Comprende?

So HoF want me to write that out for 1.2 ? :D xD
 
Last edited:
A Who's Online list for our sites? Gah I'd love that, it's the best page in the world to sit on XD
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,132
Members
1,603
Latest member
Monako
BETA

Latest Threads

Top