Resource icon

Add another "notable member" tab

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
 
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 ..
 
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?
 
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?
 
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

Rich (BB 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]);
	}
 
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!
 
Rich (BB code):
        if ($type == 'vip')
        {
            $notableCriteria['user_group_id'] = array(3,4,5);
        }
Perfect! TY!

Is it possible to add the last activity date instead of the messages/post count? And lastly, can it be sorted by the oldest activity date at the top?

Many thanks! :)
 
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'
);
 
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 ?
 
Top Bottom