Template:Version: Difference between revisions
(Big rework (Maybe won't break everything)) |
mNo edit summary |
||
(17 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
| revdate = Date | | revdate = Date | ||
| version = String | | version = String | ||
| note = | | lastmention = String | ||
| state = String | |||
| note = Wikitext | |||
<!-- Deletion --> | <!-- Deletion --> | ||
| deletion = Boolean | | deletion = Boolean | ||
Line 17: | Line 19: | ||
| cleanup = Boolean | | cleanup = Boolean | ||
| cleanupnote = Wikitext | | cleanupnote = Wikitext | ||
}}<onlyinclude><includeonly> | }}<onlyinclude><includeonly><!-- | ||
-->{{#vardefine:ChangelogSearchResult|{{#if:{{{nosearch|}}}|Unknown,|{{FindInChangelog|pageversion={{{1|}}}|name={{{name|}}}|search={{{search|}}}}}}}}}<!-- | |||
-->{{#vardefine:UpToDateOrOutdated|{{#explode:{{#var:ChangelogSearchResult}}|,|0}}}}<!-- | |||
-->{{#vardefine:LatestChangelogVersion|{{#explode:{{#var:ChangelogSearchResult}}|,|1}}}}<!-- | |||
-->{{#vardefine:UpToDateOrOutdated|{{#explode:{{ | |||
-->{{#vardefine:LatestChangelogVersion|{{#explode:{{ | |||
-->{{#vardefine:State|{{#switch:{{{1|}}} | -->{{#vardefine:State|{{#switch:{{{1|}}} | ||
|=Outdated | |=Outdated | ||
|{{Current version}}=UpToDate | |{{Current version}}=UpToDate | ||
|0.8.2.3=Legacy | |0.8.2.3=Legacy | ||
|#default={{#switch:{{#var:UpToDateOrOutdated}}|UpToDate|Unknown=UpToDate|#default=Outdated}} <!-- If finds the pagename mentioned in newer version changelogs then = Outdated, else UpToDate--> | |#default={{#switch:{{#var:UpToDateOrOutdated}}|UpToDate=UpToDate|Unknown={{#ifexpr:{{#explode:{{{1|}}}|.|0}}=0|Outdated|{{#if:{{{nosearch|}}}|Outdated|UpToDate}}}}|#default=Outdated}} <!-- If finds the pagename mentioned in newer version changelogs then = Outdated, else UpToDate--> | ||
}}}}<!-- | }}}}<!-- | ||
-->{{#if:{{{debug|}}}|<br> | |||
PageName: {{PAGENAME}}<br> | |||
NameParameter: {{{name|}}}<br> | |||
Search: {{{search|}}}<br> | |||
NoSearch: {{{nosearch|}}}<br> | |||
<br> | |||
FindInChangelog: {{FindInChangelog|pageversion={{{1|}}}|name={{{name|}}}|search={{{search|}}}}} | |||
ChangelogSearchResult: {{#var:ChangelogSearchResult}} | |||
UpToDateOrOutdated: {{#var:UpToDateOrOutdated}} | |||
LatestChangelogVersion: {{#var:LatestChangelogVersion}} | |||
FinalState: {{#var:State}} | |||
}}<!-- | |||
Border --> | Border --> | ||
Line 82: | Line 93: | ||
|}<!-- | |}<!-- | ||
-->{{# | -->{{#switch:{{NAMESPACE}}|Template=|User=|#default={{#switch:{{#var:State}} | ||
|UpToDate= | |UpToDate= | ||
|Legacy=[[Category:Legacy Articles]] | |Legacy=[[Category:Legacy Articles]] | ||
Line 96: | Line 107: | ||
| revdate = {{REVISIONTIMESTAMP:{{PAGENAME}}}} | | revdate = {{REVISIONTIMESTAMP:{{PAGENAME}}}} | ||
| version = {{{1|}}} | | version = {{{1|}}} | ||
| lastmention = {{#var:LatestChangelogVersion}} | |||
| state = {{#var:State}} | |||
| note = {{{2|}}} | | note = {{{2|}}} | ||
<!-- Deletion --> | <!-- Deletion --> | ||
| deletion = {{{deletion|}}} | | deletion = {{#if:{{{deletion|}}}|yes}} | ||
| deletionnote = {{{deletionnote|}}} | | deletionnote = {{{deletionnote|}}} | ||
<!-- Stubs --> | <!-- Stubs --> | ||
| stub = {{{stub|}}} | | stub = {{#if:{{{stub|}}}|yes}} | ||
| stubnote = {{{stubnote|}}} | | stubnote = {{{stubnote|}}} | ||
<!-- Cleanup --> | <!-- Cleanup --> | ||
| cleanup = {{{cleanup|}}} | | cleanup = {{#if:{{{cleanup|}}}|yes}} | ||
| cleanupnote = {{{cleanupnote|}}} | | cleanupnote = {{{cleanupnote|}}} | ||
}}}}</includeonly></onlyinclude> | }}}}</includeonly></onlyinclude> |
Latest revision as of 18:07, 25 December 2023
This template is used to easily keep track of page content versions, as well as other flags. It should be placed at the very start of an article.
All of the collected information can be found in the Page Status template.
All parameters are optional.
If using 'delete', 'stub', or 'cleanup', "yes" must be added after an "=" sign, otherwise it might be interpreted as an "anonymous parameter". See examples below.
This template searches changelogs using the FindInChangelog template, to see if the page name has been mentioned in a newer version than the page was last updated for. If it wasn't, the page is considered up to date, even if the page version is lower than current game version. Configuration details in the table below.
Field | Note | Example | Default |
---|---|---|---|
1 | Version
|
1.0.7.0 | |
2 | Note | Outdated images. | |
stub | Is the article a stub | yes | |
stubnote | Note regarding stub status | Add more content, images. | |
cleanup | Is the article marked for cleanup | yes | |
cleanupnote | Note regarding cleanup status | Page layout is hard to follow. | |
deletion | Is the article marked for deletion | yes | |
deletionnote | Note regarding deletion status | Duplicate page. | |
search | Adds additional keywords to search for in changelogs (Example for Structures page) | Wreck,Thalamus,Beacon,Outpost,Ruin | |
nosearch | Disables search functionality. Page will default to outdated unless it's exactly at the current game version | yes | |
debug | Displays debug info | yes | |
name | Overrides the pagename that the template searches for in the changelogs. For debug/demonstration usage. | screwdriver | {{PAGENAME}} |
Syntax
{{Version|<version number>|<what is outdated?>|deletion=yes|deletionnote=<why should the page be deleted?>|stub=yes|stubnote=<what needs to be added?>|cleanup=yes|cleanupnote=<what needs to be improved?>}}
Examples
{{Version}}
gives:
Data is potentially outdated | |
Last updated for an unknown version Last mentioned in changelog 1.4.6.0 The current game version is 1.4.6.0 |
{{Version|0.10.0.0|Outdated images.}}
gives:
Data is potentially outdated | |
Last updated for version 0.10.0.0 Last mentioned in changelog 1.4.6.0 The current game version is 1.4.6.0 Notes: Outdated Images |
{{Version|1.4.6.0|Partially outdated images.}}
gives:
Data is up-to-date | |
Last updated for version 1.4.6.0 The current game version is 1.4.6.0 Notes: Partially outdated images |
{{Version|deletion=yes|deletionnote=Duplicate page.}}
gives:
Page is a candidate for deletion | Data is potentially outdated | ||
Reason: Duplicate page. | Last updated for an unknown version Last mentioned in changelog 1.4.6.0 The current game version is 1.4.6.0 |
{{Version|0.8.2.3}}
gives:
This page is a Legacy article | |
Features described on this page are no longer in the game. |
{{Version|1.0.7.0|name=Screwdriver}}
gives:
Data is up-to-date | |
Last updated for version 1.0.7.0 Last mentioned in changelog 0.19.7.0 The current game version is 1.4.6.0 |
{{Version|1.0.7.0|name=Mudraptor}}
gives:
Data is potentially outdated | |
Last updated for version 1.0.7.0 Last mentioned in changelog 1.1.18.0 The current game version is 1.4.6.0 |
{{Version|1.1.18.0|name=Mudraptor}}
gives:
Data is up-to-date | |
Last updated for version 1.1.18.0 Last mentioned in changelog 1.1.18.0 The current game version is 1.4.6.0 |
{{Version|0.20.16.1|name=I Am That Guy|debug=y|nosearch=y}}
gives:
PageName: Version
NameParameter: I Am That Guy
Search:
NoSearch: y
FindInChangelog:
UpToDate,0.20.16.1
ChangelogSearchResult: Unknown,
UpToDateOrOutdated: Unknown
LatestChangelogVersion:
FinalState: Outdated
Data is potentially outdated | |
Last updated for version 0.20.16.1 The current game version is 1.4.6.0 |
{{Version|1.0.0.0|name=PageNameNotInChangelogs|search=search1,search2,search3,traitors|debug=y}}
gives:
PageName: Version
NameParameter: PageNameNotInChangelogs
Search: search1,search2,search3,traitors
NoSearch:
FindInChangelog:
Outdated,1.2.6.0
ChangelogSearchResult: Outdated,1.2.6.0
UpToDateOrOutdated: Outdated
LatestChangelogVersion: 1.2.6.0
FinalState: Outdated
Data is potentially outdated | |
Last updated for version 1.0.0.0 Last mentioned in changelog 1.2.6.0 The current game version is 1.4.6.0 |
The above documentation is transcluded from Template:Version/doc. (edit | history)
This template defines the table "PageStatus". View table.