Last modified: 2009-03-08 21:21:00 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? :)
Also in section headers in templates, such as: "== Request by ~~~~~~ == {{{1}}} ..." where one would want to autofill the users name, not their signature.
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.
Created attachment 4568 [details] add six-tilde shortcut for user name I believe this is all that needs to be changed.
Note that ~<includeonly>~~~~</includeonly>~ would not work, the ~~~~ in the middle would be expanded to the signature, you would have to use ~~<includeonly>~~</includeonly>~~
True, dat :)
I'm very disinclined to add yet another tilde sequence. See also bug 10336.
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.
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.
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.
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)
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.
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?
Same effect as {{subst:USERNAME}} can be achieved via {{subst:REVISIONUSER}} as of r48149
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 ***