Jump to content

MediaWiki talk:Listfiles-summary

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Linking to files list for specific user on Commons

[edit]

What about linking from Special:ListFiles/XY to the same user's list on Commons? Currently, the general files list on Commons is linked. --Leyo 09:13, 11 June 2011 (UTC)[reply]

Protected edit request on 18 January 2022

[edit]

When you are at Special:ListFiles/Jonteemil, the link should lead to the upload log with my username as performer, as c:MediaWiki:Listfiles-summary does. Right now it leads to the generic upload log without any performer filled in. Jonteemil (talk) 17:00, 18 January 2022 (UTC)[reply]

 Not done @Jonteemil: at the least we need more information. The upload log link on commons points to:
  • [{{fullurl:Special:Log/upload|user={{urlencode:{{#titleparts:{{PAGENAME}}|1|2}}}}}} upload log]
The log links here points to - the exact same thing:
  • [{{fullurl:Special:Log/upload|user={{urlencode:{{#titleparts:{{PAGENAME}}|1|2}}}}}} upload log]
What specifically do you want changed on this page? Please type in the exact edit in the form of "Change X to Y" that you would make if this page wasn't protected below, then reactivate the edit request for review. Best regards, — xaosflux Talk 17:40, 18 January 2022 (UTC)[reply]
@Xaosflux: Huh, you are correct. The link does lead to the upload log with me as performer, extacly like on Commons. I see know what is weird, but the problem is the same at Commons. If you check the "Include old versions of files" checkbox the link does not lead to the upload log with me as performer, but rather the generic upload log. Even if you uncheck it, which should be exactly as before, the link still leads to the generic upload log. Do you know what is weird here?Jonteemil (talk) 17:55, 18 January 2022 (UTC)[reply]
@Jonteemil: hmm - I think so, checking and will ping you back; expect it will require upstream work, but that will fix it everywhere. — xaosflux Talk 18:01, 18 January 2022 (UTC)[reply]
Okay, that sounds good, thanks.Jonteemil (talk) 18:03, 18 January 2022 (UTC)[reply]
@Jonteemil: OK, so looked in to this. The default message for this page does not contain this link at all, and the parser does not pass any variables (such as the ?user= value) back to this message to act on. Some projects (like here and commons) have done a local hack using the #titleparts function - but that relies on something literally being in the url separated by slashes - as this page is in your first use case. To do more, a feature request could be entered to request that this special page make the values available as variables, at that point we could properly integrate them to the message. To request this feature be added please submit a software feature request - feel free to tag me and to link to this discussion. It's also OK if you don't fill it out perfectly, others will help fix it up! Best regards, — xaosflux Talk 18:09, 18 January 2022 (UTC)[reply]
@Xaosflux: Okay, I think I have gotten a grasp on what is and leads to the problem. #titleparts finds what is after the slash in Special:ListFiles/Jonteemil but when the URL is changed to Special:ListFiles&user=Jonteemil #titleparts can't find what's after the slash because there is no slash. I've done some "research" and come up with a question. There is a link to Special:ListFiles/Jonteemil on Special:Contributions/Jonteemil. I guess this linking is made in the same way: Special:ListFiles/{{#titleparts:{{PAGENAME}}|1|2}}? I can't find the MediaWiki page for it so can't know for sure but it seems logical, anyway, when you tamper with the URL a bit so it looks like this: https://en.wikipedia.org/w/index.php?target=Jonteemil&title=Special:Contributions, there is no slash here yet the upload link still takes me to Special:ListFiles/Jonteemil. Do you know how this is the case, and can the same be made to the upload log link in Special:ListFiles?Jonteemil (talk) 22:19, 18 January 2022 (UTC)[reply]
@Jonteemil: in that contributions link it is hard coded in the software to produce those links (that is one way to do it), the intermediate way is for the page to produce variables that we could use locally (that's what I mentioned above), the hacky way is #titleparts that we are using on that page. Either the first or second of those could work - but both require software changes, not just message updates. Software changes are done by devs following requests on phabricator (which I linked to above - WP:BUG for directions). Does that help explain what is going on? — xaosflux Talk 23:50, 18 January 2022 (UTC)[reply]
@Xaosflux: I see, thanks for you research. I have now filed the feature request, see phab:T299474.Jonteemil (talk) 00:29, 19 January 2022 (UTC)[reply]