Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Page & Module Group Listing Order

10 years 6 months ago
  • Andre's Avatar
    Topic Author
  • Andre
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 1
Licenses:
JomSocial Expired

Hi team,

How can I, preferably via control panel or via overrides, set Jomsocial to display groups in alphabetical order? I need this done for the All Groups/My Groups pages as well as for the Community - Active Groups module.

Thanks,
Andre

10 years 6 months ago
Licenses:

Hi Andre,

the changes for this purpose can't do it by using override, must done by core customization. here the steps:
1. edit /components/com_community/views/groups/view.html.php
2. for my groups, line 1485 changing it from

->set('sortings', CFilterBar::getHTML(CRoute::getURI(), $sortItems, 'latest'))
to
->set('sortings', CFilterBar::getHTML(CRoute::getURI(), $sortItems, 'alphabetical'))

2. for all groups, line 538 changing it from
[code]
->set('sortings', CFilterBar::getHTML(CRoute::getURI(), $sortItems, 'latest'))
to
->set('sortings', CFilterBar::getHTML(CRoute::getURI(), $sortItems, 'alphabetical'))

3. for Active Groups module. edit /modules/mod_activegroups/helper.php line 29
from
. ' ORDER BY ' . $db->quoteName('count') . ' DESC '
to
. ' ORDER BY ' . $db->quoteName('name') . ' DESC '

Regards,
Albert

10 years 6 months ago
  • Andre's Avatar
    Topic Author
  • Andre
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 1
Licenses:
JomSocial Expired

Hi Albert,

It worked fine for the module, but there's something missing for the pages;

You will notice on the screenshot awesomescreenshot.com/0383msqf19 that Jomsocial is now loading the page with the Alphabetical tab active, but groups are not being sorted automatically.

10 years 6 months ago
Licenses:

Hi Andre,

sorry, I missed something. please edit:
edit /components/com_community/views/groups/view.html.php at line 500 & 1447
changing it from

$sorted = $jinput->get->get('sort', 'latest', 'STRING');
to
$sorted = $jinput->get->get('sort', 'alphabetical', 'STRING');

Regards,
Albert

The following user(s) said Thank You: Andre
10 years 6 months ago
  • Andre's Avatar
    Topic Author
  • Andre
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 1
Licenses:
JomSocial Expired

Yeah, now is 100%. Thanks!

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW