Fandom

Wikia Developers Wiki

QuickModTools

888pages on
this wiki
Add New Page
Talk12 Share

QuickModTools allows users with chatmoderator access (Chatmoderators, Admins, Wikia Staff, VSTF, etc.) a quicker access to the kick/ban commands, instead of searching for the user in the user list and clicking the kick button or opening the ban module. This is especially useful in the case of mass spam/flooding, as well as when chat is crowded, which makes finding the user that broke the rules and/or locating him in the user list difficult.

Usage

The feature is activated while Ctrl+Right clicking a message in main chat. If the user is still in chat and does not have the ability to kick/ban, the feature's interface will be displayed. Otherwise, the browser's default context menu will appear.
The interface consists of several list items:

  • A Kick button.
  • An "open ban module" button.
  • A ban length textbox.
  • A ban reason textbox.
  • A series of ban length buttons (from the wiki's default times).
  • A series of quick ban buttons- they auto-load with the wiki's default ban times (can be customized via MediaWiki:Chat-ban-option-list). Pressing them will instantly ban that user for the selected period of time, using the custom summary.

In addition, if a user posts "g҉litçhy̛ ̷t̸e̕x̵t", an alert icon would appear next to their name, informing you from which message it came from.

Textboxes

While selected, pressing Enter in a text box submits the bans, and uses the values from the ban length and ban reason for the ban parameters. If one (or both) of the text boxes are empty (or the ban length is invalid), the default values are used (see the Customizing section for more info).
In addition, the ban reason textbox can hold some info, and then using some of the existing ban lengths buttons would use it as the reason.
Whenever performing a ban, these textboxes are blanked.

Installation

In order to install the feature, add the following content to Special:MyPage/chat.js in your wiki:

importArticles({
	type: "script",
	articles: [
		"u:dev:MediaWiki:QuickModTools/code.js"
	]
});

If you want this feature to be imported by default to all wikis, add to your global.js the following code:

importArticles({
	type: "script",
	articles: [
		"u:dev:MediaWiki:QuickModTools/loader.js"
	]
});

Note, however, that in wikis on which you are not a mod (or have chatmoderator privileges, e.g. an admin), this feature will not work.

Customizing

You can change the default ban reason, as well as the quick ban reasons submenu, by adding before the importArticles function the following code:

window.QuickModTools = {
	quickreasons: [
		"First reason",
		"Second reason",
		"Third reason",
		"etc. reason"
	],
	defbanreason: "some reason",
	defbanlength: "some time"
}

Where:

  • quickreasons is an array of all the custom quick reasons. If it is set to an empty array or to another data type (e.g. string, number), the default reason menu would be used.
  • defbanreason is the default reason summary, if no summary was added to the input field, or if the quick ban reason wasn't used. If defbanreason is not defined, the default reason would be "Banned using QuickModTools", and as soon as the script loads, it would attempt to set it again to the reason from MediaWiki:Chat-log-reason-banadd (as used when no reason is given in the default ban module).
  • defbanlength is a numeric value (some number, either saved as a Number or as a String) which represents the number of seconds for the default ban length (e.g. 86400 == 1 day). This time is used if no valid time was used for the particular ban action. The default value is set to 3 days.

Credits

Versions

  • October 8, 2016- fixing issue with defbanreason
  • May 21, 2015- fixing level-1 ban links and glitchy text icons.
  • September 21, 2014- an improved interfaces and some additional options.
  • July 24, 2014- adding a quick reason and customization options.
  • July 20, 2014- adding an additional import option.
  • July 19, 2014- interface now opens also when right clicking emoticons or links.
  • July 17, 2014- official release.

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.