By Philippe on Friday, 13 April 2018
Posted in Technical Issues
Likes 0
Views 721
Votes 0
Hello,

Since I modified the following file to sort Groups by popularity in Ajax.
.../administrator/components/com_easysocial/models/groups.php
Whatever setting EasySocial Groups module (on back-end), the Groups are always displayed in order of Popularity (in front-end).

What could I do to force the display of Groups in the modules by Random ?
And keep the display by Popularity in the Ajax listing of Groups.

Thank you in advance,
Philippe

Source : https://stackideas.com/forums/sort-by-popularity-by-default-1
Hm, since you hardcoded that ordering to `popular` on this getGroups() method from group model file, it will not get affected whatever you change the ordering from the group module is because group listing and the module is using the same method.

What my suggestion is removed those changes from this getGroups() method, then override that ordering state from the view file and the ajax part, so other place calling this getGroups() method do not get affected like group module
JoomlaFolder/components/com_easysocial/controllers/groups.php
JoomlaFolder/components/com_easysocial/views/groups/view.html.php


However, I am really sorry but unfortunately this is beyond the scope of our support and we would not be able to assist you on this
Thanks for understanding.
·
Saturday, 14 April 2018 15:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Arlex !
This method works too

Philippe
·
Sunday, 15 April 2018 01:43
·
0 Likes
·
0 Votes
·
0 Comments
·
You're most welcome.

Just for your information, I have locked and marked this thread as resolved to avoid confusions in the future. Please start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiries.

Thanks for understanding
·
Sunday, 15 April 2018 13:48
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post