Difference between revisions of "Template:Weapon Demonstration"

From Team Fortress Wiki
Jump to: navigation, search
m
m (Fix YouTube fallback for Bilibili demos)
Line 99: Line 99:
 
   | 1 = {{{1|{{Dictionary/demonstrations/{{#if:{{{pyroland|}}}|pyroland-}}{{lc:{{{weapon|{{BASEPAGENAME}}}}}}}|youtube}}}}}
 
   | 1 = {{{1|{{Dictionary/demonstrations/{{#if:{{{pyroland|}}}|pyroland-}}{{lc:{{{weapon|{{BASEPAGENAME}}}}}}}|youtube}}}}}
 
   }}
 
   }}
  | bilibili | zh-hans | zh-hant = {{#ifeq: {{Dictionary/demonstrations/{{#if:{{{pyroland|}}}|pyroland-}}{{lc:{{{weapon|{{BASEPAGENAME}}}}}}}|bilibili}} | {{Dictionary/demonstrations/{{#if:{{{pyroland|}}}|pyroland-}}{{lc:{{{weapon|{{BASEPAGENAME}}}}}}}|youtube}} | {{{{#if:{{{tn|}}}|youtube_tn|youtube}}
+
  | bilibili
  | width = {{{width|640}}}
+
| zh-hans
  | widths = {{{widths|360-480-512-640}}}
+
| zh-hant = {{#if: {{Dictionary/demonstrations/{{#if:{{{pyroland|}}}|pyroland-}}{{lc:{{{weapon|{{BASEPAGENAME}}}}}}}|bilibili}}
  | hd = {{{hd|on}}}
+
    | {{bilibili
  | ratio = {{{ratio|16x9}}}
+
      | {{{1|{{Dictionary/demonstrations/{{#if:{{{pyroland|}}}|pyroland-}}{{lc:{{{weapon|{{BASEPAGENAME}}}}}}}|bilibili}}}}}
  | 1 = {{{1|{{Dictionary/demonstrations/{{#if:{{{pyroland|}}}|pyroland-}}{{lc:{{{weapon|{{BASEPAGENAME}}}}}}}|youtube}}}}}
+
      | width = {{{width|637}}}
  }} | {{bilibili
+
      | height = {{{height|470}}}
  | {{{1|{{Dictionary/demonstrations/{{#if:{{{pyroland|}}}|pyroland-}}{{lc:{{{weapon|{{BASEPAGENAME}}}}}}}|bilibili}}}}}
+
      | ratio = {{{ratio|16x9}}}
  | width = {{{width|637}}}
+
    }}
  | height = {{{height|470}}}
+
    | {{{{#if:{{{tn|}}}|youtube_tn|youtube}}
  | ratio = {{{ratio|16x9}}}
+
      | width = {{{width|640}}}
  }}}}
+
      | widths = {{{widths|360-480-512-640}}}
 +
      | hd = {{{hd|on}}}
 +
      | ratio = {{{ratio|16x9}}}
 +
      | 1 = {{{1|{{Dictionary/demonstrations/{{#if:{{{pyroland|}}}|pyroland-}}{{lc:{{{weapon|{{BASEPAGENAME}}}}}}}|youtube}}}}}
 +
    }}
 +
}}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
{{translation switching|en, de, es, fi, fr, it, ja, ko, nl, no, pl, pt-br, ru, zh-hant, zh-hans}}
 
{{translation switching|en, de, es, fi, fr, it, ja, ko, nl, no, pl, pt-br, ru, zh-hant, zh-hans}}
 
{{template doc}}
 
{{template doc}}

Revision as of 20:55, 4 June 2021

Template documentation [view] [edit] [history] [purge]

To display weapon demonstration videos on pages. See Weapon Demonstration Project Video for more info on specific videos.

Usage

Simply place the template on the weapon article.

If a link to a patch which outdates the demonstration is found in {{Dictionary/demonstrations}}, it will display a notice that the demonstration is outdated.

Demonstration

To manually choose a weapon video, insert the YouTube video ID as an unnamed parameter:

To manually choose a weapon video by weapon name, insert the name of the weapon as weapon parameter:

To customize the level of the header, add the headerlevel parameter:

To remove the header, add the noheader parameter:

To remove the hatnote (but not the header), add the nohatnote parameter:

To make the video show up as a thumbnail, use tn=yes:

Parameters width and ratio work like the {{Youtube}} template.

As weapon demonstrations frequently become outdated with patches, this template can be adapted to flag demonstrations as "outdated". By editing this page, and adding code as such: scattergun-outdate: {{patch name|6|27|2012|date=true}}.
This will appear on the page as: Note: This demonstration has been out of date since June 27, 2012.