Last Activity and Last Visit

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Daroz
    Member
    • May 2001
    • 42

    Last Activity and Last Visit

    Easy question, but I can't seem to find the answer in the manual, and a search on the forums makes it even more confusing.

    What exactly is Last Activity and Last Visit, and how are they related?

    -- Brian
  • tubedogg
    Senior Member
    • Feb 2001
    • 13602

    #2
    Last Activity is the last time that the user clicked on a link in your forum.

    I'm not quite clear on Last Visit myself so we'll let a dev answer that one.

    Comment

    • Daroz
      Member
      • May 2001
      • 42

      #3
      Thanks for the quick reply - greatly appreciated...

      So to clarify, Last Visit notwithstanding (glad to know I'm not the only confused one ), if I went to my forum page (logged in with cookies) and closed my browser without clicking on anything from there, Last Activity would NOT be updated. I would need to click on another in-forum link to get that field to update.

      That sound about right?

      -- Brian

      Comment

      • Mike Sullivan
        Former vBulletin Developer
        • Apr 2000
        • 13327
        • 3.6.x

        #4
        last visit = last time any lightbulbs were updated (after [cookie timeout] seconds of inactivity)
        last activity = time of last page view ( >= last visit)

        Comment

        • Daroz
          Member
          • May 2001
          • 42

          #5
          Originally posted by Ed Sullivan
          last visit = last time any lightbulbs were updated (after [cookie timeout] seconds of inactivity)
          last activity = time of last page view ( >= last visit)
          Ok, so that I grock this... Let me give an example and let me know if I'm sane..

          Lets just presume all values are 1-1-1970 to start with...

          I look at the forum main page. -> No changes
          I click on a forum -> Last Activity updated to now(), no change to Visit
          I view a few more pages, but do not mark forums read -> Last Activity updates accordingly but Visit is unchanges.
          I close my browser. -> No changes

          .. This is where I'm unclear ... Please correct me if (when?) I'm wrong.

          I come back, some time in the future. My lightbulbs are cleared on login and my last visit is now set to? now() or when the old session expired?



          I guess the end result is how accurate is that last visit? Does it take a long time to update?

          Thanks for the info! (Mabye add this one to the manual?)

          -- Brian

          Comment

          • Mike Sullivan
            Former vBulletin Developer
            • Apr 2000
            • 13327
            • 3.6.x

            #6
            Note, everything's actually in unix timestamps, so now()'s not 100% accurate. But it's easier.

            I look at the forum main page. -> No changes
            I'm just going to chop this one out as it's actually a bit of an anomaly in the formula.

            I click on a forum -> Last Activity updated to now(), no change to Visit
            I view a few more pages, but do not mark forums read -> Last Activity updates accordingly but Visit is unchanges.
            I close my browser. -> No changes
            Correct.

            I come back, some time in the future. My lightbulbs are cleared on login and my last visit is now set to? now() or when the old session expired?
            Last visit = last activity, THEN last activity = now();

            So last visit is time of last page view from the previous session (assuming there's enough time [the cookie timeout] between sessions for it to change lastvisit).

            Comment

            • Daroz
              Member
              • May 2001
              • 42

              #7
              Ok, that makes alot of sence. (Yeah, now() wasn't the best example, it's late.. )

              So in between the time the user has closed his browser, and come back for another session, the last visit really reflects the visit before the last.

              So from a progmatic standpoint... If I'm working through those values in the user table (oversimplified code here

              Code:
              If (time()-$lastvisit > $cookietimeout) {
                $lastvisit = $lastactivity;
              } else {
                // Everything's ok.
              }
              This clears it up greatly.

              Thanks!

              -- Brian

              Comment

              • Mike Sullivan
                Former vBulletin Developer
                • Apr 2000
                • 13327
                • 3.6.x

                #8
                Check out sessions.php and see where/when we update lastvisit + lastactivity vs just lastactivity.

                Comment

                • Kaya
                  Member
                  • Sep 2000
                  • 56

                  #9
                  Why lastvisit?

                  In the admin area under "Find users" – "Display Options", you can display last visit but not last activity.

                  But for me as administrator it is much more interesting to observe the last activity – the last visit does not carry much point!

                  Comment

                  • tubedogg
                    Senior Member
                    • Feb 2001
                    • 13602

                    #10
                    You can view both after clicking [edit] next to a user's name.

                    Comment

                    • Kaya
                      Member
                      • Sep 2000
                      • 56

                      #11
                      Yes, I know, but I would like to view the last activity for all users at once – to see on one sight who has not been checking in recently.

                      This is possible for last visit but not for last activity – which surprises me. Because I would have thought that it is more interesting to know when somebody has checked in the last time, rather than when somebody had checked in the time before last time.

                      Comment

                      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                      Working...