FANDOM


Profile Tags is a script that can replace, 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 and to rearrange and remove them as desired. You can also invent custom tags which you can award to users for whatever reason you deem appropriate.

This script was created to allow users to add/remove users/tags without having to wait for the JavaScript Review Tool to approve the change. All steps of adding this script bypass JSRT.

Installation

To import the script, add the following code to MediaWiki:ImportJS:

dev:ProfileTags.js

If there are already scripts loaded via MediaWiki:ImportJS, ensure the above is on a separate line.

Configuration

This script will remove all default tags for a user. If the default tags should be included, they will have to be specified in the tag configuration.

To change a user's tags, simply add them to MediaWiki:ProfileTags. The following will add two tags to Rappy 4187:

Rappy 4187|This is a test,This is a second test

Each user will need to be entered on a new line.

Here's an example with multiple users:

Rappy 4187|This is a test,This is a second test
User 1|Testing tag 1, Example tag 1
User 2|Testing tag 2, Example tag 2
User 3|Testing tag 3, Example tag 3
User 4|Testing tag 4, Example tag 4

Another thing to note is that tabs and spaces are stripped, so you are able to make the code cleaner using tabs and spaces like so:

Rappy 4187	| This is a test, This is a second test
User 1		| Testing tag 1, Example tag 1
User 2		| Testing tag 2, Example tag 2
User 3		| Testing tag 3, Example tag 3
User 4		| Testing tag 4, Example tag 4

Due to the way that the tags are extracted, any lines that don't start with a username are ignored. Therefore, comments and newlines can be added if desired:

# Admins
Rappy 4187 | Testing tag 1, Example tag 1

// Bureaucrats
User 1 | Bureaucrat
User 2 | Bureaucrat

In the above example # and // have been used to denote comments, but in reality these can be omitted if desired. They're included simply to make it more obvious that they're comments rather than incorrect configuration.

Tags can also be made into links using wikitext-style syntax:

Rappy 4187 | Staff, [[Project:Administrators|Admin]]
User 1     | Example

Existing tags

by default, all existing header tags will be removed. This can be disabled by adding the following to your wiki's MediaWiki:Wikia.js:

(window.dev || {}).profileTags = { noHideTags: true };

For wikis without JavaScript enabled, they can also be unhidden with CSS by adding the following to your wiki's MediaWiki:Wikia.css:

#UserProfileMasthead hgroup .tag {
    display: inline-block !important;
}

Note that if you do unhide tags with CSS, when the user profile masthead is updated, the associated CSS will need to be too. If such an update occurs, remember to check back here for the new CSS or ask on the talk page if it has yet to be updated.


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.