Community Central
Community Central
Forums: Admin Central Index General Questions Giving tags to other users
Central's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 4330 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.


Is it possible to give tags to non-admins? — ¤ULTIMATE SUPREME¤(T@lk)☺ 06:04, June 11, 2012 (UTC)

What do you mean by "tags"? -- RandomTime 06:07, June 11, 2012 (UTC)
In the profile, on the top. (where its written Admin) — ¤ULTIMATE SUPREME¤(T@lk)☺ 06:23, June 11, 2012 (UTC)
That would be against the TOUs I'd say, sadly. ;) STARFLEET ACADEMY 07:35, June 11, 2012 (UTC)
Which part of the TOU ? — ¤ULTIMATE SUPREME¤(T@lk)☺ 07:38, June 11, 2012 (UTC)

┌──────────┘
Why would that be a TOU violation? I'd say there are quite a few legitimate uses for those.

Anyway, to answer the question, you can use this:

// <source lang="JavaScript">
// WRITTEN BY USER:RAPPY_4187
 
$(function() {
  var rights = {};
 
  rights["EXAMPLE USER"]   = ["Tag1","Tag2","Tag3"],

  if (typeof rights[wgTitle] != "undefined") {
    // remove old rights
    $('.UserProfileMasthead .masthead-info span.group').remove();
 
    for( var i=0, len=rights[wgTitle].length; i < len; i++) {
      // add new rights
      $('<span class="group">' + rights[wgTitle][i] +
        '</span>').appendTo('.masthead-info hgroup');
    }
  }
});
 
// </source>
// END LIST OF ACCOUNTS GIVEN EXTRA USER RIGHTS ICONS
Where should I put it? Is there any code for a general user group, like one for rollback, one for autoconfirmed, etc... — ¤ULTIMATE SUPREME¤(T@lk)☺ 08:09, June 11, 2012 (UTC)
It should go in Wikia.js. The code I posted was a truncated version of the one I've seen used, but with the same function. This is the original:
// <source lang="JavaScript">
 
// WRITTEN BY USER:RAPPY_4187
 
$(function() {
  var rights = {};
 
  // BEGIN LIST OF ACCOUNTS GIVEN EXTRA USER RIGHTS ICONS
 
    // FOUNDERS
 
  rights["Example"] = ["Founder","Bureaucrat","Administrator"],
 
    // BUREAUCRATS
 
  rights["Example"]  = ["Bureaucrat","Administrator"],
 
    // ADMINISTRATORS
 
  rights["Example"]         = ["Administrator"],
 
    // ROLLBACK
 
  rights["Example"]          = ["Rollback"],
 
    // CHATMODS
 
  rights["Example"]          = ["Chatmod"],
 
    // TEST ACCTS, BOTS, & AWB
 
  rights["WikiaBot"]        = ["Wikia Bot"]; 
  rights["Wikia"]           = ["Wikia Bot"];
  rights["Example Bot"]     = ["Bot"];
 
  // END LIST OF ACCOUNTS GIVEN EXTRA USER RIGHTS ICONS
 
  if (typeof rights[wgTitle] != "undefined") {
    // remove old rights
    $('.UserProfileMasthead .masthead-info span.group').remove();
 
    for( var i=0, len=rights[wgTitle].length; i < len; i++) {
      // add new rights
      $('<span class="group">' + rights[wgTitle][i] +
        '</span>').appendTo('.masthead-info hgroup');
    }
  }
});
 
// </source>
You can add custom sections to that as well. Also, I'm not sure if this works for users with no extended rights at all. I see no reason why it wouldn't, but I'm not sure.
In MediaWiki:Common.js? — ¤ULTIMATE SUPREME¤(T@lk)☺ 08:33, June 11, 2012 (UTC)
I don't think Monobook handles rights icons. I would put it in MediaWiki:Wikia.js.
Dzylon is correct, it should be in Wikia.js. Also, please use the disclaimer for the original script. This script is not to be used to replace Wikia's default user tags. It should only be used to add tags. Replacing Wikia's default tags could be a violation of the ToU; adding to them should not. Rappy 08:51, June 11, 2012 (UTC)

┌────────────┘
Ah, sorry about that. I wasn't aware the original code had been updated.

Sorry UltimateSupreme. I couldn't remember why Rappy once said it could be a TOU violation, and I was too lazy to find it on ATW. Very helpful to me as it happens. Thanks Rappy for the clarification! :) STARFLEET ACADEMY 09:13, June 11, 2012 (UTC)