Groups Files Filter & Group Name

Hello, the wonderful GROUPS author:

We are getting ready to launch our Home HOA site using the excellent Groups plugins.

There are a couple of things we are trying to accomplish and need some pointers from your team.

1. Group Directory – Group Name
We created a page using Profile Builder plugin (userlisting function) called Member Directory, and in there we want to display Members by Group, and currently the heading shows “USERS (X)”, I’d like to make it show the “Group Name” (X), what’s the easy way to display the proper group name here?

2. Groups Files.
We created a page called Files, wanted to give our members an easy to use and nice presentation of the files. We managed to list all the files, but not know how to also add the filter boxes for Name, Description, Group, and add column Updated Date, Results per page [ x ] with pagination on bottom like what we see in admin dashboard.

Here are the screenshots for your reference:

https://drive.google.com/drive/folders/1ma-UWKQqIT4lHa3Tq9oo86L9t9yvVXRA?usp=share_link

Thank you advance for your kind help!
Sean


Comments

3 responses to “Groups Files Filter & Group Name”

  1. Perfect!

  2. Thanks for your pointer. Point 1 done. Trying point 2.

  3. Hi Sean,

    Thank you very much for your kind feedback and I’m so glad that your project is evolving according to your requirements.

    IMHO the heading shows correctly Users because this is basically what you are seeing in this view. If further below you need to render all your users grouped by Group then you need to adjust the output, perhaps even create your own custom function and get all users in each Group as shown in the example provided here:
    Get all users in a group
    Get Groups

    If on the other hand it would render Group Name in the heading, then which one should that be? Perhaps I’m missing something obvious here, but based on your description I think it’s better to go this way. Another option would be to keep rendering the users list and simply add another column to show the groups each user belongs to.
    Get all groups the current user belongs to

    As for the second point, you need to implement something similar – if not an exact copy – of what the groups-file-access/lib/admin/files.php does. In this case you should also consider which files the current user should be able to see, or all of them if you want to demonstrate all the available files to every single user.

    Kind regards,
    George

Share