FANDOM


This feature adds a dropdown menu for reasons to Special:UserRights.

Usage

1. To begin, you need to add the following code to the MediaWiki:Common.js page on your wiki.

importScriptPage('User Rights Reasons Dropdown/code.js', 'dev');

2. You then need to create MediaWiki:Custom-userrights with this code:

<select id="user-reason-dropdown"></select><br />
<input type="text" style="width: 200px; margin-left: 2px;" id="user-reason-override" placeholder="Other reason" /> <span style="font-size: 83%; color: #777;">(overrides dropdown)</span>

3. Then, create MediaWiki:Custom-userrightsreasons with your reasons. Like MediaWiki:Ipbreason-dropdown (block reasons), you can add sections with one asterisk (*) and the reasons with two asterisks (**). For example:

*Promotion
**Lots of edits
*Demotion
**Inactive
**Blocked
**Resigned
*Bot
**Requested - Bot
*Other
**Clean Up

Default reason

The default reason is a null string. If you want to override the reason, add before the import function another line like this:

userReasonDefault = '<option value="Default reason">Default dropdown option text</option>';
importScriptPage('User Rights Reasons Dropdown/code.js', 'dev');

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.