Page MenuHomePhabricator

{{REVISIONUSER}} to print name of editor of current revision
Closed, ResolvedPublic

Description

Author: webmaster

Description:
As we have today ~~~ signs your name encased in square braces to link to your user page.
Adding a fourth tilde (~~~~) signs your name as above, but with the date/time.
A fifth tilde produces the date/time without your username.

I propose another option:
Substitution of your username, but without the square braces for linking.

For example, ~~ (or ~~~~~~) would produce Jamie. No links, no namespace, just my username. This is similar in nature to Bug 4196 , but they were asking for a {{MAGICWORD}} which would be continually rendered on each page call. My suggestion is a one time substitution, exactly in the same method as for ~~~~.

This was brought up in comment #9 of Bug 4196, by Peter Halasz, but no one replied, probably because it was not the same thing as was being considered in that bug. I can foresee no reason whatsoever why this would not be possible. Neither from a technical, nor usage/abuse standpoint.

Probably wouldn't be hard to implement if we stole some of the code from the current handler for ~~~~ with a few modifications.

Any thoughts?


Version: 1.11.x
Severity: enhancement

Details

Reference
bz10336

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:49 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz10336.
bzimport added a subscriber: Unknown Object (MLST).

I, personally, wouldn't recommend tildes at all, because two of them is too few and six of them is too much. There are other 'special' characters out there (or combinations thereof). :)

alexsm333 wrote:

This is already doable: go to you personal preferences, put your name as signature, check 'Raw signature' checkbox. Note that this will annoy a lot of people (myself included).

Marking as INVALID.

robchur wrote:

It isn't doable without messing about with preferences, *but* it adds another tilde-based string to a confusing repertoire and provides little practical benefit.

webmaster wrote:

@Alex,

This only works if you want to personally change this... my request is to allow for generic templating.

For instance, in wikinews, or similar, if you used 'inputbox' to create a new news article and wanted to sign the article as the author automagically, it would have something like:

Author = ~~ (or ~~~~~~, or other combo)

BUT, if the template categorizes based on the Author field, because ~~~~ produces brackets around the user name, it would categorize it as [[Category:[[User:Jamie|Jamie]]]] instead of [[Category:Jamie]] as desired.

@Rob,

I very much disagree that it provides little benefit; I am not even the first to suggest/request such a feature.

As for 'confusing repertoire', that is only in the mind of the beholder.

I would like a second opinion.

It should be fairly easy to implement for someone who knows the MW code well, and it would provide a feature that several sites would find greatly useful, including Wikinews*.

(*As stated in some other bug)

ayg wrote:

This would be potentially useful for stuff like templates, I *guess*, but as far as implementation goes, how about a magic word {{LASTEDITOR}}? It could be substed to achieve this effect, or left unsubsted for who knows what ungodly purposes. There should be no caching issue, since after all the caches are cleared on every edit.

I agree that this would be of somewhat limited utility, but I think we long ago passed the point of throwing out magic words that were of somewhat limited utility . . . how many variables do we have now? :) People want to create insane labyrinthine templates for all sorts of crazy purposes, and if we caved on ParserFunctions, there's probably no point in trying to retreat now.

webmaster wrote:

Brion,

Can you please comment on this since Rob seems intent to close as wontfix?

Hmmmm, I'm not sure I see a big use case for this. Seems to me that signing your name on something you'd want it to be linked, so ~~~ already gets the job done.

ayg wrote:

Not if it's, e.g., a template parameter that's used to construct subpages or something. Consider, I dunno, {{userinfo}} = {{userinfo/real|{{{1| {{<includeonly>subst:</includeonly>LASTEDITOR}} }}, {{userinfo/real}} = [[User:{{{1}}}|{{{1}}}]] ([[User talk:{{{1}}}|talk]], [[Special:Contributions/{{{1}}}|contribs]], [[Special:Log/block/{{{1}}}|block log]], ...). Then it would be a generic-use template which, if substed, would default to the posting editor. Similar constructs could be useful in, e.g., Wikipedia RfA templates, or instructions for how to set up links to a certain type of user subpage. {{LASTEDITOR}} could even conceivably be useful when unsubsted, like to display a message at the top of a page if the last editor wasn't an admin or the owner of the page or something. And as I say, not going to mess with parser cache, is it? I don't see any reason not to do this.

webmaster wrote:

That is one of the many possible reasons, yes... for inclusion into a template parameter.
Such that the template automagic doesn't turn:

[[Category:~~'s Pictures]] into [[Category:[[User:Jamie|Jamie]]'s Pictures]]

when we want

[[Category:~~'s Pictures]] to be [[Category:Jamie's Pictures]] or something like that.

Um... What Simetrical said, too. ;)

webmaster wrote:

I would like to see some other input other than from Rob who seems dead-set against this.
Simetrical and I are both on the same page and Brion didn't say no... He only implied there might not be use for such a feature, yet we have both provided usages.

Our wiki would make great use of this and I am sure we are just the tip of an iceberg.

~~~ simply doesn't fulfill the need in this case.

Would you concede that this could be useful and that it (at some point down the road) shouldn't be too hard to implement/integrate using already existing code?

Perhaps something like {{REVISIONUSER}} (matching existing {{REVISIONTIMESTAMP}}, {{REVISIONID}}, etc). That could be subst:ed via a template, which I believe would have the desired result.

webmaster wrote:

Sounds promising... :)
{{REVISIONUSER}} might open the range of possible usages even futher...

Do you think that would that be as easy to implement and as easy for user adoption as ~~? (or whatever syntax)

Isn't bug #4196 in a way a duplicate of this?

ayg wrote:

No. If I edit a page and then you view it, this bug ({{REVISIONUSER}}) would give "Simetrical", bug 4196 ({{USERNAME}}) would give "White Cat" (or whatever your name is). They're different.

FT2.wiki wrote:

Seems to be the same as bug 12733 which contemplates adding {{subst:USERNAME}}, {{subst:LASTEDITOR}} and so on in place of the cumbersome and limiting "~~~~~" format. (Per Tim #c11, the "subst:" should be used and it should break "in an elegant way" if omitted)

ayg wrote:

No, it's really not related at all. There is no reason {{REVISIONUSER}}/{{LASTEDITOR}}/whatever you call it has to be substed, ever. If it's not substed, it will just update to the new name every time an edit is made. This is a totally different situation from bug 12733, which is really a dupe of bug 4196.

I came here to request this exact same thing: a magic word {{REVISIONUSER}} and also one for the username of the creator of a page, e.g. {{CREATEUSER}}.

soxred93 wrote:

a REALLY bad hack

Well, it's a REALLY crappy hack, but it works.

Attached:

ayg wrote:

Bleh, more pre-save transform magic. A subst:-able magic word would be considerably nicer. Especially since no other UNDERSCOREWORD currently substs like that.

  • Bug 12733 has been marked as a duplicate of this bug. ***

happy.melon.wiki wrote:

*** Bug 6553 has been marked as a duplicate of this bug. ***