Hello everybody !

For the new year, I created an extension to display a list of online users on your forums.
It adds a widget which displays online users under the tags in the left sidebar.

Installation

composer require antoinefr/flarum-ext-online

Screenshot

Who is online
Settings

Repositories

GitHub
Packagist

    You may want to update your release version on packagist (at least to a version 1.0 or something).

    Anyone who ends up running your composer require will be greeted with a fancy error message.

    Other than that, good extension!

    jordanjay29 it is based off lastSeenTime(), not sure how long that goes up to personally.

    Edit: Also, I think your requires should be at least beta 7 or 7.1 to keep up with the times (Unless people are still on beta 6 or something).

      jordanjay29 It uses the value isOnline in the user fields, which checks if the user has loaded a page in the last five minutes.

      Ralkage I forgot to tag a version before putting it on Packagist ? Now v0.1.0 is available. I also updated the requirements. Thanks for you advice !

      Antoine hey, thanks for this extension ?
      Your extension is vailable for others langagues like French ?
      Else, if you need help for translate, tell me i can help you if you want ?

        Great extension! would it have a feature that can exclude certain groups from being included in that list? for example staff or other groups that want to be "invisible"? ?

        I can see myself using it!

          joaonl Thanks, I merged your pull requests ?

          Arkinn It's not planned for the moment, but in the future I may add an option in user's settings to hide online status (it would also hide the green circle before your username when you're online ?).

          Maybe I should remove the current user from the online list ?

            jordanjay29 Ghosts like Kulga, who you never know if they are online or not? ?

            Antoine If you do, you may want to hide users that don't make their online status public, i.e. Kulga.

            Antoine Hey, your extension work perfectly but i have some weird words like this : http://prntscr.com/hzljzy
            I don't know why, i have use flarum cache:clear of course and nothing happen, words keep weird. It happen with some extension and generally it fixed himself after some days, but you don't know why it happen ?

              SmoulBuchholz Try and open it in Incoginto mode or different browser to be sure it not a cache problem.

              Are you using OPcache in PHP?

                joaonl it's same with my mobile phone or in Firefox with my PC, i have clear cookies / history and it's same, what is OPcache ?

                  SmoulBuchholz Probably not enabled.

                  OPcache is >PHP5.5 caching solution:

                  OPCache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request.

                  You can clear the cache by creating clear_cache.php and with below code included and navigating to it, it should show a blank page.

                  <?php
                  opcache_reset();
                  ?>

                  Worth the try but not sure if it will resolve the issue.

                  Other option is to enable debug in config.php:

                  'debug' => false,

                  >>

                  'debug' => true,

                  I am not very familiar with the output but I am sure someone here can help you trace the cause ?

                    Great extension. Wanted to make it myself almost ?

                    @SmoulBuchholz try to disable and enable the extension, those words you see are used by the locale/translator - afaik that only gets loaded when u enable the extension. (I always could fix it be re-enabling an extension)