Page MenuHomePhabricator

Merge Special:NewFiles with Special:ListFiles
Open, NormalPublic

Description

This enhancement request replaces Bug 28074 - "Add support for transclusion to Special:NewFiles/<username>"

In bug 28074 the use case of user motivation by enabling an embeddable gallery of ones own images is discussed. The present situation is:

  • Special:NewFiles has a gallery style and shows newest images first, but can neither be restricted to a user, nor is it embeddable.
  • Special:ListFiles has a technical tabular style with thumbs, shows newest images first and is embeddable.

PROPOSAL:

  1. Add the gallery display of NewFiles as an option to ListFiles in a syntax that can be used during embedding (e.g. Special:NewFiles/Gallery)
  2. Add an option how many files are shown in a syntax that can be used during embedding (e.g. Special:NewFiles/<username>/n=20)
  3. Dissolve the present, largely duplicated NewFiles and make it a redirect to the gallery style of Special:NewFiles

This would close bug 28074 (gallery of user-images can be embedded on user pages) and probably also bug 14964 (ListFiles provides full functionality of NewFiles mentioned in that bug, and the toggle Gallery/List would then be implemented).


Version: 1.20.x
Severity: enhancement

Details

Reference
bz30608

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz30608.
bzimport added a subscriber: Unknown Object (MLST).

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

Update to the present situation:

  • Special:ListFiles has a technical tabular style with thumbs, shows newest

images first, can be restricted to a user, and is embeddable. It primarily misses a non-technical gallery style to serve the use case of user-galleries.

Note, if we added that option to special:listfiles, I'm not sure what syntax we'd use to specify use that option when embedding (I suppose /'s, multiple params to special page transclusions are so icky...)

I would use "/", perhaps with "=" sign in them. If there is an equal sign, it is a named parameter. If not, or the parameter is not recognized, it is the only unnamed parameter, i.e. in this case the user name. So n=20 is number of images per page, style=gallery or style=list. The following would be valid then:

Special:NewFiles/<username>
Special:NewFiles/<username>/n=20
Special:NewFiles/n=20/<username>/style=gallery
Special:NewFiles/n=10/style=gallery/<username>
etc.

(In reply to comment #4)

Special:NewFiles/<username>/n=20
Special:NewFiles/n=20/<username>/style=gallery
Special:NewFiles/n=10/style=gallery/<username>
etc.

Is there a reason to introduce parameter parsing code here? The following would be equivalent and wouldn't require new parsing code:

Special:NewFiles/<username>?n=20
Special:NewFiles/<username>?n=20&style=gallery

Also, it would make caching easier.

Bryan.TongMinh wrote:

(In reply to comment #5)

(In reply to comment #4)
> Special:NewFiles/<username>/n=20
> Special:NewFiles/n=20/<username>/style=gallery
> Special:NewFiles/n=10/style=gallery/<username>
> etc.

Is there a reason to introduce parameter parsing code here? The following
would be equivalent and wouldn't require new parsing code:

Special:NewFiles/<username>?n=20
Special:NewFiles/<username>?n=20&style=gallery

Also, it would make caching easier.

Transclusion.

Dare I suggest we take this chance to make transcludable special pages behave more like templates/parserfunctions.

ie: {{Special:NewFiles/Dantman|n=20|style=gallery}}

ie: {{Special:NewFiles/Dantman|n=20|style=gallery}}

+1 +1 +1

ie: {{Special:NewFiles/Dantman|n=20|style=gallery}}

From a user perspective: Yes, please!
That would be:

Special:NewFiles/<username>
Special:NewFiles/<username>|n=20
Special:NewFiles/n=20|<username>|style=gallery
Special:NewFiles/n=10|style=gallery|<username>
etc.

(In reply to comment #7)

Dare I suggest we take this chance to make transcludable special pages behave
more like templates/parserfunctions.

ie: {{Special:NewFiles/Dantman|n=20|style=gallery}}

I just discovered this was already done by iAlex as part of Bug 15558. (yay!)

It looks like all the issues here have been handled. If you reopen, please make clear what still needs to be done.

I think it has not been adressed, so all needs to be done. Please correct me if I am wrong.

The last comment by bawolff refers to "Allow includable special pages to be parameterized using wiki syntax", not to the issue "Merge Special:NewFiles with Special:ListFiles"

(In reply to comment #12)

I think it has not been adressed, so all needs to be done. Please correct me if
I am wrong.

The last comment by bawolff refers to "Allow includable special pages to be
parameterized using wiki syntax", not to the issue "Merge Special:NewFiles with
Special:ListFiles"

Basically that, but more explicitly what needs to be done:
*Give Special:listfiles a style parameter (for style=list)
*Make Special:newfiles a redirect special page to special:listfiles (With proper mode parameter)

What is done:
*{{Special:listfiles/Bawolff|limit=2}} works fine (but it makes table output)

As an aside, in regards to comment 9, given the way stuff is organized right now, I don't think we'd have it so you could re-arrange which parameter is the username (so {{Special:listfiles/limit=2|Bawolff}} would not work. All the other parameters except for what's directly after the / could be re-arranged though)

Krinkle removed a subscriber: Krinkle.Sep 26 2016, 8:33 PM