Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Members groups
Avatar
Richard Heinz
Member
Free Members
Offline
Jul 15, 2013 - 1:21 pm

Is there a way to show the members of one group. When you click on members it shows all the groups from Admin to a group you may have added. I want to show only one group when a subscriber is logged in.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Jul 15, 2013 - 1:28 pm

you can use the members list to show whatever you want...

in your spMembersView.php template file of the sp theme you are using, you will see the members list instantiated with something like:

sp_has_member_groups('usergroup', 'id', 'asc', 15, true)

you can change those options to control the display... the prototype for the function is:

sp_has_member_groups($groupBy='usergroup', $orderBy='id', $sortBy='asc', $number=15, $limitUG=false, $ugids='')

the $limitUG option determines whether users can see all usergroups or only ones that they are members of...

if you want to only list specific usergroups, then pass the IDs (comma separated) in the $ugids argument...

Avatar
Richard Heinz
Member
Free Members
Offline
Jul 19, 2013 - 12:48 pm

Iam using the iForum template and edited the spMembersView.php file. I changed the statement to

sp_hasMember_groups('usergroup', 'id', 'asc', 15, false) and it still gave me all the groups. So I change it to sp_hasMember_groups('usergroup', 'id', 'asc', 15, false, 4) which is the group every subscriber is add to. I still get the Admins and the group Destiny Makers (4). Why does the Admin group still show? I expected it to be only the DestinyMakers group.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Jul 19, 2013 - 2:54 pm

not via the query there... but in you sp theme, yes...  so in the template file spMembersView.php, find this code:

                while (sp_loop_member_groups()) {
                    sp_the_member_group();

after it, add:

                    if ($spThisMemberGroup->usergroup_id == 0) continue;

and it wont show the admins...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625