Last modified: 2012-03-05 00:53:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36413, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34413 - Add css class for user status to body tag
Add css class for user status to body tag
Status: RESOLVED DUPLICATE of bug 13242
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-15 08:03 UTC by Subfader
Modified: 2012-03-05 00:53 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Subfader 2012-02-15 08:03:25 UTC
According to action classes in the body tag https://bugzilla.wikimedia.org/show_bug.cgi?id=4438
there should be classes for the user status:
* user-anon
* user-logged

Maybe expand it for the user rights
* user-sysop
* etc.

Technically this should be no problem since the same is added as javascript variables to the output ("wgUserGroups": ["*"] etc.)
Comment 1 Brion Vibber 2012-02-16 00:03:05 UTC
Groups are pretty open-ended, I'm not sure how wise it would be to add them all as classes. (Also, 'anon' or 'logged' could be actual group names, leading to a conflict...)
Comment 2 Daniel Friesen 2012-02-16 00:13:55 UTC
There is a bit of prior art from Wikia that made it's way into my Monaco port code:
https://github.com/dantman/monaco-port/blob/master/ExtendedBodyAttributes.php

.loggedout and .mainpage

However I'm opposed to the idea of user groups in classes.

They have no value in generic css. Since user-rollback isn't the same on one wiki as another and might not even exist.

They have no value for hiding things from users. Because groups do no equate rights. You don't go hiding something with a .user-sysop since that's not a right and you might also need to add say .user-bureaucrat, etc... and of course no-one is going to do that. So this provokes the idea of dozens of wikis using even more bad practice. And there is no way we're going to add user-right-* to body classes since a user could have hundreds of them.

I don't like wgUserGroups. We need to have a wgUserRights so things can be coded properly.
Comment 3 MZMcBride 2012-02-16 03:45:07 UTC
I think this is a dupe of bug 13242.

I could swear there's a different bug where Splarka and I discussed this same idea, but I'll be damned if I can find it.
Comment 4 Subfader 2012-02-16 11:10:45 UTC
See http://www.mediawiki.org/wiki/Project:Support_desk to see how many people request such a feature.
Comment 5 Krinkle 2012-03-05 00:53:46 UTC

*** This bug has been marked as a duplicate of bug 13242 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links