Last modified: 2009-03-08 21:21:00 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 T14733, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12733 - More PST magic, e.g. editor username
More PST magic, e.g. editor username
Status: RESOLVED DUPLICATE of bug 10336
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal enhancement with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-21 22:17 UTC by FT2
Modified: 2009-03-08 21:21 UTC (History)
6 users (show)

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


Attachments
add six-tilde shortcut for user name (1.12 KB, patch)
2008-01-21 23:05 UTC, CBM
Details

Description FT2 2008-01-21 22:17:03 UTC
Recongizing the caching concerns of bug 4196

http://bugzilla.wikimedia.org/show_bug.cgi?id=4196

Can we have one extra ~~ code for "the name (not signature) of the present editor making a post".

Something like:

~~~ == signature of poster
~~~~ == sig of poster + timestamp of post
~~~~~ == timestamp of post
~~~~~~ == username of poster


#A variable {{CURRENTUSER}} was declined due to caching concerns, but this is different and, I suggest, useful. There are many templates where one would like to pre-fill in the name of the user posting, for example:

"This request posted by [[User:~~~~~~|~~~~~~]] at ~~~~~"

in a template. It would see very wide use to pre-fill many templates.

Please? :)
Comment 1 FT2 2008-01-21 22:20:13 UTC
Also in section headers in templates, such as:

"== Request by ~~~~~~ ==
{{{1}}}

..."


where one would want to autofill the users name, not their signature.
Comment 2 FT2 2008-01-21 22:27:01 UTC
Or more accurately as a template, perhaps like this, to show possible uses:


"== Request by ~<includeonly>~~~~</includeonly>~ ==

: User links: <includeonly>{{userlinks|~~~~~~}}</includeonly>

{{{1|''Please add your request here''}}}

..."


A user SUBSTing this template would end up with the section header filled out.
Comment 3 CBM 2008-01-21 23:05:48 UTC
Created attachment 4568 [details]
add six-tilde shortcut for user name

I believe this is all that needs to be changed.
Comment 4 Alex Z. 2008-01-21 23:19:55 UTC
Note that ~<includeonly>~~~~</includeonly>~ would not work, the ~~~~ in the middle would be expanded to the signature, you would have to use ~~<includeonly>~~</includeonly>~~

Comment 5 FT2 2008-01-21 23:43:23 UTC
True, dat :)
Comment 6 Brion Vibber 2008-01-22 01:26:08 UTC
I'm very disinclined to add yet another tilde sequence.

See also bug 10336.
Comment 7 FT2 2008-01-22 01:49:38 UTC
Its not so important its code, so long as the functionality's possible. 

Previous thoughts floundered because {{CURRENTUSER}} were conceived as being "the user reading the page", which killed caching.

The idea here is a code for "the user posting the page" that can be hard substituted into the page markup.

I did have one thought.  Suppose codes were added such as these:

{{INSERTSIG}}
{{INSERTSIGANDTIMESTAMP}}
{{INSERTTIMESTAMP}}
{{INSERTUSERNAME}}

and then ~~~ ~~~~ ~~~~~ were simply allowed to be aliases ("convenience abbreviations") to the first three?

Then these abbreviations would work as normal, but other items such as "username of the posting user" could be inserted too.
Comment 8 FT2 2008-01-22 01:53:13 UTC
To clarify:

In the above, the codes such as {{INSERTSIG}} would be the "formal" name for the command to "insert the users sig here as markup", ie identically to how ~~~ does. ~~~ would be an alias of this. 

Then additional inserts on the same theme such as "insert username" would simply not have a tilde-based alias, but would be accessed by {{INSERTUSERNAME}}, which would be immediately replaced in the markup by the posting user's name, as per the original idea.
Comment 9 Daniel Friesen 2008-01-22 08:48:14 UTC
Rather than the {{...}} syntax which could be confused with templates, and syntax could get confusing because they would technically be substed when you haven't defined subst:, How about the __...__ syntax used for things like __NOTOC__. Those wouldn't be as confusing for use.

__SIG__ - ~~~
__SIG&TIMESTAMP__ or __SIG__ __TIMESTAMP__ - ~~~~
__TIMESTAMP__ - ~~~~~
__USERNAME__

Technically, __SIG&TIMESTAMP__ isn't actually needed, and the latter is also cleaner, so I'd swing for that method a bit more.
Comment 10 FT2 2008-01-22 09:09:25 UTC
So maybe:

~~~ is a "convenience shortcut" for __INSERTSIG__
~~~~ is a "convenience shortcut" for __INSERTSIG__ __INSERTTIMESTAMP__
~~~~~ is a "convenience shortcut" for __INSERTTIMESTAMP__

and then __INSERTUSERNAME__ exists and can likewise be used, but doesn't have a ~~* shortcut?


(I've kept the INSERT wording so its very clear that the code *inserts* the poster's sig, username or timestamp of posting, and is not kept in the actual posted markup)
Comment 11 Tim Starling 2008-01-22 11:08:59 UTC
The suggested syntax (6 tildes) is terrible. 5 tildes was terrible too and I should have vetoed it at the time. I've changed the bug title so that we don't appear to be supporting such syntax. 

My preferred syntax for the feature in question is {{subst:USERNAME}}. {{USERNAME}} without the subst: prefix would break in some (preferably informative) way. 
Comment 12 FT2 2008-01-22 11:18:39 UTC
Sounds good.

Signature, timestamp, username... are there any other "elemental items" that're useful, or is it just those three in various combinations that we want to be able to add to the markup (via subst or tildes)?

Probably just those three, isn't it?
Comment 13 Pinky 2009-03-08 00:32:11 UTC
Same effect as {{subst:USERNAME}} can be achieved via {{subst:REVISIONUSER}} as of r48149
Comment 14 MZMcBride 2009-03-08 21:21:00 UTC
Tweaking bug resolution. WORKSFORME implies that this wasn't an issue prior to the bug being filed.

This is essentially a dupe of bug 10336. Marking as such.

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

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


Navigation
Links