Fandom

Community Central

Comments26

How to Change/Add/Replace Masthead Tags (Such as Admin, Founder, Bot, etc...)

Jr Mime November 29, 2014 User blog:Jr Mime

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.

Hello :).

I've heard from a lot of people "how do I change the admin tag" "how do I change my founder tag".

Well, here's how!

MediaWiki pages

First, lets take the most basic example. If I wanted to change the ADMIN tag on an admin's masthead (such as Cörey), I would need to go to MediaWiki:User-identity-box-group-sysop and change Admin to anything I want.

There are multiple things you can change, and here they are:

However, if you do have a custom group, you can simply change the [NAME] in MediaWiki:user-identify-box-group-[NAME] to the name of your custom group listed at Special:ListUsers, such as MediaWiki:user-identify-box-group-custodian.

Javascript

If you want to completely change what tags are placed in mastheads, it is possible with the follow coding. The script will remove all existing tags, and will replace with the ones you have choosen. You can set it to which person gets which tag. For example, I could add the "Not cool" tag to User:Ozuzanna.


// Written by User:Rappy_4187, Aion Wiki
// Added support for Special:Contributions by Foodbandlt
 
$(function () {
    var rights = {};
    var admin = "<a href='http://c.wikia.com/wiki/Community_Central_Administrators'>Admin</a>";
    var bureaucrat = "Bureaucrat";
    var staff = "<a href='http://community.wikia.com/wiki/Community Central:Staff'>Staff</a>";
    var vstf = "<a href='http://community.wikia.com/wiki/Help:SpamTaskForce'>VSTF</a>";
    var rollback = "Rollback";
 
    // Begin list of accounts given extra user rights icons
    //
    // Be sure that the last line listed for modified rights is followed by a semi-colon rather than a comma.
 
   //Administrator
 
    rights['Someone is an admin']          = [admin],
    rights['Someone else is an admin']     = [admin],
 
 
   //Bureaucrat and VSTF
 
    rights["Jr Mime"]                     = [bureaucrat, vstf],
 
   //Bureaucrat
 
    rights["Ozuzanna"]                    = [bureaucrat],
 
 
   //Staff
 
    rights["Rappy 4197"]                  = [staff],
 
   //Rollback
 
    rights["Sannse"]                      = [rollback];
 
    // End list of accounts given extra user rights icons
 
 
    if (wgPageName.indexOf("Special:Contributions") != -1) {
        newTitle = fbReturnToTitle.replace("Special:Contributions/", "");
        unfinishedTitle = newTitle;
 
        while (unfinishedTitle.search("_") > 0) {
            unfinishedTitle = unfinishedTitle.replace("_", " ");
        }
 
        userName = unfinishedTitle;
 
    } else {
        userName = wgTitle;
        userName.replace("User:", "");
    }
 
    if (typeof rights[userName] != "undefined") {
        // remove old rights
        $('.UserProfileMasthead .masthead-info span.tag').remove();
 
        for (var i = 0, len = rights[userName].length; i < len; i++) {
            // add new rights
            $('<span style="margin-left: 10px;" class="tag">' + rights[userName][i] +
                '</span>').appendTo('.masthead-info hgroup');
        }
    }
});

Explanation

Let me explain what parts are important here.

Rights

var rights = {};
    var admin = "<a href='http://c.wikia.com/wiki/Community_Central_Administrators'>Admin</a>";

In this section, you can add the variables in which you want to add in the masthead, such as administrator in this case. You simply need to add a new line, under the existing ones, with the coding var namehere = "somestuffhere";.

User

rights['Someone is an admin]          = [admin],

In this long section, this is where you can add which user has which tag. Each line must contain the code above. You can replace Someone is an admin by the name of the admin. Make sure you have ' ' around the name. the [admin], at the end displays which name you have picked in the variables explained above. If you want to have multiple names, simply add a comma after the admin, such as [admin, VSTF],.

Notes

NOTE: The LAST line in the rights section MUST contain a semi-colon (;) instead of a comma (,), or else the script will not work.

NOTE 2: You can place the code on a subpage (such as MediaWiki:Common.js/masthead.js), or directly on MediaWiki:Common.js. If you do place it on MediaWiki:Common.js/masthead.js, make sure to import it on the page MediaWiki:Common.js with the code importScript("MediaWiki:Common.js/masthead.js");.

Examples

MediaWiki pages

For the simple way of changing masthead tags, here is an example. I have replaced the "Founder" tag by "The Uber Duper Cool Founder!".

Founder 1
Founder 2

Script

The script, however, will completely restart the masthead tags. You can now add colors, links, custom names/tags to it. Here's an example which includes the "Bureaucrat" and the "VSTF" tags:

Bureaucrat VSTF tag

Have fun!

Also on Fandom

Random Wiki