Difference between revisions of "Template:NH"

From Nookipedia, the Animal Crossing wiki
m (Protected "Template:NH": High-visibility template ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(Converting the big one to a Lua module; moving documentation to its own page. Seems like we're done with this conversion.)
Tag: Replaced
 
Line 1: Line 1:
{{#if: {{{1|}}}
+
{{#invoke:MediumLink|main|medium=Animal Crossing: New Horizons|short=New Horizons|shorter=ACNH|shortest=NH|{{{1|}}}|{{{2|}}}|{{{3|}}}}}<noinclude>{{Pp|full}}{{Documentation}}[[Category:Link templates]]</noinclude>
    | {{#switch: {{{1|}}}
 
          | nolink = {{#if: {{{2|}}}
 
              | {{#switch: {{{2|}}}
 
                    | short = {{#if: {{{3|}}}
 
                        | {{#ifeq: {{{3|}}}
 
                              | sm
 
                              | <small>''New Horizons''</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | ''New Horizons''
 
                        }}
 
                    | shorter = {{#if: {{{3|}}}
 
                        | {{#ifeq: {{{3|}}}
 
                              | sm
 
                              | <small>ACNH</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | ACNH
 
                        }}
 
                    | shortest = {{#if: {{{3|}}}
 
                        | {{#ifeq: {{{3|}}}
 
                              | sm
 
                              | <small>NH</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | NH
 
                        }}
 
                    | sm = {{#if: {{{3|}}}
 
                        | {{#switch: {{{3|}}}
 
                              | short = <small>''New Horizons''</small>
 
                              | shorter = <small>ACNH</small>
 
                              | shortest = <small>NH</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | <small>''Animal Crossing: New Horizons''</small>
 
                        }}
 
                    | 2<sup>nd</sup> parameter invalid
 
                    }}
 
              | ''Animal Crossing: New Horizons''
 
              }}
 
          | short = {{#if: {{{2|}}}
 
              | {{#switch: {{{2|}}}
 
                    | sm =  {{#if: {{{3|}}}
 
                        | {{#ifeq: {{{3|}}}
 
                              | nolink
 
                              | <small>''New Horizons''</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | <small>''[[Animal Crossing: New Horizons|New Horizons]]''</small>
 
                        }}
 
                    | nolink =  {{#if: {{{3|}}}
 
                        | {{#ifeq: {{{3|}}}
 
                              | sm
 
                              | <small>''New Horizons''</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | ''New Horizons''
 
                        }}
 
                    | 2<sup>nd</sup> parameter invalid
 
                    }}
 
              | ''[[Animal Crossing: New Horizons|New Horizons]]''
 
              }}
 
          | shorter = {{#if: {{{2|}}}
 
              | {{#switch: {{{2|}}}
 
                    | sm =  {{#if: {{{3|}}}
 
                        | {{#ifeq: {{{3|}}}
 
                              | nolink
 
                              | <small>ACNH</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | <small>[[Animal Crossing: New Horizons|ACNH]]</small>
 
                        }}
 
                    | nolink =  {{#if: {{{3|}}}
 
                        | {{#ifeq: {{{3|}}}
 
                              | sm
 
                              | <small>ACNH</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | ACNH
 
                        }}
 
                    | 2<sup>nd</sup> parameter invalid
 
                    }}
 
              | [[Animal Crossing: New Horizons|ACNH]]
 
              }}
 
          | shortest = {{#if: {{{2|}}}
 
              | {{#switch: {{{2|}}}
 
                    | sm =  {{#if: {{{3|}}}
 
                        | {{#ifeq: {{{3|}}}
 
                              | nolink
 
                              | <small>NH</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | <small>[[Animal Crossing: New Horizons|NH]]</small>
 
                        }}
 
                    | nolink =  {{#if: {{{3|}}}
 
                        | {{#ifeq: {{{3|}}}
 
                              | sm
 
                              | <small>NH</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | NH
 
                        }}
 
                    | 2<sup>nd</sup> parameter invalid
 
                    }}
 
              | [[Animal Crossing: New Horizons|NH]]
 
              }}
 
          | sm = {{#if: {{{2|}}}
 
              | {{#switch: {{{2|}}}
 
                    | short = {{#if: {{{3|}}}
 
                        | {{#ifeq: {{{3|}}}
 
                              | nolink
 
                              | <small>''New Horizons''</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | <small>''[[Animal Crossing: New Horizons|New Horizons]]''</small>
 
                        }}
 
                    | shorter = {{#if: {{{3|}}}
 
                        | {{#ifeq: {{{3|}}}
 
                              | nolink
 
                              | <small>ACNH</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | <small>[[Animal Crossing: New Horizons|ACNH]]</small>
 
                        }}
 
                    | shortest = {{#if: {{{3|}}}
 
                        | {{#ifeq: {{{3|}}}
 
                              | nolink
 
                              | <small>NH</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | <small>[[Animal Crossing: New Horizons|NH]]</small>
 
                        }}
 
                    | nolink = {{#if: {{{3|}}}
 
                        | {{#switch: {{{3|}}}
 
                              | short = <small>''New Horizons''</small>
 
                              | shorter = <small>ACNH</small>
 
                              | shortest = <small>NH</small>
 
                              | 3<sup>rd</sup> parameter invalid
 
                              }}
 
                        | <small>''Animal Crossing: New Horizons''</small>
 
                        }}
 
                    | 2<sup>nd</sup> parameter invalid
 
                    }}
 
              | <small>''[[Animal Crossing: New Horizons]]''</small>
 
              }}
 
          | 1<sup>st</sup> parameter invalid
 
          }}
 
    | ''[[Animal Crossing: New Horizons]]''
 
    }}<noinclude>
 
==Usage==
 
The template accepts up to three parameters:
 
*<tt>'''nolink'''</tt> - Will remove link but still produce game name in italics (e.g. ''Animal Crossing: New Horizons''). Can be used in combination with <tt>'''sm'''</tt> and one of the following: <tt>'''short'''</tt>, <tt>'''shorter'''</tt>, <tt>'''shortest'''</tt>.
 
*<tt>'''sm'''</tt> - Will make the name small text but still produce game name in italics (e.g. <small>''Animal Crossing: New Horizons''</small>). Can be used in combination with <tt>'''nolink'''</tt> and one of the following: <tt>'''short'''</tt>, <tt>'''shorter'''</tt>, <tt>'''shortest'''</tt>.
 
*<tt>'''short'''</tt> - Will provide shorthand links (e.g. ''[[Animal Crossing: New Horizons|New Horizons]]''). Can be used in combination with <tt>'''nolink'''</tt> and <tt>'''sm'''</tt>.
 
*<tt>'''shorter'''</tt> - Will produce long acronyms instead of title names (e.g. [[Animal Crossing: New Horizons|ACNH]]). Can be used in combination with <tt>'''nolink'''</tt> and <tt>'''sm'''</tt>.
 
*<tt>'''shortest'''</tt> - Will produce short acronyms instead of title names (e.g. [[Animal Crossing: New Horizons|NH]]). Can be used in combination with <tt>'''nolink'''</tt> and <tt>'''sm'''</tt>.
 
<br>
 
The parameters can be used in any order to achieve the same effect. (e.g. <tt><nowiki>{{NH|sm|nolink|short}}</nowiki></tt> will yield the same results as <tt><nowiki>{{NH|short|nolink|sm}}</nowiki></tt> → {{NH|sm|short|nolink}})
 
[[Category:Link templates]]
 
</noinclude>
 

Latest revision as of 02:22, November 8, 2022

Animal Crossing: New Horizons

This template is fully-protected to prevent editing by non-administrator users

Template documentation (view)


Usage

Lua Logo.svg
This template is using a Lua module
To change certain features of this template, the following modules will need to be edited:
  • Module:MediumLink
  • Note that any changes should first be tested in a sandbox. Please consider discussing planned changes on the talk page or with staff members before implementing them.
    Lua Logo.svg
    This template is using a Lua module
    To change certain features of this template, the following modules will need to be edited:
  • Module:MediumLink
  • Note that any changes should first be tested in a sandbox. Please consider discussing planned changes on the talk page or with staff members before implementing them.

    This is a link template, intended to link to Animal Crossing: New Horizons quicker and in different ways.

    The template accepts up to three parameters:

    • nolink - Will remove link but still produce game name in italics (e.g. Animal Crossing: New Horizons). Can be used in combination with sm and one of the following: short, shorter, shortest.
    • sm - Will make the name small text but still produce game name in italics (e.g. Animal Crossing: New Horizons). Can be used in combination with nolink and one of the following: short, shorter, shortest.
    • short - Will provide shorthand links (e.g. New Horizons). Can be used in combination with nolink and sm.
    • shorter - Will produce long acronyms instead of title names (e.g. ACNH). Can be used in combination with nolink and sm.
    • shortest - Will produce short acronyms instead of title names (e.g. NH). Can be used in combination with nolink and sm.
    The parameters can be used in any order to achieve the same effect. (e.g. {{NH|sm|nolink|short}} will yield the same results as {{NH|short|nolink|sm}}New Horizons)