Template:Infobox person/weight/doc

From Videopathy Wiki
Revision as of 00:00, 20 July 2017 by Videopathy (talk | contribs) (Created page with "{{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> '''{{NAMESPACE}}...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Template:Infobox person/weight/doc is one of three templates used to automatically add conversions of weight measurements displayed by Template:Infobox person and other infoboxes with a |weight= parameter.

  1. Template:Infobox person/weight changes text for units of weight to the abbreviations "kg", "lb", or "st", then passes the string to:
  2. Template:Infobox person/weight/locate which replaces any instances of &nbsp; with a space, and determines the positions of "kg", "lb", or "st" within that string, all of which is passed to:
  3. Template:Infobox person/weight/switch which does the conversion

Usage

kilograms

  • {{Infobox person/weight|200 kg}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|1 kilogram}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|108 kgs}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|111 kilograms}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.

pounds

  • {{Infobox person/weight|100 lb}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|1 pound}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|238 lbs}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|245 pounds}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.

stone

  • {{Infobox person/weight|10 st}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|1 stone}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|17 sts}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.

stone and pounds

  • {{Infobox person/weight|17 st 7 lb}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|17 sts 7 lbs}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|17 stone 7 pounds}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.

no space or &nbsp;

  • {{Infobox person/weight|108kilograms}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|238&nbsp;pounds}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.

year and reference

  • {{Infobox person/weight|108 kgs (2012)}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|238 lbs (2012)<ref>citation goes here</ref>}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.


weight ranges

with input containing en dash (–):

  • {{Infobox person/weight|108111 kg}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|238245 lb}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|1718 st}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.

with input containing hyphen (-); output is changed to en dash by {{Convert}}:

  • {{Infobox person/weight|108-111 kg}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|238-245 lb}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|17-18 st}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.

Exceptions

Does not replace numbers in hard-coded conversions (examples intentionally show incorrect conversions), but does replace units with abbreviations "kg", "lb", or "st":

  • {{Infobox person/weight|108 kilograms (229 pounds)}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|238 pounds (119 kilograms)}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|17 stone (229 pounds; 119 kilograms)}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.

Does not replace numeric output of conversion templates such as {{convert}} (examples have precision different than usual), but does replace units with abbreviations "kg", "lb", or "st":

  • {{Infobox person/weight|{{convert|108.1|kg|lb|1|abbr=off}}}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|{{convert|238.2|lb|kg|2|abbr=off}}}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|{{convert|17.3|st|1|abbr=off}}}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.

Period at end of abbreviation displays after the conversion:

  • {{Infobox person/weight|5 kg.}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|5 lb.}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|5 st.}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.

Multiple unit conversions won't work if input contains periods or commas:

  • {{Infobox person/weight|17 st. 5 lb}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.
  • {{Infobox person/weight|17 st, 5 lb}}Lua error: Cannot create process: proc_open is not available. Check PHP's "disable_functions" configuration directive.

See also