Log in

View Full Version : View members of certain usergroups only


PtP
12-06-2005, 09:03 PM
I have a clan forum with a private forum so they are a member of a usergroup for permissions to access that forum.

They now need to have a memberlist showing and silly me said no problems and put a link up http://www.myserver.com/forum/memberlist.php?usergroupid=19 which works fine for me not realising that me being administrator I seem to be the only one having permission to see this :( Any suggestion on the easiest way to do a memberlist of this particular usergroup.

PtP
12-08-2005, 06:28 AM
So this is not possible? or do I have smelly underarms?

downlo
12-08-2005, 09:24 PM
I would also like this feature. Where the member list has permissions to allow only a specific group(s) to view the member list. Is there a way to do this? I will pay if any one can.

merk
12-08-2005, 10:40 PM
You could be able to set the usergroup to display on showgroups and link to showgroups.php.

PtP
12-09-2005, 09:53 AM
You could do that but then I would have to set moderators to not show and I would lose the facility of showgroups showing that list for users to know who moderates what.

Andreas
12-09-2005, 10:01 AM
memberlist_query_userscount

if ($_REQUEST['ugroupid'] == X AND is_member_of($vbulletin->userinfo, X))
{
$hook_query_where .= " AND FIND_IN_SET('X', membergroupids)";
$urladd .= (($urladd) ? '&' : '') . 'ugroupid=X&';
}

merk
12-10-2005, 01:14 AM
You could do that but then I would have to set moderators to not show and I would lose the facility of showgroups showing that list for users to know who moderates what.

I find it a bit strange that a clan forum needs 2 seperate pages for that kind of thing ;)

You could easily hook into showgroups to change the behaviour depending on the url.

This should work, but there may be an issue with the usergroup still displaying in normal mode (the clan usergroup must be set to be shown) - Replace X in the second hook with the usergroupid of the clan.

showgroups_start


if($vbulletin->input->clean_gpc('r', 'clanmembers', TYPE_BOOL) AND $vbulletin->options['forumleaders'])
{
$vbulletin->options['forumleaders'] = 2
}

showgroups_usergroup


if(is_member_of($user, X) AND !$vbulletin->GPC['clanmembers'])
{
continue 2;
}


Urls:

http://forum/showgroups.php <-- normal (as set in admincp)
http://forum/showgroups.php?clanmembers=1 <-- clan members