Online Users plugin?

Is there any way to make a plugin where peoples can see all online users in page?

Like the plugin named "everybody" but just online users? I saw this in admin statistic page, but I couldn't figure out how to make a online users page.

I would be happy if someone knows how, or will help me. :-)

  • Where you able to find the code that elgg core uses on the admin page?

  •     <?php
            $users = find_active_users(600,20);
            $totonline = count($users);

            if($users){

                foreach($users as $user){
                    echo "<div class=\"member_icon\">";
                    echo elgg_view("profile/icon",array('entity' => $user, 'size' => 'tiny')) . "</div>";
                }
        ?>

    Then, if you wanna count the number of on-line users:

    <?php echo $totonline ?>
  • P.S. The "20" is the max number of viewable users, you can change it.

  • SGr33n do you of a way that this code can show only friends online!