Author Topic: I've Always Wondered About This  (Read 3209 times)

0 Members and 1 Guest are viewing this topic.

Offline Raineypark

  • DSF God
  • *****
  • Posts: 2749
  • Karma: +13053/-14422
    • View Profile
Re:I've Always Wondered About This
« Reply #15 on: July 19, 2003, 05:26:17 AM »
Okay....so it's mouse-click driven.......so that means.......it changes when you move around the forum?......what board you're on, perhaps?
"Do not go gentle into that good night.  Rage, rage against the dying of the light."
Dylan Thomas

Offline Mysterious Benefactor

  • Systems Manager /
  • Administrator
  • NEW SUPERNAL SCEPTER
  • *****
  • Posts: 16082
  • Karma: +205/-12187
  • Gender: Male
    • View Profile
Re:I've Always Wondered About This
« Reply #16 on: July 20, 2003, 01:41:35 AM »
Okay....so it's mouse-click driven.......so that means.......it changes when you move around the forum?......what board you're on, perhaps?

See, you didn't really need me to explain it after all - though it doesn't really matter what someone is doing - only that they clicked on any sort of link on the forum. ;) But for what it's worth, I'll give the complete explanation:

As everyone has no doubt noticed, the forum's system keeps track of every mouse click. Information regarding these clicks is stored in a table in the database named log_online. Among other things, each entry specifies whether the click was made by a member or guest (if by a member, then that person is identified), what action the link took (brought the person to a category, board, post, profile, etc.), and what time the click took place. Each time this same person clicks on a link, the info about their previous click is deleted from the table and replaced by an entry with the new info.

Now, keeping all that in mind, whenever someone accesses the forum's opening page, the BoardIndex, a rountine in the BoardIndex.php script gathers the info stored in the log_online table, sorts it most recent click to oldest, and that's the order by which members' names are listed in the "Cousins online" section.

As to why our own names are usually listed first but not always, well, if you've ever scrolled all the way down to the bottom of any page on the forum, you might have noticed that each page says how long it took the system to create it - usually something like "Page created in 0.438 seconds." The system actually measures time in milliseconds (thousandths of a second). More often than not, the person who accessed the BoardIndex by clicking on the "home" link in the main menu, logging in to the forum, etc. will be the most recent click added to the log_online table between the time it takes the system to log clicks and the BoardIndex.php script to access that table in the database. However, because time is divided into thousandths of a second, occasionally another member's entry will have been added to the table before the BoardIndex.php script calls the info from the table. In that case, that member (or possibly even those members) will have their name(s) listed before the name of the person who accessed the BoardIndex page.

And while I'm at it, I might as well explain that the reason the name of a member who has actually left the forum (either by logging off, closing their browser, or surfing to another site) lingers for a time afterward is because the system allows for a period of inactivity before checking to see whether a particular person has left the forum or just hasn't clicked on any links. If after that time it discovers they are no longer on the forum, then their entry in log_online will be deleted and their name will no longer appear in the "Cousins online" list.


Now, aren't you all happy that you asked? [wink2] And now you shouldn't have any more sleepless nights, tossing and turning, wondering just how all of this works. ;D

Offline Raineypark

  • DSF God
  • *****
  • Posts: 2749
  • Karma: +13053/-14422
    • View Profile
Re:I've Always Wondered About This
« Reply #17 on: July 20, 2003, 02:18:57 AM »
Thanks Pepe......enlightenment is always a wonderful thing... [idea2]

Gee.....now I feel REALLY badly about being late with that last tuition payment.  [undb]
"Do not go gentle into that good night.  Rage, rage against the dying of the light."
Dylan Thomas

Offline Josette

  • Full A ed Newest Fervor Post
  • NEW ASCENDANT
  • ******
  • Posts: 4598
  • Karma: +75/-3057
  • Gender: Female
    • View Profile
Re:I've Always Wondered About This
« Reply #18 on: July 20, 2003, 04:39:00 AM »
Where do all the guests come from?  When it was first closed to guests, you had some sort of explanation about someone who hadn't logged in yet, or had logged off but was still being counted, or something like that.

But lately, there regularly can be 3 or so guests, which has had me quite puzzled.
Josette

Offline Mysterious Benefactor

  • Systems Manager /
  • Administrator
  • NEW SUPERNAL SCEPTER
  • *****
  • Posts: 16082
  • Karma: +205/-12187
  • Gender: Male
    • View Profile
Re:I've Always Wondered About This
« Reply #19 on: July 20, 2003, 05:06:38 AM »
But lately, there regularly can be 3 or so guests, which has had me quite puzzled.

Believe it or not, a lot of them are people who are trying to register. Barely an hour of the day passes that there isn't at least one entry in the forum's error log from someone who has tried to register only to find out that they can't.

The others are still members who are logging in or out of the forum.