Template:Retrieved: Difference between revisions

From PZwiki
m (Minor)
m (Automated Formatting)
 
(8 intermediate revisions by 3 users not shown)
Line 7: Line 7:


===Parameters===
===Parameters===
;<code>version</code>
;<code>version</code> or <code>1</code>
:the major Project Zomboid version this page's content is up to date to. The contents of this parameter will also be categorized on the page.
:the major Project Zomboid version this page's content is up to date to. The contents of this parameter will also be categorized on the page.
;<code>incver</code>
;<code>incver</code>
:the incremental (minor) Project Zomboid version this information is up to date to. Used to avoid creating many categories for a single release version.
:the incremental (minor) Project Zomboid version this information is up to date to. Used to avoid creating many categories for a single release version.
{{note|content=The <code>version</code> and <code>incver</code> parameters are now combined, so there is no longer any reason to use <code>incver</code>. It will remain optional for the time being for backwards compatibility.}}
;<code>date</code>
;<code>date</code>
:the date retrieved can be added. Accepted input formats are: ISO 8601 (yyyy-mm-dd), or any order using the month shorthand (dd mmm yyyy). E.g., <code>2022-12-12</code>, <code>12 dec 2022</code>.
:the date retrieved can be added. Accepted input formats are: ISO 8601 (yyyy-mm-dd), or any order using the month shorthand (dd mmm yyyy). E.g., <code>2022-12-12</code>, <code>12 dec 2022</code>.
;<code>version_link</code>
:custom link to be set. Typically used for older versions retrieved prior to the "Build xx" version scheme.
;<code>hidecat</code>
;<code>hidecat</code>
:if not blank (empty) page will not be added to the version category. ''This should only be used if absolutely necessary.''
:if not blank (empty) page will not be added to the version category. ''This should only be used if absolutely necessary.''
Line 18: Line 21:
==Examples==
==Examples==
===Basic usage===
===Basic usage===
* {tll|Retrieved|version{{=}}41|incver{{=}}78.16}} -> {{Retrieved|version=41|incver=78.16|hidecat=true}}
*{{tll|Retrieved|version{{=}}41|incver{{=}}78.16}} -> {{Retrieved|version=41|incver=78.16|hidecat=true}}
* {tll|Retrieved|version{{=}}41|incver{{=}}78.16|date{{=}}12 dec 2022}} -> {{Retrieved|version=41|incver=78.16|date=12 dec 2022|hidecat=true}}
*{{tll|Retrieved|version{{=}}41|incver{{=}}78.16|date{{=}}12 dec 2022}} -> {{Retrieved|version=41|incver=78.16|date=12 dec 2022|hidecat=true}}
* {tll|Retrieved}} -> {{Retrieved|hidecat=true}}
*{{tll|Retrieved}} -> {{Retrieved|hidecat=true}}


===Used with game code===
===Used with game code===
Line 37: Line 40:
{{#switch: {{{1|}}}
{{#switch: {{{1|}}}
| retrieved = Retrieved
| retrieved = Retrieved
| build - Build
| build = Build
| unknown = Unknown Version
| unknown = Unknown version
| #default = [[Category:Incorrect template usage]]
| #default = [[Category:Incorrect template usage]]
}}
}}
Line 49: Line 52:
}}
}}
{{ll|Category:Templates}}
{{ll|Category:Templates}}
</noinclude><includeonly>''<small>'''{{tt|name=Retrieved|default=Retrieved|arg1=retrieved}}''': {{#if: {{{version|}}}
</noinclude><includeonly>''<small>'''{{tt|name=Retrieved|default=Retrieved|arg1=retrieved}}''': {{#if: {{{1|{{{version|}}}}}}
| {{ll|Build {{{version}}}{{!}}{{tt|name=Retrieved|default=Build|arg1=build}} {{{version}}}{{#if: {{{incver|}}}
| {{#if:{{{version_link|}}}|[[{{{version_link}}}]]|{{ll|Build {{#explode:{{{1|{{{version}}}}}}|.}}{{!}}{{tt|name=Retrieved|default=Build|arg1=build}} {{{1|{{{version}}}}}}{{#if: {{{incver|}}}
   | .{{{incver}}}
   | .{{{incver}}}
   }}}}
   }}}}}}
| {{tt|name=Retrieved|default=Unknown Version|arg1=unknown}}
| {{tt|name=Retrieved|default=Unknown version|arg1=unknown}}
}}{{#if: {{{hidecat|}}}
}}{{#if: {{{hidecat|}}}
|| {{ll|Category:{{#if: {{{version|}}}
|| {{ll|Category:{{#if: {{{1|{{{version|}}}}}}
   | Version {{{version}}}{{#if:{{{incver|}}}
   | Version {{{1|{{{version}}}}}}{{#if:{{{incver|}}}
     | .{{{incver}}}
     | .{{{incver}}}
     }}
     }}
   | {{tt|name=Retrieved|default=Unknown Version|arg1=unknown}}
   | {{tt|name=Retrieved|default=Unknown version|arg1=unknown}}
   }}}}
   }}}}
}} {{#if:{{{date|}}}|({{#dateformat:{{{date}}}|dmy}})}}</small>''</includeonly>
}} {{#if:{{{date|}}}|({{#dateformat:{{{date}}}|dmy}})}}</small>''</includeonly>

Latest revision as of 14:26, 14 April 2024

Notebook.pngTemplate Documentation

The {{Retrieved}} can be used whenever something, such as code, is retrieved. This template indicates which version the information was retrieved from.

Usage

Used for displaying when game code was retrieved.

Parameters

version or 1
the major Project Zomboid version this page's content is up to date to. The contents of this parameter will also be categorized on the page.
incver
the incremental (minor) Project Zomboid version this information is up to date to. Used to avoid creating many categories for a single release version.
LightBulbBlue.png
The version and incver parameters are now combined, so there is no longer any reason to use incver. It will remain optional for the time being for backwards compatibility.
date
the date retrieved can be added. Accepted input formats are: ISO 8601 (yyyy-mm-dd), or any order using the month shorthand (dd mmm yyyy). E.g., 2022-12-12, 12 dec 2022.
version_link
custom link to be set. Typically used for older versions retrieved prior to the "Build xx" version scheme.
hidecat
if not blank (empty) page will not be added to the version category. This should only be used if absolutely necessary.

Examples

Basic usage

Used with game code

Retrieved: Build 41.78.16 (12 December 2022)

item TinOpener
	Weight		= 0.6,
	Type		= Normal,
	DisplayName	= Can Opener,
	Icon		= CanOpener,
	MetalValue 	= 3,

How to translate

This template is translatable.

Template code

Paste the following code into the <includeonly> tag of the translated template and translate the text after each = sign (except for #default =).

{{#switch: {{{1|}}}
| retrieved = Retrieved
| build = Build
| unknown = Unknown version
| #default = [[Category:Incorrect template usage]]
}}

Template documentation

Copy the code wrapped in the <noinclude> tag in this template and translate the text after doc = in the {{Documentation}} template.

{{Translation guide}} template should be removed from the translated documentation.

See also

Editors can experiment in this template's sandbox.