Difference between revisions of "Template:Own based/doc"
Mediawiki>Sarang m (-link) |
m (1 revision imported) |
Latest revision as of 16:04, 24 January 2022
This is a documentation subpage for . It contains usage information, categories and other content that is not part of the original template page. |
30px | This template uses Lua: |
|source=
parameter of the {{Information}} templateto render the words "Own work based on:" in the language specified in the user's preferences.
Usage
{{Own based}}
Any namespace declaration (e.g. File:, Image:) is ignored. Only items from the FILE namespace can be used.
Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
1 | Name(s) of the image (with or without namespace), or just an extension. | empty | optional | |
2, 3, ... ∞ | names of more files; for each empty parameter, the name of parameter 1 is used | empty | optional | |
name or n | (Global display name for files) normally not useful if more than 1 file individual parameter(s) | empty | optional | |
dis or d | Global pixel size value, to display the image individual size parameter{s} | empty | optional | |
opt or o | Global additional option for {{F}}, like "l" (left) or "b" (bordered) individual option(s) | empty | optional | |
hil or h | (Global hilite tag) normally not useful if more than 1 file as e.g. b, i, u, | empty | optional | |
par4 or q | Global 4th parameter for {{F}} like "n" (nolink) or "+" or "-" individual more parameter(s) or options | empty | optional | |
par5 or r | Global 5th parameter for {{F}} individual more parameter(s) or options | empty | optional | |
wiki or l | Global ISO 639-1 code for a Wikipedia sisterprojekt individual code parameter(s) | empty | optional | |
lang or i | Global ISO 639-1 code for SVG switch internationalization individual code parameter(s) | empty | optional | |
by or b | Global author name individual author name(s) — or byx (see explanation) | empty | optional | |
mod or m | Global code for modification of the user link(s) individual modifications (as t , w , wt ) | empty | optional |
Additional information
The template is intended to be used in the following namespaces: the File namespace
The template is intended to be used by the following user groups: all users
Placement: In the "⧼wm-license-information-source⧽" parameter of the {{Information}} template (or the respective parameter of similar templates) or just below this template
Example
{{Own based|Example.jpg|by=example|+}}
renders as:
Own work based on: File:Example.jpg by +
⧼Seealso⧽
- {{Own}}
- {{Own using}}
- {{Own taken}}
- {{Own derived}} — an option when it is needed ?
- {{Self-photographed}}
- {{Own work by original uploader}}
- {{AutVec}}, {{PNG available}}, {{SVG available}}
Note
When the file name of a file is the same it will be enough just to specify the file type by e.g.
- .png (or short:
.p
or shorter:.
) - .jpg (or short:
.j
) - .gif (or short:
.g
) - .svg (or short:
.s
) - .tif (or short:
.t
) - .xcf (or short:
.x
) - .pdf (or any other extension - case sensitive)
Example: {{ Own based | .j }}. or see 4CVNK.svg
If a file name starts with a dot, prefixing it with a namespace like File:.Xyz.jpeg
can avoid conflicts.
See a complete description of the replacement.
{{Own based|Example.jpg|.tiff}} renders as: Own work based on:Lua error: expandTemplate: template "Conj-and" does not exist.
{{Own based| Example.svg | . | .j | .g }} renders as: Own work based on:Lua error: expandTemplate: template "Comma" does not exist.
Pseudo file names
Like a file name can be specified, preferably at the last positions
- + or - (a plus sign, or a minus sign) to require the display with namespace(s)
- {{Own based|Example.jpg|–}} renders as: Own work based on: File:Example.jpg
- × (the multiplication sign) to avoid the conjunctional "and" before the last file name:
- {{Own based|Example.jpg|.s|.g|×}} renders as: Own work based on:Lua error: expandTemplate: template "Comma" does not exist.
- x or X (an "x", lower or upper case) to enable the textual description of other bases:
{{Own based|Example.svg|Example.jpg|by1=example|x}} more based_on
renders as:
Own work based on:Lua error: expandTemplate: template "Comma" does not exist. more based_on
Because of many transclusions with wrong file names, now a workaround is made that when only one file is specified,
and with either "[" or "{" as the first character, it won't be handled by the module and Template:F but directly displayed.
By
Parameter by
displays a user name after the file[s] display.
Instead of single user id
s, Userlists can be specified.
If parameter[s] by1
or b1
[by2/b2, ...] is[are] used, each such user name is displayed immediately after that file;
when parameter b1
is used (with or without a value), each file is displayed at a new line.
Examples:
{{Own based}} → Own work based on:
{{Own based|:= }} → Own work based on
{{Own based|:={{LangSwitch|en= the following images:|default=:}}}} → Own work based on:
{{Own based|Example.svg|by=Example}}
renders as:
Own work based on: Example.svg by example
{{Own based|Example.svg|by=Example|+}}
renders as:
Own work based on: File:Example.svg by +
{{Own based|Example.svg|by1=Example}}
renders as:
Own work based on: Example.svg by example
{{Own based|Example.jpg|b1=Example}}
renders as:
Own work based on:
✦ Example.jpg by example
{{Own based|Example.svg|by={{Ud|Example}}|l=de}}
renders as:
Own work based on: Example.svg by Template:Ud
{{Own based|Example.jpg|.s|.g|by1=example|h1=u|h2=s|b3=username|o3=n}}
renders as (hilite on 1 and 2, nolink on 3):
Own work based on:Lua error: expandTemplate: template "Comma" does not exist.
{{Own based|Example.jpg|Example.svg|Example.gif|b1=example|b3=TalkUser|m3=t}}
renders as (vertical table because of b1):
Own work based on:
✦ Example.jpg by example
✦ Example.svg
✦ Example.gif by TalkUser
Localization
This template is localized by utilizing MediaWiki namespace messages. These can be translated at translatewiki.net (current translations).