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

User Widget: Show online users | Forum

Peter
Peter Nov 29 '12

Hi,

 

I would like to change the user widget on the user homepage, so that it shows online users as default instead of latest user. Where can I customize this widget? In database, source code (which file)...?

 

Thanks in advance.

Peter

Marius
Marius Nov 30 '12

online visitors >> http://radarurl.com/ 


 main > customize this page > customer text/ html > add code

The Forum post is edited by Marius Nov 30 '12
Peter
Peter Dec 1 '12
This is not what I'm looking for!
Alia Team
Alia Dec 3 '12
Peter, try editing ow_systemplugins/base/components/user_list_widget.php .
Peter
Peter Dec 3 '12

Aliia, thank you very much!!

The right row is "'menu_active' => true," :-)

 

Peter

Alia Team
Alia Dec 5 '12
Hello Peter, you will need to make "online" item "true" ( remove from "latest").
Also you will need to switch the codes for  "online" menu item and "latest" item.
Something like this:


        $resultList = array(
        'online' => array(
        'menu_active' => true,
                'menu-label' => $language->text('base', 'user_list_menu_item_online'),
                'userIds' => $this->getIdList($userService->findOnlineList(0, $count)),
                'toolbar' => ( $userService->countOnline() > $count ? array($toolbar['online']) : false ),
            ),

            'latest' => array(
                'menu-label' => $language->text('base', 'user_list_menu_item_latest'),
                'userIds' => $this->getIdList($userService->findList(0, $count)),
                'toolbar' => ( $latestUsersCount > $count ? array($toolbar['latest']) : false ),
            ));


Please save original file somewhere on your desktop so that in case of any errors you have a back up file.
Please note that any changed you do in the .php file will not be saved if you update the software. Let me know if this works for you.
Tim
Tim Dec 19 '12

I am creating a blank html page and I want to display latest users. how can I display this?


I have tried <div class code and aslo {$    }  code. I cant get anything to show.


Thanks

UrbAn
UrbAn Apr 26 '14
Hi Tim,


You did it? how?


Thanks!


UrbAn

ross Team
ross Apr 27 '14
Topic was moved from General Questions.
Kяuncн Leader
Kяuncн Nov 30 '14
Would like to set "Show only online users" as default, anyone?
Daisy Team
Daisy Dec 10 '14
Kяuncн, have the solution provide by Aliia helped you? If not - please provide us with more information about the technical effect you are trying to achieve.
Kяuncн Leader
Kяuncн Dec 10 '14

Quote from Daisy Kяuncн, have the solution provide by Aliia helped you? If not - please provide us with more information about the technical effect you are trying to achieve.

Yes all is well thank you..
Asoka Janaka
Asoka Janaka Apr 20 '20

Quote from Peter

Aliia, 


Tried it's working fine for the mobile version. The destop no change. Can you help


Asoka Janaka
Asoka Janaka Apr 20 '20
Hi Alia,


I followed your instructions it fixed the mobile version but no change in the desktop. Can you help

dave Leader
dave Apr 20 '20

On mobile you do the above because the mobile version uses a widget (no members page) to display users and is done with the help of JS


But on desktop:


In order to change the default tab on desktop, for example when the page loads if you want to show online rather than latest all you have to do is this... easy 


all you have to do is go to  ow_system_plugins/base/init.php 
and change the value for the params in the route code on line 51

from latest to online

original

$router->addRoute(new OW_Route('users', 'users', 'BASE_CTRL_UserList', 'index', array('list' => array(OW_Route::PARAM_OPTION_HIDDEN_VAR => 'latest'))));

new

$router->addRoute(new OW_Route('users', 'users', 'BASE_CTRL_UserList', 'index', array('list' => array(OW_Route::PARAM_OPTION_HIDDEN_VAR => 'online'))));

all i did was just  change the word latest to online and it works. :)



The Forum post is edited by dave Apr 20 '20