Fandom Developers Wiki
Advertisement

ListUsers lists users of various groups in the wiki. Similar to ListAdmins, the list is generated via API, and thus does not require any modifications. However, the group can be manually adjusted. Any change in user rights would be automatically amended to the list.

Installation

Usage

Any tag, with the class name listusers, and group name as the ID would generate a list of users in that group. For instance:

Code Output
<div class="listusers" id="sysop"></div>
  • If the ID, that is, the user group is not defined, a message will appear instead of the list: "No user group found".
  • If no users are found in a group (technically, that is not possible as An unknown anonymous user is always present for no users, which is apparently, a bug), another message will be displayed: "No users found in the <usergroup> group".

Configuration

The list can be configured using the listUsers object.

Option Type Values Default
listUsers.talk - Adds a talk link boolean true/false true
listUsers.contribs - Adds a contribs link boolean true/false false
listUsers.editcount - Adds the users actual editcount boolean true/false false
listUsers.limit - Number of results parsed (max. 500) number Any value between 1 - 500 10

The listUsers object also stores custom user groups, which can be added manually.

For instance, if you want the list to be displayed with talkpage and contributions links, your code would look like:

window.listUsers = {
    talk: true,
    contribs: true
}
importArticle({
    type: 'script',
    article: 'MediaWiki:ListUsers/code.js'
});

Other options will take the default values.

User groups

A full list of supported user groups, that can be used as valid IDs, are (case-sensitive):

  • bot
  • sysop
  • bureaucrat
  • staff
  • soap
  • rollback

Other groups listed in Special:ListUsers have been purposely struck down, but can be added manually if required.

Adding custom user groups

The script supports custom user groups as well. For adding custom user groups, store them in the listUsers.customgroups array. For instance:

window.listUsers.customgroups = ['codeeditor'];
importArticle({
    type: 'script',
    article: 'MediaWiki:ListUsers/code.js'
});

Excluding user groups

Users in additional user groups may be excluded through the addition of several custom classes:

Class Exclude
LU-exclude-bot Bot
LU-exclude-bureaucrat Bureaucrat
LU-exclude-content-moderator Content Moderator
LU-exclude-rollback ⧼userprofile-global-tag-rollback⧽
LU-exclude-staff Staff
LU-exclude-sysop Administrator
LU-exclude-threadmoderator Thread Moderator
Text above can be found here (edit)
Advertisement