Forum:User Colors on Recent Changes

As we are doing some work on our wiki, one of our users brought up of making a change to how Recent Changes displays. He noticed that on some wikis, admins, b'crats, and users with rollback show up as different colors on the Recent Changes page that allows them to be identified easier. I now know this is done through CSS and I was wondering if anyone can provide the code/links for this and which CSS file it has to be posted in. Lancer1289 23:55, April 27, 2011 (UTC)


 * It is done through CSS on MediaWiki:Wikia.css, you will have to make a subpage called MediaWiki:Wikia.css/hilite. See w:c:NinjaGaiden:MediaWiki:Wikia.css and w:c:NinjaGaiden:MediaWiki:Wikia.css/hilite.--


 * Ok then, now I just want to be clear so I don't mess something up.
 * In the hilite code, I could just copy that and change the color hex code to what every you want and keep the list alphabetized by adding user names in a similar fashion to there. Also could I add a section for rollback users as well?
 * And in the main CSS code, I could copy the code beneith "/* Wiki Activity and Random Page buttons - normal colour */" and "/* Wiki Activity and Random Page buttons - colour when hovering over it */" and change nothing.
 * Is that right or did I miss something? Lancer1289 00:09, April 28, 2011 (UTC)


 * Yes to the first part, no to the second. All you want from the MediaWiki:Wikia.css is  The page button colors are for changing the color of wiki buttons, not usernames.--


 * Ah thank you. Now that I look at it again, I really feel like an idoit. That was just one of those duh mistakes. Just one final question, curse my enter button. I know with most includes/imports in code, it has to be at the top oc the file. Can this be added at end or does it have to be at the top. Lancer1289 00:50, April 28, 2011 (UTC)


 * It should go at the top.--


 * In the hilite code, the user group names are just comments, the color change works directly on seeing the user link. You should be able to add any user who might appear. Hopefully someday I will be less lazy and try to figure out a way to hilite color user links based on user group membership, but I've been pretty lazy. -- Fandyllic (talk &middot; contr) 27 Apr 2011 6:01 PM Pacific
 * Can't be done dynamically without a PHP modification. There's nothing unique about a link to an admin's page, or a staff page, etc. other than the username.
 * That's probably why I never did it! But seriously, I was thinking of something that might use api.php like: http://community.wikia.com/api.php?action=query&list=allusers&augroup=sysop
 * But, I haven't really thought it through that deeply. -- Fandyllic (talk &middot; contr) 28 Apr 2011 9:26 AM Pacific
 * That would work, but then they'd be normal colored until the Ajax query came back. Although you could store it in a cookie to eliminate that somewhat.

Ok I just have one more question that was just brought up. Is the text auto bolded when colors are employed, or is that something that we would have to add manually. If so, then how do we do that? Thanks. Lancer1289 18:03, April 29, 2011 (UTC)
 * You can add a font-weight:bold; statement to the CSS if you want to bold the text, too. The CSS code would be something like:

body.ns--1 * a[title="User:User1"], body.ns--1 * a[title="User:User2"] {color:#xxxxxx !important; font-weight:bold;}
 *  Random Time  18:11, April 29, 2011 (UTC)
 * I see. Many thanks. Lancer1289 18:16, April 29, 2011 (UTC)