We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

can any one help how can i show online users in top in featured or latest users list | Forum

arjun
arjun May 10 '20
can any one help how can i show online users in top in featured or latest users list 

when we open user list we have 3 tabs , latest , online , featured 


1)how can i use a filter so that i can only show a group off users who are online hiding others 

 or 


2) can i show online users in top of lest in featured users list  



dave Leader
dave May 22 '20

I dont really understand what you are asking, if you only want to see online users then click the online tab. 


Do you want the online tab to be default?

Catkin
Catkin May 24 '20
You would need a plugin to order users in this way
Dev Forward
Dev Forward May 25 '20

To hide all users on the members-list page, except for online users - 


Go to:


/ow_system_plugins/base/controllers/user_list.php


On or around line 140.


You will find this code:


    public static function getMenu( $activeListType )
    {
        $language = OW::getLanguage();

        $menuArray = array(
            array(
                'label' => $language->text('base', 'user_list_menu_item_latest'),
                'url' => OW::getRouter()->urlForRoute('base_user_lists', array('list' => 'latest')),
                'iconClass' => 'ow_ic_clock',
                'key' => 'latest',
                'order' => 1
            ), 
            array(
                'label' => $language->text('base', 'user_list_menu_item_online'),
                'url' => OW::getRouter()->urlForRoute('base_user_lists', array('list' => 'online')),
                'iconClass' => 'ow_ic_push_pin',
                'key' => 'online',
                'order' => 3
            ),
             array(
                'label' => $language->text('base', 'user_search_menu_item_label'),
                'url' => OW::getRouter()->urlForRoute('users-search'),
                'iconClass' => 'ow_ic_lens',
                'key' => 'search',
                'order' => 4
            ) 
        );

         if ( BOL_UserService::getInstance()->countFeatured() > 0 )
        {
            $menuArray[] =  array(
                'label' => $language->text('base', 'user_list_menu_item_featured'),
                'url' => OW::getRouter()->urlForRoute('base_user_lists', array('list' => 'featured')),
                'iconClass' => 'ow_ic_push_pin',
                'key' => 'featured',
                'order' => 2
            );
        } 


You need to comment out the sections that create the lists for the newest users and the featured users.


The new code will look like this:



    public static function getMenu( $activeListType )
    {
        $language = OW::getLanguage();

        $menuArray = array(
            /* array(
                'label' => $language->text('base', 'user_list_menu_item_latest'),
                'url' => OW::getRouter()->urlForRoute('base_user_lists', array('list' => 'latest')),
                'iconClass' => 'ow_ic_clock',
                'key' => 'latest',
                'order' => 1
            ), */
            array(
                'label' => $language->text('base', 'user_list_menu_item_online'),
                'url' => OW::getRouter()->urlForRoute('base_user_lists', array('list' => 'online')),
                'iconClass' => 'ow_ic_push_pin',
                'key' => 'online',
                'order' => 3
            ),
             array(
                'label' => $language->text('base', 'user_search_menu_item_label'),
                'url' => OW::getRouter()->urlForRoute('users-search'),
                'iconClass' => 'ow_ic_lens',
                'key' => 'search',
                'order' => 4
            ) 
        );

         /* if ( BOL_UserService::getInstance()->countFeatured() > 0 )
        {
            $menuArray[] =  array(
                'label' => $language->text('base', 'user_list_menu_item_featured'),
                'url' => OW::getRouter()->urlForRoute('base_user_lists', array('list' => 'featured')),
                'iconClass' => 'ow_ic_push_pin',
                'key' => 'featured',
                'order' => 2
            );
        } */



This will hide the latest users and the featured users.


This seems to work, but I have not extensively tested. Use at your own risk.

The Forum post is edited by Dev Forward May 25 '20