Template:Patch: Difference between revisions

From Ring of Brodgar
Jump to navigation Jump to search
m (Bare "&" versus "&" title parameter note.)
m (Text replacement - "<br clear=all>" to "<br style="clear:both;" />")
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly
<includeonly


>{{#if: {{{2|}}}
>{{#if: {{{1|}}}
| {{#switch: {{{1|}}}
| {{#if: {{#ask: [[patch_title::{{{1}}}]] | ?patch_title | mainlabel=- }}
 
  | {{#ask: [[patch_title::{{{1}}}]]
  | title =
    |?patch_title = title
    {{#if: {{#ask: [[patch_title::{{{2}}}]] | ?patch_title | mainlabel=- }}
    |?patch_date #ISO = date
    | {{#ask: [[patch_title::{{{2}}}]]
    |?patch_postid #- = postid
      |?patch_title = title
    | mainlabel = -
      |?patch_date #ISO = date
    | headers = hide
      |?patch_postid #- = postid
    | format = plainlist
      | mainlabel = -
    | template = Patch forum link
      | headers = hide
    | named args = yes
      | format = template
     }}{{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{#set:Patch_pages={{{1}}}}}{{#ifeq:{{{2|}}}|PCPa|[[Category:PCPa]]|[[Category:PCPm]]}}}}
      | template = Patch forum link
  | <br style="clear:both;" />{{error|Patch-title "{{{1}}}" Not Found! )|( <i>Template:Patch</i>: }}
      | template arguments = named
      }}
    | <br clear=all><strong>( <i>Template:Patch</i>: </strong><strong style="color:red">Patch-title "{{{2}}}" Not Found! )</strong>
     }}
 
  | date =
    {{#iferror: {{#expr: {{{2}}} + 1 }}
    | <br clear=all><strong>( <i>Template:Patch</i>: </strong><strong style="color:red">Invalid Date-string "{{{2}}}" Input! )</strong>
    | {{#if: {{#ask: [[patch_date::{{{2}}}]] | ?patch_date | mainlabel=- }}
      | {{#ask: [[patch_date::{{{2}}}]] |
        |?patch_title = title
        |?patch_date #ISO = date
        |?patch_postid #- = postid
        | mainlabel = -
        | headers = hide
        | format = template
        | template = Patch forum link
        | template arguments = named
        }}
      | <br clear=all><strong>( <i>Template:Patch</i>: </strong><strong style="color:red">Patch-date "{{{2}}}" Not Found! )</strong>
      }}
    }}<!-- iferror:end -->
 
  | postid =
    {{#iferror: {{#expr: {{{2}}} + 1 }}
    | <br clear=all><strong>( <i>Template:Patch</i>: </strong><strong style="color:red">Invalid Postid-sting "{{{2}}}" Input! )</strong>
    | {{#if: {{#ask: [[patch_postid::{{{2}}}]] | ?patch_postid | mainlabel=- }}
      | {{#ask: [[patch_postid::{{{2}}}]]
        |?patch_title = title
        |?patch_date #ISO = date
        |?patch_postid #- = postid
        | mainlabel = -
        | headers = hide
        | format = template
        | template = Patch forum link
        | template arguments = named
        }}
      | <br clear=all><strong>( <i>Template:Patch</i>: </strong><strong style="color:red">Patch-postid "{{{2}}}" Not Found! )</strong>
      }}
    }}<!-- iferror:end -->
 
  | #default =
    <br clear=all><strong>( <i>Template:Patch</i>: </strong><strong style="color:red">Invalid First Type-part "{{{1}}}" Input! )</strong>
 
  }}<!-- switch:end -->
 
| {{#if: {{{1|}}}
  | <br clear=all><strong>( <i>Template:Patch</i>: </strong><strong style="color:red">Missing Second Data-part Input! )</strong>
  | <br clear=all><strong>( <i>Template:Patch</i>: </strong><strong style="color:red">Missing First Type-part Input! )</strong>
   }}
   }}
| <br style="clear:both;" />{{error|Missing Patch-title Input! )|( <i>Template:Patch</i>: }}
}}</includeonly
}}</includeonly


><noinclude>
><noinclude>{{documentation}}<!-- debug --
 
;Usage
: <code><nowiki>{{ Patch | <INPUT-TYPE> | <INPUT-DATA> }}</nowiki></code> (''surrounding spaces not needed'')
:: INPUT-TYPE: "title", "date" or "postid" (''keywords are case sensitive'')
 
:1) <code><nowiki>{{Patch| title | Le Petit Fix }}</nowiki></code> (''title data is case sensitive'')
:2) <code><nowiki>{{Patch| date | 2015-11-10 }}</nowiki></code> (''only supports ISO date string input'')
:3) <code><nowiki>{{Patch| postid | 586368 }}</nowiki></code> (''mainly included for the sake of completeness'')
 
:Returns forum link: {{{{PAGENAME}}|title|Le Petit Fix}}
 
::- Output might change a bit over time.
::- Output style intended to stay html-inline-type. (''opposite of html-block-type'')
::- See the [[Game Updates]] page for available Patch title/date strings. (''Legacy patches not supported'')
 
;Note
: In title cases like "Dust &amp; Mud" use a bare "&", using "&amp;amp;" in the title parameter will not work.
:: (''This applies not to the actual Patch Property sub-object data setup'')
 
<!--
- ->
;Preview/Debug
;Preview/Debug


:00){{{{PAGENAME}} }}
:1){{{{PAGENAME}} }}
 
:2){{{{PAGENAME}}|foobar}}
:11){{{{PAGENAME}}|title}}
:3){{{{PAGENAME}}|Le Petit Fix}}
:12){{{{PAGENAME}}|date}}
:13){{{{PAGENAME}}|postid}}
:14){{{{PAGENAME}}|foobar}}
 
:21){{{{PAGENAME}}|title|title}}
:22){{{{PAGENAME}}|date|date}}
:23){{{{PAGENAME}}|postid|postid}}
:24){{{{PAGENAME}}|foobar|foobar}}
 
:32){{{{PAGENAME}}|date|1234-05-06}}
:33){{{{PAGENAME}}|postid|123456}}
 
:41){{{{PAGENAME}}|title| Le Petit Fix }}
:42){{{{PAGENAME}}|date| 2015-11-10 }}
:43){{{{PAGENAME}}|postid| 586368 }}
-->


<noinclude>
--><noinclude>

Latest revision as of 22:16, 14 November 2024

Template documentation (for the template shown above, sometimes hidden or invisible)
Usage
{{ Patch | <PATCH-NAME> }}


Example
Typing "... added in {{Patch|Le Petit Fix}} patch."
Returns "... added in Le Petit Fix (2015-11-10) patch."
The link links to the related patch development page on the Haven & Hearth forum.


Details
The patch-name is case sensitive.
See the Game Updates page for known/correct patch names.

Visit Template:Patch/doc to edit this text! (How does this work?)