Fandom Developers Wiki
mNo edit summary
m (+LangSelect)
(18 intermediate revisions by 11 users not shown)
Line 1: Line 1:
  +
<noinclude>{{LangSelect}}</noinclude><includeonly>
 
{{Languages}}
 
{{Languages}}
  +
{{for|a script with similar functionality|UserTags}}
 
{{Infobox JavaScript
 
{{Infobox JavaScript
| Title = Profile Tags
 
 
| Image file = Profile Tags Example.png
 
| Image file = Profile Tags Example.png
 
| Status = stable
 
| Description = Adds, removes, rearranges and modifies the tags next to User's names on User pages.
 
| Description = Adds, removes, rearranges and modifies the tags next to User's names on User pages.
 
| Scope = s
 
| Scope = s
  +
| Updated = {{Updated|MediaWiki:ProfileTags.js}}
| Author = [[User:Rappy 4187|Rappy 4187]]<br />[[User:Cqm|Cqm]]
 
  +
| Author =
| Updated = 2017-07-28
 
 
* [[User:Rappy 4187|Rappy 4187]]
  +
* [[User:Cqm|Cqm]]
 
| Code = [[MediaWiki:ProfileTags.js|ProfileTags.js]]
 
| Code = [[MediaWiki:ProfileTags.js|ProfileTags.js]]
  +
| Examples = [[User:Rappy 4187|Userpage]]
| Skins = Oasis
 
  +
| Type = user management
| Languages = N/A
 
| Status = Stable
 
 
}}
 
}}
'''Profile Tags''' is a script that can replace, remove, modify and rearrange the tags on User pages <small>(the "Founder", "Admin", "Blocked", etc. tags that appear next to user's names in their masthead)</small>. 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.
+
'''ProfileTags''' is a script that can replace, remove, modify and rearrange the tags on User pages <small>(the "Founder", "Admin", "Blocked", etc. tags that appear next to user's names in their masthead)</small>. 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 [[Help:JavaScript review process|JavaScript review]] to approve the change. All steps of adding this script bypass JavaScript review. The stopping of the removal of existing header tags will however require a JavaScript review which will be approved if no other review-denying changes are made.
+
This script was created to allow users to add/remove users/tags without having to wait for the [[Help:JavaScript review process|JavaScript review]] to approve the change. All steps of adding this script bypass JavaScript review. The stopping of the removal of existing header tags will, however, require a JavaScript review which will be approved if no other review-denying changes are made.
   
 
__TOC__
 
__TOC__
 
== Installation ==
 
== Installation ==
  +
{{Script Install|Use = S}}
To import the script, add the following code to [[MediaWiki:ImportJS]]:
 
<syntaxhighlight lang="javascript">
 
dev:ProfileTags.js
 
</syntaxhighlight>
 
If there are already scripts loaded via [[MediaWiki:ImportJS]], ensure the above is on a separate line.
 
   
 
== Configuration ==
 
== Configuration ==
Line 28: Line 27:
   
 
To change a user's tags, simply add them to [[MediaWiki:ProfileTags]]. The following will add two tags to [[User:Rappy 4187|Rappy 4187]]:
 
To change a user's tags, simply add them to [[MediaWiki:ProfileTags]]. The following will add two tags to [[User:Rappy 4187|Rappy 4187]]:
 
 
<pre>
 
<pre>
Rappy 4187|This is a test,This is a second test
+
Rappy 4187|This is a test, This is the second test
 
</pre>
 
</pre>
 
 
Each user will need to be entered on a ''new'' line.
 
Each user will need to be entered on a ''new'' line.
   
 
Here's an example with multiple users:
 
Here's an example with multiple users:
 
<pre>
 
<pre>
Rappy 4187|This is a test,This is a second test
+
Rappy 4187|This is a test, This is the second test
 
User 1|Testing tag 1, Example tag 1
 
User 1|Testing tag 1, Example tag 1
 
User 2|Testing tag 2, Example tag 2
 
User 2|Testing tag 2, Example tag 2
Line 43: Line 40:
 
User 4|Testing tag 4, Example tag 4
 
User 4|Testing tag 4, Example tag 4
 
</pre>
 
</pre>
 
 
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:
 
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:
 
<pre>
 
<pre>
Rappy 4187 | This is a test, This is a second test
+
Rappy 4187 | This is a test, This is the second test
 
User 1 | Testing tag 1, Example tag 1
 
User 1 | Testing tag 1, Example tag 1
 
User 2 | Testing tag 2, Example tag 2
 
User 2 | Testing tag 2, Example tag 2
Line 52: Line 48:
 
User 4 | Testing tag 4, Example tag 4
 
User 4 | Testing tag 4, Example tag 4
 
</pre>
 
</pre>
 
 
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:
 
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:
 
<pre>
 
<pre>
  +
# Administrators
# Admins
 
 
Rappy 4187 | Testing tag 1, Example tag 1
 
Rappy 4187 | Testing tag 1, Example tag 1
   
Line 62: Line 57:
 
User 2 | Bureaucrat
 
User 2 | Bureaucrat
 
</pre>
 
</pre>
 
 
In the above example <code>#</code> and <code>//</code> 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.
 
In the above example <code>#</code> and <code>//</code> 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.
   
Line 73: Line 67:
 
=== Existing tags ===
 
=== 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''':
 
By default, all existing header tags will be removed. This can be disabled by adding the following to your wiki's '''MediaWiki:Wikia.js''':
 
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
  +
// prevents existing tags from being hidden
(window.dev || {}).profileTags = { noHideTags: true };
+
(window.dev = window.dev || {}).profileTags = { noHideTags: true };
 
</syntaxhighlight>
 
</syntaxhighlight>
  +
</includeonly>

Revision as of 11:15, 18 May 2020

For a script with similar functionality, see UserTags.

ProfileTags 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 to approve the change. All steps of adding this script bypass JavaScript review. The stopping of the removal of existing header tags will, however, require a JavaScript review which will be approved if no other review-denying changes are made.

Installation

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 the 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 the 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 the 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:

# Administrators
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:

// prevents existing tags from being hidden
(window.dev = window.dev || {}).profileTags = { noHideTags: true };
Text above can be found here (edit)