FANDOM


CustomModIcons is a chat script that can replace the new chatmod badges. It allows users to apply custom badges to a wiki's usergroups easily, without having to apply the custom badge to each user and update the custom badges.

It can also be configured to restore the old chatmod stars.

Usage

Installation

Add the following to MediaWiki:Chat.js to use it on your wiki, or to your Special:MyPage/chat.js of your wiki for personal use.

importScriptPage('MediaWiki:CustomModIcons.js', 'dev');

Configuration

Custom badges

To apply a custom badge to any usergroup, use CSS in the format below. Order the CSS with the most important badge last.

You can add CSS to the MediaWiki:Chat.css page of your wiki for sitewide use; add the styling to Special:MyPage/common.css of your wiki or to your global CSS for personal use.

.ChatWindow .usergroup .badge {
    background-image: url('URL');
}

Replace .usergroup with the class corresponding to the role name.

For example, the default old icons were coded like this:

.ChatWindow .chatmoderator .badge,
.ChatWindow .vstf .badge,
.ChatWindow .helper .badge,
.ChatWindow .sysop .badge {
    background-image: url('URL'); /* mod icon */
}
.ChatWindow .staff .badge {
    background-image: url('URL'); /* staff icon */
}

Classic badges

To restore the old usergroup badges, add the following line above the import:

window.ClassicModIcons = true;

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.