Please upgrade here. These earlier versions are no longer being updated and have security issues.

A Member's Last Activity(?)

Hello there,

I was just wondering about how the "last activity" of someone's profile page is updated. Is it automatically updated as "last active" to the current time said person refreshes the internet page the vanilla forum is open in or does he or she actually have to post, send a message or "like/wtf/flag/lol" at a post?

Thanks for the help!

Comments

  • Or in other words, does actively browsing a forum update someone's "last active" information on their profile page?

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    does actively browsing a forum update someone's "last active" information on their profile page?

    yes, and you need to refresh the page to see any changes .

    When a person visits a site their ip address is logged and date and time stamped even if it is a guest. As a user the same thing happens but the User Id is logged along with the pertaining info of the USER . The moment a user is logged in that is when the activity starts. You don't have to post anything to be active. All you need to do is log in.

    dom90
  • Ah, I see. Thank you very much! Just to clarify.. each time a person opens and browses a new thread, his activity gets updated along with it?

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Yes that is how it is setup to work. There are plugins which go even further and tell people what you are looking at. Like so and so is reading post number 2 or viewing so and so profile. Or who is online. But the basic is just simple logging of online or not and when.

    dom90UnderDog
  • Thanks! Enjoy your two Awesomeness points, sir or lady.

    vrijvlinderUnderDog
  • wjcroftwjcroft William J. Croft / Mount Shasta, CA / OpenBCI forum admin New

    Question on the updating of the "Last Visit" date/time on the Dashboard User page, sorted by Last Visit.

    Previous posts on this thread have stated that the Last Visit time reflects ANY activity by that logged in user. This is indeed how it has worked for me when we were using an earlier version of Vanilla (2.1).

    Now that we are on 2.8, I notice that the Last Visit time is now being updated ONLY when the user has done a transition from logged off, to logged-in status. In other words, "Last Visit" is less an accurate tern than "Last Login".

    Would like to hear some comments on this feature. I much prefer to see the Last Visit time, as I sometimes refresh the User display sorted by Last Visit to see how many are actively browsing the forum.

    Is it possible that by tweaking some setting or code, I could restore the previous way Last Visit worked: updating when the user does any operation online?

    Thanks for your insights. Mentioning @vrijvlinder and @R_J .

    Yes, we will upgrade to 3.1 soon.

    Regards, William Croft, OpenBCI

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @wjcroft

    Yes, we will upgrade to 3.1 soon.

    Why not directly use 3.2? 😀😉


    This is the code which triggers the update:

       /**
        * This is the asynchronous callback.
        *
        * This method is triggerd on every page request via a callback AJAX request
        * so that it may execute asychronously and reduce lag for users. It tracks
        * views, handles registration for new installations, and sends stats every day as needed.
        *
        * @return void
        */
       public function tick() {
    ...
           if (Gdn::session()->isValid()) {
               Gdn::userModel()->updateVisit(Gdn::session()->UserID);
           }
    

    The update of the last visited information is done "with javascript". Therefore, if there are any JavaScript errors occur, the update might fail.

    Look at the js console of your browser. It shoul look similar to this:

    The /settings/analyticstick line is what triggers the update


    wjcroft
  • wjcroftwjcroft William J. Croft / Mount Shasta, CA / OpenBCI forum admin New

    Hey @R_J , thanks, you were right. When loading the home page of my forum, I see an error net::ERR_BLOCKED_BY_CLIENT when running the analyticstick.json. Can you suggest how to debug this further? My Chrome browser is up to date, Version 76.0.3809.132. The image,

    Best regards, William Croft, OpenBCI

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Search the net for "ERR_BLOCKED_BY_CLIENT". Your browser is preventing that this script runs. Maybe you have some ad-blocker which needs to be configured better?


Sign In or Register to comment.