Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Who's Online

124678

Comments

  • I've also noticed that there's some odd bug in this extension where unless you stay online for more than 5 minutes or so, you won't actually show up as online. If someone just posts and then leaves, they don't show up. Then again, I'm not positive that's a bug.
  • I don't think this is a bug, it is just the MAX time is takes for the extension to check for the online users. It does a check every 5 mins, so you need to online during one of these checks (chances are, you will not need to be on for the FULL 5 mins).
  • The extension does a query for people that have hit the page in the past 5 minutes. I assume that if you haven't refreshed or posted in 5 minutes, you're probably not active anymore.
  • I see...that makes sense. How would I change this setting to 15?
  • edited August 2005
    Change line 24 to say this instead:

    $s->AddWhere("DateLastActive", "DATE_SUB(NOW(), INTERVAL 15 MINUTE)", ">=", NULL, NULL, 0);
  • Okay, thanks. So does this, as nathan said, check every 5 minutes to see who is online, and then displays that, or does it check to see who has been online during the past 5 minutes? Basically, is it a momentary check, or is it spread out? Because I'm still noticing on my site that people will come post, but even when they do post, they never show up as online.
  • jesusphreak, on the basis that its a script that runs on every pageload i'd assume its a check for everyone thats been and gone in the last X minutes. To make it run strictly every 5 and update some sort of list i think it'd need to be a cron/scheduled job of some sort. Dont quote me cause i havent read the code, but yeah... Why some users dont appear i'm not sure. Have you checked the thing that people have been talking about adding to the database?
  • remember that users have the choice as to whether they appear in the who's online panel. Maybe those users have chosen not to be displayed. I am not sure. You really do need dknowles to answer some of these questions.
  • mini got the checking right. every time you visit the page, it updates the DateLastActive column in the database (I think that's the field, I'm going off memory here). Then when it displays the who's online list it will do a query to grab the users whose DateLastActive field has been updated in the past 5 minutes. It will also do a check to see if the user has chosen to hide himself from the list. *but* if you are an admin on the board, it will ignore this request.

    Some people have noted that it's doing an incorrect check for this option and plain not showing users for anyone, or spitting out errors. I thought I had fixed all of it, but it may not be the case. It's hard to say why people aren't showing up without being able to see the database tables myself.
  • david, I just ran a week long check, I even jacked the time since last visit interval to a week before the last user that joined my forum, and that last user while having visited a number of times is not appearing. I did a live query on the table and column for that user while they were online and appeared to notice the following: While the user is logged in, it fills out the phantom:0 string for them just fine. Yet after I refresh so many time while they're gone, that entry gets taken out. That or my sql was lying to me and I was looking under the wrong account... Either way because of that, the user is still not appearing in the list unless I place that manual entry in there for them :/
  • yes, that's 20160 minutes!
  • okay, i finally replicated the bug. i'll have this fixed *for real* in no time.
  • huzzah! feast upon version 1.0.4 which actually fixes the bug!

    god that made me feel stupid.
  • Thanks dknowles. People that were never showing up before are definitely appearing online now. Now...any chance on displaying online guests? :)
  • guests...ugh....


    actually, i was typing up a reply about what a pain they're going to be, then i thought of a way to keep track of them. i'll see if i can't hack out something tonight. if not tonight, i'll try and get you something by the end of the week.
  • You are the man.
  • thanks for that dknowles. Much appreciated! What was the problem?
  • Basically, I was updating an array in the wrong place. If you had something other than phantom set in the settings field, it would take into account the fact that phantom was missing, but if the field was completely empty it would just skip you altogether. Really dumb mistake on my part.

    I half have the guest counting figured out. My question is this--does it need to take into consideration multiple guests from the same IP? If I can count everyone from one IP as one user, it will be a snap. Otherwise, it will take a bit of black magic.
  • I personally don't think its that big of a deal if it doesn't count multiple guests from the same IP, but I do live in America, where we have for the most part different IPs. I know in some parts of the world, entire nations have single IPs, so it could be an issue. I dunno.
  • A lot of people connect through NATs, too.
This discussion has been closed.