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

Add-on XenStaff Modification - Paid

#1
Hello,

I would like the XenStaff (https://xenforo.com/community/threads/xenstaff.5072/) addon modified so I can change the display order of the user groups I select. Also I would like the selected users in each user group to be sorted alphabetically.

Additionally, I would like the users steam badge (https://xenforo.com/community/resources/steam-authentication-integration.1336/updates) to display to the right of their username if they've associated their account. Example below:

1.png


I will be paying for this modification. Please PM me a price if you're interested.

Thank you!
 

rainmotorsports

Well-known member
#5
I can hook you up with alphabetical sorting and if you desire user group sorting via styling priority I've got mine setup that way too. You just have to modify 2 of the model files. Its actually stupid easy.

That would be on the free side of things. Not sure I will have time for the other which would actually require me to do work. But I'll send the modifications when I get home.
 
#6
I can hook you up with alphabetical sorting and if you desire user group sorting via styling priority I've got mine setup that way too. You just have to modify 2 of the model files. Its actually stupid easy.

That would be on the free side of things. Not sure I will have time for the other which would actually require me to do work. But I'll send the modifications when I get home.
Great thanks! I'm still looking for someone to make the other required modifications! Paying!!
 
Last edited:

rainmotorsports

Well-known member
#7
For alphabetical username sorting:

In \XenStaff\Model\StaffGroupsUserIds.php find:
PHP:
return $this->_getDb()->fetchAll('
            SELECT user_id, user_group_id
            FROM xf_user_group_relation
            WHERE user_group_id IN (' . $staffgroups . ')
            ORDER BY user_group_id
            ');
Replace with:
PHP:
return $this->_getDb()->fetchAll('
            SELECT
            u.username,
            g.user_id,
            g.user_group_id
            FROM xf_user_group_relation g
            INNER JOIN xf_user u
            ON g.user_id = u.user_id
            WHERE g.user_group_id IN (' . $staffgroups . ')
            ORDER BY u.username
            ');

For usergroup ordering by styling priority:


In \XenStaff\Model\StaffGroups.php find:
PHP:
return $this->_getDb()->fetchAll('
            SELECT user_group_id, title
            FROM xf_user_group
            WHERE user_group_id IN (' . $staffgroups . ')
            ORDER BY user_group_id
            ');
Replace with:
PHP:
return $this->_getDb()->fetchAll('
            SELECT user_group_id, display_style_priority, title
            FROM xf_user_group
            WHERE user_group_id IN (' . $staffgroups . ')
                ORDER BY display_style_priority DESC
            ');



Usergroups this way will be sorted using display priority, the same xenforo feature that controls banner order and title priority:
upload_2015-3-4_14-41-21.png

We have founders, head admins, admins, registered users. Think of it like owners, staff, members, public and so our roster appears in that order. Should work for you but maybe not.
 
Last edited: