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

For example, to list special usergroups

  1. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Jake Bunce submitted a new resource:

    Add another "notable member" tab - For example, to list special usergroups

    Read more about this resource...
     
    erich37 likes this.
  2. DRE

    DRE Well-Known Member

    Oh I NEED THIS!!! How do I do this for multiple usergroups?
     
  3. DRE

    DRE Well-Known Member

    Ah man we gotta edit the files on the server? Can you make an addon version of this?
     
  4. Daniel Hood

    Daniel Hood Well-Known Member

    Just do the same thing multiple times? Copy the html code twice, copy the php code twice. Unless you meant showing multiple user groups under one tab? Then I think you'd just change
    PHP:
    $notableCriteria['secondary_group_ids'] = array(3);
    to
    PHP:
    $notableCriteria['secondary_group_ids'] = array(3,4,5);
     
    Jake Bunce and dwdmadmac like this.
  5. DRE

    DRE Well-Known Member

    I mean each usergroup that you want to add should have their tab.
     
  6. DRE

    DRE Well-Known Member

    Yo @Daniel Hood jake don't like making addons, would you be able to make an addon version of this?
     
  7. Daniel Hood

    Daniel Hood Well-Known Member

    Well then yes, you would just copy the code multiple times. I'll let Jake give a more detailed example as it's his tutorial.
     
  8. DRE

    DRE Well-Known Member

    Jake too busy converting sites to Xenforo.
     
  9. Daniel Hood

    Daniel Hood Well-Known Member

    Possibly. We'll see ;)
     
    DRE likes this.
  10. dwdmadmac

    dwdmadmac Active Member

    Where would I look to find more $typeMap = array's ?
     
  11. RobParker

    RobParker Well-Known Member

    I don't quite get the implementation of this. Is the 3 in array(3) the user group assigned as the VIP one?

    If I wanted to display a "Donators" tab, can I just change that ID to the donators user group?
     
  12. Daniel Hood

    Daniel Hood Well-Known Member

    Correct.
     
    RobParker likes this.
  13. 0ptima

    0ptima Well-Known Member

    @Jake Bunce, how many "VIP" would be shown? If I had 250 VIP members, would they all be shown?
     
  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Home -> Options -> User Options -> Members to List Per-Page
     
    zoldos and 0ptima like this.
  15. akia

    akia Well-Known Member

    Is it possible for this to be done as a add on. I don't like modifying core code as I always forget what ive done when it comes to upgrade time.
     
    dwdmadmac likes this.
  16. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Definitely. It would be fairly easy to make it an addon. I just don't like making and supporting lots of little addons.

    Any developer is welcome to copy this code and make a proper addon out of it.
     
  17. dwdmadmac

    dwdmadmac Active Member

    @Jake Bunce, where would I look to get a list or other options to select from rather than "message_count"
     
  18. Daniel Hood

    Daniel Hood Well-Known Member

    PHP:
    $typeMap = array(
    'messages' => 'message_count',
    'likes' => 'like_count',
    'points' => 'trophy_points',
    'vip' => 'message_count'
    );
    You can use message_count, like_count, trophy_points or try to look /root/library/XenForo/Model/User.php in the conditionals.
     
  19. time

    time Active Member

    @Jake Bunce
    how to create tab displays all members of the group 4, 5, 6 anphabe order,
     
  20. eagle eyes

    eagle eyes Active Member

    Why am i getting this?

    Code:
    Parse error: syntax error, unexpected ''vip'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /home/xx/public_html/library/XenForo/ControllerPublic/Member.php on line 110
    @Jake Bunce
     
    Last edited: Dec 18, 2013

Share This Page