• Resolved develhem

    (@develhem)


    Hi,

    I have many groups and group page, each group have a field “status”.
    I want to display in the group page, in first the user with the field “status” at “chef” and after “demi-chef”, and after the user with “ancien chef” and to finish the others group members.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ProfileGrid Support

    (@profilegrid0)

    Hello Develhem,

    Thank you for writing to us.

    ProfileGrid currently only displays users sorted by their registration dates.?However, we have made note of your requirement for?sorting by Group field value and?are analyzing this?for possible inclusion in a future release.

    Let us know if you have any other questions.

    I really need this too
    And please add “random sorting” as well when you include this in a future release

    Thread Starter develhem

    (@develhem)

    @bergholten

    I give you an example for the groups page, i sort with alphabet :

    In plugins/profilegrid-user-profiles-groups-and-communities/public/partials/themes/default/groups-tpl.php

    This code :

    <?php $dbhandler = new PM_DBhandler;
    $pmrequests = new PM_request;
    ?>
    <div class="pmagic">
      <div class="pm-group-container pm-dbfl">
          
       <div class="pm-all-group-container pm-dbfl">
        <?php
        function comparer($a, $b) {
          return strcmp($a->group_name, $b->group_name);
        }
        usort($groups, 'comparer');
        foreach($groups as $group){

    And if you like sort users in a group page, modify the $users array in plugins/profilegrid-user-profiles-groups-and-communities/public/partials/themes/default/group-tpl.php

    • This reply was modified 5 years, 5 months ago by develhem.
    • This reply was modified 5 years, 5 months ago by develhem.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Group page, display user using a specific order’ is closed to new replies.