Template:MyUploads/h-photostream
Given some pattern-strings, the template will return an unordered list of the latest uploads. DISCLAIMER: This templates makes use of a dirty hack and may therefore break in future.
Usage
{{MyUploads |user= |limit= |offset= }}
Advanced Examples:
{{MyUploads|user=Rillke|limit=1|unstripPatternEach=1|patternWhole=%content%|patternEach={{:File<nowiki/>:%file%}}}}
would print content of the file description page of the last uploaded file by the specified user.{{MyUploads|user=Rillke|limit=1|unstripPatternEach=1|patternWhole=%content%|patternEach=[[File<nowiki/>:%file%|thumb|%file%, %size%, %time%]]}}
shows the last uploaded file as thumbnail. See second example.
Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
user name | User whose uploads to list. | empty | optional | |
limit count | How many files to list. | 5 | optional | |
offset | Timestamp (Format currently YYYYMMDDhhmmss) to start listing reverse-chronological from. You may obtain this by going to Special:ListFiles and clicking back until you reach the point you want to start listing from. | empty | optional | |
patternWhole | The pattern for the "outer construct". '%content%' will be replaced with the content created by iterating over all files and filling the unstripPatternEach parameter | <gallery mode="packed" widths="400">%content%\n</gallery> | optional | |
unstripPatternWhole | Whether to replace strip-markers (in case you want, simply include the parameter). There appears to be an issue; doing doesn't look successful. Strip markers (a character sequence starting and ending with a special character) are inserted by the MediaWiki parser and they replace, for example nowiki-tags so their content is not processed by the parser and, by default, also not by Lua. | empty | optional | |
patternEach | The pattern for the "inner construct" that will be used for each file. %file% will be replaced with the file's title (not including the namespace File:), %time% with the upload time (format may vary), %size% with the file size. | \n%file%|File was uploaded on %time% and has a size of %size% | optional | |
unstripPatternEach | Whether to replace strip-markers (in case you want, simply include the parameter). Strip markers (a character sequence starting and ending with a special character) are inserted by the MediaWiki parser and they replace, for example nowiki-tags so their content is not processed by the parser and, by default, also not by Lua. | empty | optional | |
isGallery | Because unstripping using unstripPatternWhole seems not to work, indicates that patternWhole is just a parameter-string inserted into a gallery-tag: The following example shows where patternWhole is inserted if this parameter is set: <gallery patternWhole></gallery> | empty | optional |
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard. Existing template documentation Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information Given some pattern-strings, the template will return an unordered list of the latest uploads. DISCLAIMER: This templates makes use of a dirty hack and may therefore break in future.
|
Additional information
The template is intended to be used in the following namespaces: the User namespace
The template is intended to be used by the following user groups: all users
Relies on:
Example
{{MyUploads|user=Rillke|limit=10|offset=20120601111111}}
renders as:
Example 2
{{MyUploads |user=Rillke |limit=1 |unstripPatternEach=1 |patternWhole=%content% |patternEach=[[File<nowiki/>:%file%|thumb|Rillke's latest upload: %file%, %size%, %time%]] }}
Localization
This template is not intended to be localized.