UserBadges

By default, Wikia only shows badges for "Founder", "Admin" and "Blocked" (and "VSTF", "Staff", etc). That's nice and all, but what about Bureaucrats, Chat moderators, Patrollers, Rollbackers, etc? This script allows you to automatically add extra badges for these other groups (the exact groups can be customised).

You can also invent your own badges to give out to certain users, like awarding a custom "Muckraker" badge to the person who adds the most references to articles for example. This script also includes all the functionality of InactiveUsers so you don't need that if you use this (you'll end up with 2 inactive badges if you have both).

Installation
If you are on a MediaWiki 1.16 wiki (check Special:Version) then use: If you are on MediaWiki 1.19 then you can use :

To customise the scripts behaviour, you'll need to place a configuration block before the previous code: For information about translations or changing the badge text, see Custom Badge Text.

Configuration
All of the options above are optional, you can just leave out the ones you don't want to change, the default value will be used instead.


 * inactive
 * This option controls the Inactive User badge. It's a number stating the maximum number of days since the user last edited something. If the user has not editing anything then an "Inactive" badge will be attached to their name. Set to 0 to disable this feature. Default: 30.
 * Example


 * gone
 * This option lists users who have announced they are leaving but it has been less than  days so you want to force the "inactive" badge on them. The gone list is processed independently of the   option above, this option will still add "inactive" badges even if   is set to   (disabled). This value is an object map, not an array. Default: null.
 * Example


 * groups
 * A list of formal MediaWiki groups (The sort that show up on Special:ListUsers) that you want to add badges for. If any user is in any of these groups then a badge will be created automatically. This is case-sensitive and must match the MediaWiki group exactly. You can set this to  or an empty literal to disable it. Default:  
 * Example


 * stopBlocked
 * This is a flag that prevents the script from giving any non-custom badges to users who are banned. Disabling this means that a banned chatmoderator will still have their chatmoderator badge for example. It also means that the banned user can be given an "inactive" badge as well. You probably don't want to turn this off. Default: true.


 * newusers
 * This flag controls whether newly registered users should be badged with a "New Editor" badge. Internally, the script checks for the  group; this MediaWiki group is only present on users who have held an account for 4 days and made 10 edits. [You cannot customise the length of time or number of edits, the server decides that, not this script] Note that this is global across all of Wikia, it doesn't have to be 10 edits on your wiki, just any wiki. This feature does not work on MediaWiki 1.16, enabling it will do nothing. Default: true.


 * nonusers
 * This flag controls whether global Wikia accounts that have never edited your particular Wiki will be badged with a "Never Edited" badge. Default: true.


 * custom
 * This option allows you to make up your own badges to give out instead of just relying on the automatic ones. This is a map of user names to arrays of badges.
 * Example


 * names
 * This option converts the internal software groups into human readable text, if you are an English speaker then the defaults will generally suffice unless you want to customise it. Non-English speakers will need to set this option in order to translate certain badge names. The script makes a best effort to download translations from your Wiki's server but some groups don't exist on the server so have to be translated manually. See Custom Badge Text.


 * debug
 * This option controls the amount of console messages the script produces, by default it will only produce a start-up message and error messages if something breaks. If this is set to true then it will dump everything as it works and set the  variable to reflect the script's internal state when it finished which is useful if don't understand why something isn't working. Default: false.

Custom Badge Text
The  option in the configuration data controls the text that will be displayed on each badge. The script includes a partial set of English names and automatically attempts to download the rest from the server's localisation data. The partial English set is not available on the server so you will need to override these in order to translate them into your language. The format of names is an object map: Simply change the text in quotes to whatever you like in order to customise or translate the message. You can also speed-up your pages by manually translating the groups in the  list so that the script won't have to download those from the server separately.

For MediaWiki groups, you can determine whether a group needs a manual translation by going to: [ Special:AllMessages]. If the group doesn't have a message in the list then you will need to create one manually.

Customising the Appearance
Each badge has a CSS class attached to it that allows you to change the appearance via MediaWiki:Wikia.css. The classes are just the group name with '-user' on the end. For example:

All My Badges are Sticking Together!
On MediaWiki 1.19, Wikia decided to remove the margins between each badge for whatever reason. You can fix that by adding this CSS to your MediaWiki:Wikia.css.

Limitations
Badges are produced in the following order: This cannot be changed.
 * 1) MediaWiki groups
 * 2) Custom badges
 * 3) Inactive badge

The Wikia generated badges ("Founder", "Admin", "Blocked") will not be deleted, moved or changed. All badges produced by the script will be put after the Wikia ones. You probably don't want to remove the "VSTF"/"Staff" badges and it may be a Terms of Use violation to do so anyway.

Example
TODO