Admin Forum:Changing admin username color?

Forums: Admin Central Index → General Questions → Changing admin username color? 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.

I have seen in many wikis that admins' usernames have a special color. I found a thread about it, in this wiki, but it's inactive and it doesn't say, where to do it. So, will someone tell me, how to do it and where to do it? 12:33, August 7, 2012 (UTC)
 * In your wiki's MediaWiki:Common.css put a[href="/wiki/User:USERNAME"] { color:COLOUR NAME !important; font-weight: bold !important; }

-- http://i151.photobucket.com/albums/s145/urbancowgurl777/UltimateSupreme2212-3.png  (Talk to me) 12:51, August 7, 2012 (UTC)
 * MediaWiki:Common.css does not affect the oasis skin. Therefore, I would also recommend adding a code like this to your wiki's MediaWiki:Wikia.css file:

Message wall username color
Since we have message walls now which don't use the "wiki/User:USERNAME" but "/wiki/Message_Wall:USERNAME" I have a question.

I use more than one username color change with such a code: a[href|="/wiki/User:USERNAME1"], a[href|="/wiki/User:USERNAME2"] { color: COLOR_CODE/NAME !important; } Why such a code won't work and what to do to make it work and display usernames in color message walls as well: a[href|="/wiki/User:USERNAME1"], a[href|="/wiki/Message_Wall:USERNAME1"], a[href|="/wiki/User:USERNAME2"], a[href|="/wiki/Message_Wall:USERNAME2"], { color: COLOR_CODE/NAME !important; }

Peace, Ͽ †yræl pl Ͼ 07:13, February 3, 2013 (UTC)
 * Go to MediaWiki:Wikia.css Batreeqah


 * I'm not sure why you have pipes between href and = but it should work if you take them out. Like this

a[href="/wiki/User:USERNAME1"], a[href="/wiki/User:USERNAME2"] { color: COLOR_CODE !important; }

Nconspicuous TALK 00:36, February 4, 2013 (UTC)

Peace, Ͽ †yræl pl Ͼ 02:04, February 4, 2013 (UTC)
 * Thanks for both the answers. However, neither of the helped me. The pipes were there since the wikia i used as an an example to see how to implement this also did use - i also have no idea why anyone would put the there. Anyone has some more ideas on how to color usernames on message wall(s)?


 * Wait, I think you're using the wrong code altogether. You want the names on the message wall itself to be colored? Also, what wiki did you get the code from?

Nconspicuous TALK 03:24, February 4, 2013 (UTC) Peace, Ͽ †yræl pl Ͼ 04:55, February 4, 2013 (UTC)
 * Well it was so long ago i dont remember what wiki i used as source. If i recall correctly it might have been League of Legends wiki. I went there recently to check and it seems they have name color part of the code hidden in some other .css. To explain: I don't want to color the message wall itself, i'd like to have Admin names colored on the wall(s) the same way they appear in color anywhere else (i.e in recent changes, edit history etc.). The problem is that name links on wall don't link to "/wiki/User:USERNAME1" but to "/wiki/Message_Wall:USERNAME1" making the solution that works anywhere else invalid on message walls. The most obvious solution: using the analogy in making the appropriate code part didn't work out...PS I'm not sure if it's ok to post such a long discussion here, maybe we should move it to my talkpage?

Tyrael: you were on the right track with your initial idea of using CSS like this: a[href|="/wiki/Message_Wall:USERNAME1"], a[href|="/wiki/Message_Wall:USERNAME2"] { color: purple; } That would have worked perfectly fine if the HTML was this: USERNAME1 However, your guess for the href value was not quite correct. If you go to a message wall thread, right-click on the username and choose Inspect element with your web browser, you'd notice the HTML is actually: USERNAME1 notice that the href starts with "http://community.wikia.com" -- this is why your code wasn't working, because the [attribute|=value] pattern was trying to match "/wiki/Message_Wall:USERNAME1" at the beginning of the string, when the string actually started with "http://community.wikia.com", so it failed to match.

To make your code work for highlighting admin names on message wall threads, you can change it to this: a[href*="Message_Wall:USERNAME1"], a[href*="Message_Wall:USERNAME2"] { color: purple; } Notice that the pipe | has been replaced with an asterisk *. If you want to know what the difference is, look up CSS selectors -- specifically, the difference between these two patterns:
 * [attribute|=value]
 * [attribute*=value]

Ok now THAT is a solution, thank you very much! However, this a[href*="Message_Wall:USERNAME1"], a[href*="Message_Wall:USERNAME2"] { color: purple; } seems a little too much in terms of coloring "cases". I'll experiment some more now that I know exactly all i need to know. For the time being I'll settle with: a[href*="wiki/Message_Wall:USERNAME1"], a[href*="wiki/Message_Wall:USERNAME2"] { color: purple; } since it colors less instances. I will probably still need to filter somehow more cases but I think I'll manage. Perhaps '$' selector will come in handy... Once again thank you. Personally I find this matter resolved to a very satisfying degree. Take care! Peace, Ͽ †yræl pl Ͼ 09:41, February 5, 2013 (UTC)


 * If you're worried about filtering, here is how you would restrict the code specifically to usernames that appear in message wall threads

.Wall .edited-by a[href*="Message_Wall:USERNAME1"], .Wall .edited-by a[href*="Message_Wall:USERNAME2"] { color: purple; }