• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Add another "notable member" tab

#23
Hello there is a possibility to display all groups sorted?
Example: All Admins, then Members, and then the VIP's, etc. ...

Code:
if ($type == 'group')
        {
            $notableCriteria['secondary_group_ids'] = array(3,7,8,10,9,5,6);
        }

        $typeMap = array(
            'messages' => 'message_count',
            'likes' => 'like_count',
            'points' => 'trophy_points',
            'group' => 'message_count'
        );
Code:
<li class="{xen:if '{$type} == "group"', active}"><a href="{xen:link members, '', 'type=group'}">{xen:phrase user_groups}</a></li>
http://afbe-clan.at/index.php?members/&type=group
 

mcatze

Well-known member
#24
Is it possible to add more than one tab to notable members?
Code:
if ($type == 'dcm')
        {
            $notableCriteria['secondary_group_ids'] = array(9);
        }
       
        if ($type == 'freund')
        {
            $notableCriteria['secondary_group_ids'] = array(15);
        }
       
        if ($type == 'hod')
        {
            $notableCriteria['secondary_group_ids'] = array(11);
        }

        $typeMap = array(
            'messages' => 'message_count',
            'likes' => 'like_count',
            'points' => 'trophy_points',
            'dcm' => 'usernames',
            'freund' => 'usernames',
            'hod' => 'usernames'
        );
This is my Code, but only the last if statement will be work. The other give a blank page under there tabs ..
 

bobs409

Active member
#25
I would also like to add more than one tab but get internal server error when I try duplicating the code. I was able to do just the one tab successfully as per this add on but need more than one tab.

So is it possible to add a tab for a few user groups?
 
#29
This is a great little mod.
I've used this to add a list of people who have donated to the running costs of my forum.
I'm using 'vip' => 'username', which looks good, but its listing them from Z > A. How do I get it to list from A > Z?
 

Jake Bunce

XenForo moderator
Staff member
#30
This is a great little mod.
I've used this to add a list of people who have donated to the running costs of my forum.
I'm using 'vip' => 'username', which looks good, but its listing them from Z > A. How do I get it to list from A > Z?
Amendment in blue:

library/XenForo/ControllerPublic/Member.php

Code:
	protected function _getNotableMembers($type, $limit)
	{
		$userModel = $this->_getUserModel();

		$notableCriteria = array(
			'is_banned' => 0
		);

		if ($type == 'vip')
		{
			$notableCriteria['secondary_group_ids'] = array(3);
		}

		$typeMap = array(
			'messages' => 'message_count',
			'likes' => 'like_count',
			'points' => 'trophy_points',
			'vip' => 'message_count'
		);

		if (!isset($typeMap[$type]))
		{
			return false;
		}

		return array($userModel->getUsers($notableCriteria, array(
			'join' => XenForo_Model_User::FETCH_USER_FULL,
			'limit' => $limit,
			'order' => $typeMap[$type],
			'direction' => ($type == 'vip' ? 'asc' : 'desc')
		)), $typeMap[$type]);
	}
 

zoldos

Well-known member
#33
Is there a way to display a pagination for this mod if there are more users in the list/tab than can fit on one page (like in the regular members list)? I increased the max users per page to 50, but there are still more to show, but no pagination. Thanks!
 

Verringer

Active member
#37
Does this still work @Jake Bunce

I tried it and all I get is a white screen.

if ($type == 'premium')
{
$notableCriteria['user_group_id'] = array(5);
}

$typeMap = array(
'messages' => 'message_count',
'likes' => 'like_count',
'points' => 'trophy_points'
'premium' => 'message_count'
);
 
#39
And for add a tab to show users who have the permission or not to do something ?

Example : I want to show users who allowed to edit their profile.

Possible ?