Wikia

Community Central

Admin Forum:Giving tags to other users

Talk0
86,674pages on
this wiki

This Forum has been archived

Forums: Admin Central Index General Questions Giving tags to other users
Wikia'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 406 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
Dzylon  Talk  08:01:10  June 11, 2012
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. Dzylon  Talk  08:17:39  June 11, 2012
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  Talk  08:36:24  June 11, 2012
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. Dzylon  Talk  09:00:44  June 11, 2012

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)
Isn't there an easy way like MediaWiki:User-identity-box-group-sysop? — ¤ULTIMATE SUPREME¤(T@lk)☺ 09:30, June 11, 2012 (UTC)
No? — ¤ULTIMATE SUPREME¤(T@lk)☺ 11:14, June 11, 2012 (UTC)
The system message you're referring to just changes what the tag says, it does not add any additional tags, nor does it assign it to anyone (that's done via what user rights are assigned) Utter solitude 11:23, June 11, 2012 (UTC)
Also, as a related question, I have been trying to implement this code into the Once Upon a Time wik, however, I am unable to get it to work. Any tips would be appreciated. Utter solitude 11:46, June 11, 2012 (UTC)
Yeah. I want a tag for rollback and autoconfirmed users too — ¤ULTIMATE SUPREME¤(T@lk)☺ 12:04, June 11, 2012 (UTC)
Having a tag for rollback makes sense. Auto-confirmed, not so much. Just follow the styling on the like I pasted above.
Utter solitude, what issue are you having? Rappy 19:58, June 11, 2012 (UTC)
What I would like to end up with is bureaucrat tags in addition to the admin tag. I have implemented the code as it is exampled here, but the extra tags do not appear. Utter solitude 20:46, June 11, 2012 (UTC)
Easy fix. The last rights[] needs a ; after it. So, after Aurorsol's rights, it should be a ';' and not a ','. Rappy 20:57, June 11, 2012 (UTC)
Still not working after I made the change Utter solitude 04:20, June 12, 2012 (UTC)

Looks complicated. Can you do it for me. My wiki is here. What tags I want is,

  • Bureacrat=Kage
  • Admin=Jonin
  • Rollback=chunin

Thanx — ¤ULTIMATE SUPREME¤(T@lk)☺ 04:02, June 12, 2012 (UTC)

(Reset indent) @Utter, it's because you have CSS loading in your Common.js file. It's causing an error on load. Wikia combines all of these files together. Common.js loads before Wikia.js does (see here) and since it doesn't know what to do with '.ambox' it fails to load and scraps the rest of the file as invalid.

Move that CSS to Common.css instead (or remove it.... most wikis don't even use ambox anymore) and that should fix the issue. The syntax of the code is correct. Rappy 16:46, June 12, 2012 (UTC)

Thank you so much! I'd been fiddling with this for weeks, and I figured it was something relatively simple like that. (I wasn't aware that Common loads before Wikia, and I feel silly now lol) Thank you so much, Rappy, you're my hero :D Utter solitude 17:17, June 12, 2012 (UTC)
Good to hear it's working. Rappy 17:53, June 12, 2012 (UTC)



I heard that there is a code that you can put on any user's page that will add a tag to their profile at the top. Is this true? I want to add this to just any user not a user in a specific group. Please help, thanks! :)

Jessie1010 19:43, June 28, 2012 (UTC)

Isn't Categories like "Users" and "Admins" or ListUsers the way you can just put a user in a group? Aeon2 20:49, June 28, 2012 (UTC)

Advertisement | Your ad here

Around Wikia's network

Random Wiki