UserTags

UserTags is a script that can add, remove, modify and rearrange the tags on User pages (The "Founder", "Admin", "Blocked", etc tags that appear next to user's names in their masthead). It allows you to add tags in addition to the Wikia default ones and to rearrange and remove them as desired. You can also invent custom ones to award to users for whatever reason you deem appropriate.

This script replaces InactiveUsers and UserBadges, you should only use one of these 3 scripts to avoid conflicts. This one is the newest and has the most features and customisation options.

Installation
To import the script, add the following code to MediaWiki:Common.js: Or add the relevant row to your existing  call if you have one.

You will also need to add the following CSS to MediaWiki:Wikia.css:

And, finally, add this CSS to MediaWiki:Monobook.css:

This is sufficient for the basic functionality; however, if you want to customise it then you will need to read the Configuration section.

Configuration
This script has a lot of features so the following section is somewhat long. You don't need to use all of them, in fact you can ignore the ones you don't want. You may want to skip to the Examples then come back to read the Core Configuration section.

Core Configuration
The first thing you need to know is that users are divided into "groups", these are things like "blocked", "sysop", "bureaucrat" or "inactive". These are internal names used by the software but they need to be displayed on the screen in the end, to do this they are converted into "tags". Tags describe how the group should look when displayed.

Let's make a simple example, let's say you want to create 3 tags: "Editor of the Month", "Featured" and "Templates Guru". To do this, we will create the groups "montheditor", "featured" and "templates": When creating new groups and tags, this is generally sufficient, except these tags will be placed at the end of the row in the header. Maybe you want to place the tag at start instead, to control the order, you use the  configuration option. The  parameter is a number from negative infinity to positive infinity, lower numbers are closer to the start. In this case  is negative infinity so the tag will be placed at start.

Tags support the following parameters: The male/female/unknown variants exist to support languages other than English, like Italian, that have different nouns for males/females. In English or other languages that don't differentiate on gender, you can just use the  (unknown) field.

Overriding Existing Tags
Most of the time you'll only want to create new groups but sometimes you may want to customise existing ones. You can do this simply by specifying your own tag for the existing group: This will change the bureaucrat tag to say "Bureaucrat Tag" and turn it into a link to the Project:Bureaucrats page and change the inactive tag so that it says "Has not edited recently" instead of just "Inactive". Alternatively, maybe you just want to make it a link without changing the text, or just change the order, you can do that as well: This will make the bureaucrat tag into a link and move it to the end without changing what it says. [NOTE: Not setting text only works with built-in groups; for your own made-up groups, specifying the text on the tag is not optional]

Styling / Appearance
The script is designed to make it easy to give each tag a different appearance. Every tag has a CSS class based on the internal group that created it with '-user' added to the end. For example, the bureaucrat tag has the CSS class, the inactive tag has the   class and so on. Your custom tags will use the groups you picked, the "Editor of the Month" tag from earlier has the  CSS class.

To change the colors or appearance, simply add a rule to MediaWiki:Wikia.css, like this: This will make bureaucrat tags gold and "featured user" tags blue. You can use any CSS directives you like, including changing the borders, adding background images or whatever.

The only caveat is that internal group names will be reduced to plain English, if you have a group like 'asd%$@xyz' then you'll end up with  but there is no reason to non-English alphabet characters in internal groups since they aren't visible to your users.

Modules
Now that you understand the basics, we can move on to the actual features. The script is broken into modules which can be turned on and off separately. You don't need to read this whole thing, you may want to skip to the examples then come back to choose which ones you want.

The built-in modules and their configuration options are listed below. It is possible to create your own modules or to install additional ones created by other developers as well; you'll want to read the relevant documentation provided by the developer to add a 3rd party module.

Inactive
This module adds the  group to users who haven't edited within the configured interval. It takes a number specifying the number of days a user must have not edited to be considered inactive:

MediaWiki Groups
This module adds the users MediaWiki groups to the internal group list, and automatically downloads translations for those groups from the server. These are formal groups like,  ,  ,  ,  ,  , etc. The sort of things you see in Special:ListUsers. This module takes an array listing the groups you want to include:

Global Accounts Without Edits
This module tags users who have zero edits. It's not very useful in Oasis since you can see the contributions counter in the masthead but it can be useful in Monobook. There are no configuration options, just enable it if you want it:

Newly Registered Accounts
This module tags users who have just created their account; that is, they have only been a registered Wikia user for less than 4 days and have made less than 10 edits to any Wiki in the Wikia network. This may be helpful for quickly recognising sockpuppet accounts. Simply enable it if you want it:

New Editors
This module tags users who have not been on your particular wiki for the specified number of days, and haven't made the specified number of edits. This is basically like the  module, it can be useful for recognising meat-puppets and new editors who may have been on Wikia for a while but don't know local policies very well. To configure it you can set any of these fields, leaving out ones that you want to keep the default value for:

The parameters are:

Custom
This module lets you attach your custom tags to users. Custom tags are the ones you were shown how to create in the Core Configuration section. You can also attach other arbitrary groups if you want, it's entirely acceptable to add the  group to a user as a custom group if you want, you can also do weird things like adding the   group to a user. This module is mildly complex, it maps user names to arrays of groups:

User Filter
This module removes groups from certain users, such as if you wanted to remove the  group from someone, or if you enable the   module but you don't want one user to show as inactive even when they are. The format is identical to  above except that the effect is opposite:

Meta Filter
The meta-filter is a more powerful version of the user filter, instead of operating on user names, it operates on groups. The format is otherwise similar but the effective is much more impressive:

Hide when Blocked
This module removes all tags from users who are blocked, except the  tag itself obviously. This module is force enabled unless you explicitly turn it off. Generally you'll want to leave this on as it will stop blocked users from being marked inactive or as a "new editor" if they haven't met the minimum number of edits before being banned.

Is Blocked?
This module determines if a user is blocked or not. It's only useful in Monobook since Oasis displays a blocked tag itself anyway, as such this module is force enabled on Monobook but not Oasis, in Oasis it will only run if you turn it on manually.

Example
This demonstrates all the modules, it's not particularly practical but you hopefully get a basic feel for how to use it. You create your custom tags inside the  section then add separate configuration blocks for each module you want to use after it. You only need to use the modules you want, you probably don't want all the ones here and you definitely don't want to use this as is.

For a more practical example, here is the default configuration that the script uses internally when you don't set one yourself: Please keep in mind that this default configuration is only used when NO settings are given. It's highly recommended that you copy this entire block into your MediaWiki:Common.js and then customise it from there, adding extra module entries and tags as needed.

Walkthrough
For a walkthrough, I'll show you how to create the tags shown in the image below:

There are 3 custom tags in this image, "JavaScript", "CSS" and "Templates" as well as 2 MediaWiki groups: "sysop" and "bureaucrat". Also take note of the order: the "Administrator" tag is at the start then "Bureaucrat" and so on.

We'll start by configuring the script and add the colors later. The first step is to create the custom groups and tags: Reasonably straightforward, the group names I picked are arbitrary, you can use any plain English name you like (letters A-Z a-z 0-9), although you should remember that it is case sensitive if you mix capitals. This isn't quite enough, we also want the tags to be a certain order as well, so we'll have to add order parameters: This will place all the tags in the order shown in the image, you'll notice I also added a partial tag for the  group, this is because   is a built-in group so it already has text translations which I don't need to change. I also override the unknown gender text for the sysop tag to say "Admin" since it'll say "Administrator" by default, but I do so without changing the order (which defaults to zero for MediaWiki groups) or the other settings. Remember that the tags are sorted by their given  values from smallest (start) to largest (end). The numbers I picked are arbitrary, they don't really matter as long as each tag has a different number; tags that have the same  number will be arranged randomly [they'll be in the right place relative to the other tags with different   values, but random with respect to tags sharing the same  ]. There are several specific numbers you may find useful as well:

Now that we have our groups and tags set up correctly, we can move on to actually using them. To use our custom groups/tags, we obviously need to use the Custom module so we'll set that up now: If you've read the description for the custom module, you can see that this adds 3 groups to the selected user. Not terribly difficult, if we wanted to add groups to multiple users then we could just list more of them.

We're half-way now, we just need to add the Bureaucrat and Admin tags. To do that, we'll use the MediaWiki Groups module. MediaWiki Groups asks the server for the user's groups automatically so we don't have to fill in each user's groups manually in the custom lists which would be a tedious waste of time. Pretty simple really. The script will now ask the server for the user's group memberships and automatically add the "bureaucrat" and "sysop" groups if the server says that the user is in them.

Finally, we need to set the colors to match what we see the image. To do that, we'll create a couple of custom CSS rules in MediaWiki:Wikia.css. Each tag on the UI has a CSS class based on the group that generated it; for example, the "Bureaucrat" tag has a  CSS class. For our custom tags, the CSS classes will be. And we're done.

The final JavaScript in MediaWiki:Common.js looks like this: Of course, you probably also want to enable Inactive Users and several other modules as well.

Full Group List
This is a list of all built-in groups for reference if you want to change the text or avoid accidentally picking an already used name for a custom group:

The following MediaWiki groups are also known to exist so you probably want to avoid these as well unless you are intentionally trying to change what the tags say for them:

Limitations
Some Wikia generated tags are protected, the following groups may not be added, removed or otherwise changed at all: The tags for these groups will always be kept and will always be left at the start of the row, any attempt to add the 'staff' group or such manually will fail. Other Wikia generated tags like "Founder", "Admin", "Blocked", etc can be manipulated normally.
 * &mdash; Wikia employees
 * &mdash; Volunteer Spam Task Force
 * &mdash; Wikia beta testers
 * &mdash; Official PR accounts for companies
 * &mdash; Wikia interns and contractors