Template:Patch: Difference between revisions

From Ring of Brodgar
Jump to navigation Jump to search
(turn debug off)
(Ditch "date" and "postid" as possible input. (Not used. And having just one input type makes some other stuff easier))
Line 18: Line 18:
     | <br clear=all>{{error|Patch-title "{{{2}}}" Not Found! )|( <i>Template:Patch</i>: }}
     | <br clear=all>{{error|Patch-title "{{{2}}}" Not Found! )|( <i>Template:Patch</i>: }}
     }}
     }}
  | date =
    {{#iferror: {{#expr: {{{2}}} + 1 }}
    | <br clear=all>{{error|Invalid Date-string "{{{2}}}" Input! )|( <i>Template:Patch</i>: }}
    | {{#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
        | named args = yes
        }}
      | <br clear=all>{{error|Patch-date "{{{2}}}" Not Found! )|( <i>Template:Patch</i>: }}
      }}
    }}<!-- iferror:end -->
  | postid =
    {{#iferror: {{#expr: {{{2}}} + 1 }}
    | <br clear=all>{{error|Invalid Postid-string "{{{2}}}" Input! )|( <i>Template:Patch</i>: }}
    | {{#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
        | named args = yes
        }}
      | <br clear=all>{{error|Patch-postid "{{{2}}}" Not Found! )|( <i>Template:Patch</i>: }}
      }}
    }}<!-- iferror:end -->


   | #default =
   | #default =
Line 70: Line 34:
;Usage
;Usage
: <code><nowiki>{{ Patch | <INPUT-TYPE> | <INPUT-DATA> }}</nowiki></code> (''surrounding spaces not needed'')
: <code><nowiki>{{ Patch | <INPUT-TYPE> | <INPUT-DATA> }}</nowiki></code> (''surrounding spaces not needed'')
:: INPUT-TYPE: "title", "date" or "postid" (''keywords are case sensitive'')
:: INPUT-TYPE: "title" (''keyword is case sensitive'')


:1) <code><nowiki>{{Patch| title | Le Petit Fix }}</nowiki></code> (''title data is 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}}
:Returns forum link: {{{{PAGENAME}}|title|Le Petit Fix}}
Line 93: Line 55:


:11){{{{PAGENAME}}|title}}
:11){{{{PAGENAME}}|title}}
:12){{{{PAGENAME}}|date}}
:12){{{{PAGENAME}}|foobar}}
:13){{{{PAGENAME}}|postid}}
:14){{{{PAGENAME}}|foobar}}


:21){{{{PAGENAME}}|title|title}}
:21){{{{PAGENAME}}|title|title}}
:22){{{{PAGENAME}}|date|date}}
:22){{{{PAGENAME}}|foobar|foobar}}
:23){{{{PAGENAME}}|postid|postid}}
:24){{{{PAGENAME}}|foobar|foobar}}
 
:32){{{{PAGENAME}}|date|1234-05-06}}
:33){{{{PAGENAME}}|postid|123456}}


:41){{{{PAGENAME}}|title| Le Petit Fix }}
:41){{{{PAGENAME}}|title|Le Petit Fix}}
:42){{{{PAGENAME}}|date| 2015-11-10 }}
:43){{{{PAGENAME}}|postid| 586368 }}
-->
-->


<noinclude>
<noinclude>

Revision as of 13:30, 7 November 2020


Usage
{{ Patch | <INPUT-TYPE> | <INPUT-DATA> }} (surrounding spaces not needed)
INPUT-TYPE: "title" (keyword is case sensitive)
1) {{Patch| title | Le Petit Fix }} (title data is case sensitive)
Returns forum link: Le Petit Fix (2015-11-10)
- 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 & Mud" use a bare "&", using "&amp;" in the title parameter will not work.
(This applies not to the actual Patch Property sub-object data setup)