Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: Overseer on July 28, 2003, 07:10:40 PM

Title: Bug: Users Online
Post by: Overseer on July 28, 2003, 07:10:40 PM
Sometimes doesn't show me, and I know i'm here.

Plus I can see two or three people have just posted within a couple seconds of me and its showing.
(like now its showing 1 online that isnt me, and i'm sure at least 3 people are active right now)
Title: Re:Bug: Users Online
Post by: [Unknown] on July 28, 2003, 07:30:27 PM
I'm not sure what the problem with it is... EXCEPT that it only updates every like 20 seconds.

-[Unknown]
Title: Re:Bug: Users Online
Post by: David on July 28, 2003, 07:42:11 PM
Yeah, this is funky for me too.  Have noticed it on devel too.  It doesn't always show people online that were online the click before.  Does it no longer keep you online for 15 minutes?
Title: Re:Bug: Users Online
Post by: andrea on July 28, 2003, 08:11:55 PM
Indeed, suddenly I am not online any longer.
Title: Re:Bug: Users Online
Post by: [Unknown] on July 30, 2003, 04:18:39 PM
I changed this:
   // Don't mark them as online more than every so often.
   if (!empty($_SESSION['log_time']) && $_SESSION['log_time'] + 20 >= time())
      return;
   $_SESSION['log_time'] = time();

To this:
   // Don't mark them as online more than every so often.
   if (empty($_SESSION['log_time']) || $_SESSION['log_time'] < time())
      $_SESSION['log_time'] = time();
   elseif ($_SESSION['log_time'] >= (time() - 20))
      return;

And suddenly 4 people pop online and stay that way.  I think it may be fixed ;D.  Just... not quite... sure... why..?

-[Unknown]
Title: Re:Bug: Users Online
Post by: Gobalopper on July 30, 2003, 05:27:07 PM
It had to be that first if statement acting weird, !empty could have been acting screwy in certain cases maybe...
Title: Re:Bug: Users Online
Post by: Ben_S on July 31, 2003, 06:02:22 AM
Not sure if its fixed, andrea has just posted 34 seconds before me and she doesnt show as online, and the number of guests is 0 so I dont think she has logged out.
Title: Re:Bug: Users Online
Post by: Ben_S on July 31, 2003, 06:11:44 AM
Yep, deffo doesnt seem to be fixed as she is still posting but not showing as online.
Title: Re:Bug: Users Online
Post by: [Unknown] on July 31, 2003, 01:41:36 PM
Darn... what's the blinking issue, then?

-[Unknown]
Title: Re:Bug: Users Online
Post by: Overseer on July 31, 2003, 02:20:51 PM
how do they get chosen to be removed from being online?
Title: Re:Bug: Users Online
Post by: Gobalopper on July 31, 2003, 02:25:09 PM
Maybe its the REPLACE INTO query then?
Title: Re:Bug: Users Online
Post by: [Unknown] on July 31, 2003, 08:47:09 PM
*glares at bug..*

AND STAY FIXED.

-[Unknown]
Title: Re:Bug: Users Online
Post by: Overseer on August 01, 2003, 07:51:13 AM
umm....


Quote37 Guests, 1 Users
Overseer

and before ya worry.. the guests number went up and up because noticed it was increasing by one every time i clicked the 'home' link (for the front page.. not the 'home' button on the forum.

Title: Re:Bug: Users Online
Post by: Overseer on August 01, 2003, 08:07:07 AM
another thing.. i'm on a network behind a firewall here at work..

i just got my test/2nd pc and came to the site (as guest) using my test pc knocks my 'work' pc off the online list, and vice versa.
Title: Re:Bug: Users Online
Post by: Daniel D. on August 01, 2003, 09:24:05 AM
That's great ! But you should be able to set a max. number.
Title: Re:Bug: Users Online
Post by: [Unknown] on August 01, 2003, 01:30:25 PM
LOL.

Okay, the problem was that you didn't have a session id for some reason... SCURVY BUM!

So each time, as you were a guest, it inserted a new entry for your session (which is now the primary key.)

I thought that would work :'(.

-[Unknown]