Hello once again!
Today we are going to discuss how to add notable members to your site in the form of a tab.
This makes it easy for you add say a VIP member group and make it so that other users of your forums can easily find the members that hold this title.
So for this tutorial I have created a notable member group on my forums.
So how do we change this?
Well first go to your favorite FTP client or use Arvixe’s File manager. The file that we need to edit is called:
library/XenForo/ControllerPublic/Member.php
So it looks like this:
We are looking for:
protected function_getNotableMembers($type, $limit)
In this section we are going to add the code after the first );
The code that we are going to add is as follows:
if ($type == 'vip') { $notableCriteria['secondary_group_ids'] = array(3); }
It look’s like this after it’s put in:
Now where it says array(3) this is where you are going to put the group number of the group that you want to add. You can add different ones here as well.
Now we have to add another code. There is a section below the part that we added called:
$typeMap = array(
at the end of that part you will see this:
‘points’ => ‘trophy_points’
Please make sure that you put a comma at the end of the line directly above the following code:
'vip' => 'message_count'
So it will look like this:
Ok now that it’s done we are going to save and overwrite our prior file and we need to move on to the next file to edit.
The next file is located as follows:
Admin CP -> Apperance -> Templates -> member_notable
It looks like the following:
So you can either search for or just scroll until you find member_notable
Once you do so it looks like this:
We are only going to add the following line:
<li class="{xen:if '{$type} == "vip"', active}"><a href="{xen:link members, '', 'type=vip'}">VIP Members</a></li>
You can find this line in the
- section of the member_notable section.
- Once edited it looks like this:
So what does it look like in the end? Like the following page:
There you have it!
If you have any questions please feel free to ask away!
Looking for quality XenForo hosting? Check out Arvixe Web Solutions