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

most popular groups shown first on widget | Forum

Joseph
Joseph Mar 7 '14
how do I get my index group widget to show the most popular groups first?
Daisy Team
Daisy Mar 19 '14
You should go to /groups/components/groups_widget.php file and replace this code:

if ( $this->assignList('latest', $latest) )
        {
            $this->setSettingValue(self::SETTING_TOOLBAR, $toolbars['latest']);
            $menuItems[] = array(
                'label' => $lang->text('groups', 'group_list_menu_item_latest'),
                'id' => 'groups-widget-menu-latest',
                'contId' => 'groups-widget-latest',
                'active' => true
            );
        }

        if ( $this->assignList('popular', $popular) )
        {
            $menuItems[] = array(
                'label' => $lang->text('groups', 'group_list_menu_item_popular'),
                'id' => 'groups-widget-menu-popular',
                'contId' => 'groups-widget-popular',
                'active' => empty($menuItems)
            );
        }

with this one:

if ( $this->assignList('popular', $popular) )
        {
            $menuItems[] = array(
                'label' => $lang->text('groups', 'group_list_menu_item_popular'),
                'id' => 'groups-widget-menu-popular',
                'contId' => 'groups-widget-popular',
                'active' => true
            );
        }

        if ( $this->assignList('latest', $latest) )
        {
            $this->setSettingValue(self::SETTING_TOOLBAR, $toolbars['latest']);
            $menuItems[] = array(
                'label' => $lang->text('groups', 'group_list_menu_item_latest'),
                'id' => 'groups-widget-menu-latest',
                'contId' => 'groups-widget-latest',
                'active' => empty($menuItems)
            );
        }

Then go to /groups/views/components/groups_widget.html file and find the following strings:

First string:  <div class="ow_lp_groups ow_hidden" id="{$menuItems.1.contId}">
Second string: <div class="ow_lp_groups" id="{$menuItems.0.contId}">

Change the $menuItems.1.contId to $menuItems.0.contId in the fist string and $menuItems.0.contId to $menuItems.1.contId in the second string.

That's it.
Sarachem
Sarachem Jun 14 '17
Its not working well, because not counting group members.
Abu Road Escort
> | Partapur Escorts | < | > | Patan Escorts | < | > | Peepli Escorts | < | > | Phagi Escorts | < | > | Phalodi Escorts | < | > | Phulera Escorts | < | > | Pilani Escorts | < | > | Pilibanga Escorts | < | > | Pindwara Escorts | < | > | Piparcity Escorts | < | > | Pirawa Escorts | < | > | Pokaran escorts | < | > | Pokhran Escorts | < | > | Pugal Escorts | < | > | Pushkar Escorts | < | > | Raipur Escorts | < | > | Raisinghnagar Escorts | < | > | Rajakhera Escorts | < | > | Rajaldesar Escorts | < | > | Rajgarh Escorts | < | > | Rajsamand Escorts | < | > | Ramganj Mandi Escorts | < | > | Ramgarh Escorts | < | > | Rani Escorts | < | > | Raniwara Escorts | < | > | Ratangarh Escorts | < | > | Ratannagar Escorts | < | > | Rawatbhata Escorts | < | > | Rawatsar Escorts | < | > | Rawla Mandi Escorts | < | > | Reengus Escorts | < | > | Reni Escorts | < | > | Renwal Escorts | < | > | Reodar Escorts | < | > | Rishabhdeo Escorts | < | > | Rudawal Escorts | < | > | Rupbas Escorts | < | > | Sadri Escorts | < | > | Sadulshahar Escorts | < | > | Sagwara Escorts | < | > | Sainthal Escorts | < | > | Salumbar Escorts | < | > | Sambhar Lake Escorts | < | > | Samraniya Escorts | < | > | Sanchore Escorts | < | > | Sanganer Escorts | < | > | Sangaria Escorts | < | > | Sangod Escorts | < | > | Sardarshahar Escorts | < | > | Sarmathura Escorts | < | > | Sarthala Escorts | < | > | Sarwar Escorts | < | > | Satalkheri Escorts | < | > | Sawai Madhopur Escorts | < | > | Shahpura Escorts | < | > | Shekhawati Escorts | < | > | Sheoganj Escorts | < | > | Shri Mahaveer Ji Escorts | < | > | Sidhmukh Escorts | < | > | Sikar Escorts | < | > | Simalwara Escorts | < | > | Singhana Escorts | < | > | Sirohi Escorts | < | > | Siwana Escorts | < | > | Sogariya Escorts | < | > | Sojat Road Escorts | < | > | Sri Ganganagar Escorts | < | > | Sri Madhopur Escorts | < | > | Sujangarh Escorts | < | > | Suket Escorts | < | > | Sumerpur Escorts | < | > | Sundelao Escorts | < | > | Sunel Escorts | < | > | Surajgarh Escorts | < | > | Suratgarh Escorts | < | > | Surena Escorts | < | > | Takhatgarh Escorts | < | > | Tankarda Escorts | < | > | Taranagar Escorts | < | > | Tibbi Escorts | < | > | Tijara Escorts | < | > | Todabhim Escorts | < | > | Todaraisingh Escorts | < | > | Todra Escorts | < | > | Tonk Escorts | < | > | Uchain Escorts | < | > | Udaipur Escorts | < | > | Udaipurwati Escorts | < | > | Udpura Escorts | < | > | Uniara Escorts | < | > | Vanasthali Escorts | < | > | Vidyavihar Escorts | < | > | Vijainagar Escorts | < | > | Virana Escorts | < | > | Viratnagar Escorts | < | > | Weir Escorts | < | > | Zawar Escorts | < | > |