Last modified: 2006-10-02 01:09:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 7397 - Username as Magic Word
Username as Magic Word
Status: RESOLVED DUPLICATE of bug 4196
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2006-09-24 10:38 UTC by Jason "Electrawn" Potkanski
Modified: 2006-10-02 01:09 UTC (History)
0 users

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


Description Jason "Electrawn" Potkanski 2006-09-24 10:38:52 UTC
I would like to be able to import the username into a mediawiki page. I
understand the cache problem and may have a workaround. Seems the username is
already exposed under javascript, we can rely on javascript to write the
username in as needed.

So for {{username}} the cacheable text would be

<script type="text/javascript">document.write(wgUserName)</script>

Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-09-25 01:08:00 UTC
Relying on JavaScript for display is very bad for accessibility.  Not all
clients support it, in particular mobile devices.  Therefore, most people would
see their name but some would not, and I can't see any satisfactory *general*
fallback here (unlike for all the other JavaScript we currently package).

Of course, should someone want this, they could add it themselves to
Monobook.js: you don't need a magic word, just a reserved class that you hunt
down and fill in.  But please don't, at least not on Wikimedia projects, unless
there's a good fallback for each and every use.  (For instance, a "Welcome to
Wikipedia, username!" box could have display: none; by default, and then that
would be changed by the same JavaScript that adds the name, so people without
JavaScript just don't see the box.)
Comment 2 Jason "Electrawn" Potkanski 2006-09-25 22:02:25 UTC
Sure, we could add it to Monobook, if we want to make our editors jump through a
flaming hoop.

This situation is what I would like to solve:

Currently, the two step process is overly complex. Wouldn't it be easier to just do:

[[Wikipedia:AMA Requests for Assistance/Requests/{{CURRENTMONTH}}
{{CURRENTYEAR}}/{{USERNAME}}|Click Here to file a RfA Blah Blah]] 

and have the user click the red link? 

No, User has to Copy and Paste and further hoop jumping using an inputbox to
even get to the RFA page, which is then another problem for a different bug.

Solution? Magic Word or javascript/skin specific Clientside Magic Words. 
Comment 3 Rob Church 2006-10-02 01:09:51 UTC

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

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