Template:Infobox lighthouse: Difference between revisions

From Random Island Wiki
Jump to navigation Jump to search
>MSGJ
(use properties P5422 and P462 for markings, use P186 for construction material, qualify shape by part of building, accept qid as alias for item)
>MSGJ
(support for embed=yes for auxiliary infoboxes, merge lens fields into one)
Line 1: Line 1:
{{infobox
{{infobox
| child = {{#ifeq:{{{embed}}}|yes|yes}}
| bodyclass = vcard
| bodyclass = vcard
| titleclass = fn
| titleclass = fn
| title = {{{name|{{#if:{{#invoke:Wikidata|ViewSomething|labels|en|value|id={{{qid|{{{item|}}}}}}}}|{{#invoke:Wikidata|ViewSomething|labels|en|value|id={{{qid|{{{item|}}}}}}}}|{{PAGENAMEBASE}}}}}}}
| title = <div style="{{#ifeq:{{{embed}}}|yes|background:#bfbfbf;}}">{{{name|{{#if:{{#invoke:Wikidata|ViewSomething|labels|en|value|id={{{qid|{{{item|}}}}}}}}|{{#invoke:Wikidata|ViewSomething|labels|en|value|id={{{qid|{{{item|}}}}}}}}|{{PAGENAMEBASE}}}}}}}</div>


| image  = {{#invoke:InfoboxImage|InfoboxImage|image={{#invoke:WikidataIB |getValue|maxvals=1|P18|name=image_name|qid={{{qid|{{{item|}}}}}}|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced=no|noicon=yes|{{{image_name|}}}}}|size={{{image_width|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{alt|}}}|suppressplaceholder=yes}}
| image  = {{#invoke:InfoboxImage|InfoboxImage|image={{#invoke:WikidataIB |getValue|maxvals=1|P18|name=image_name|qid={{{qid|{{{item|}}}}}}|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced=no|noicon=yes|{{{image_name|}}}}}|size={{{image_width|{{{image size|{{{image_size|{{{imagesize|}}}}}}}}}}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{alt|}}}|suppressplaceholder=yes}}
| caption = {{#if:{{{image|}}}|{{{caption|}}}|{{{caption|{{#invoke:Wikidata|getImageLegend|id={{{qid|{{{item|}}}}}}|FETCH_WIKIDATA}}}}}}}
| caption = {{#if:{{{image|}}}|{{{caption|}}}|{{{caption|{{#invoke:Wikidata|getImageLegend|id={{{qid|{{{item|}}}}}}|FETCH_WIKIDATA}}}}}}}


| image3    = {{yesno|{{{mapframe|yes}}}|no=|yes={{Infobox mapframe
| image3    = {{yesno|{{{mapframe|{{#ifeq:{{{embed}}}|yes|no|yes}}}}}|no=|yes={{Infobox mapframe
  |id={{{qid|{{{item|}}}}}}
  |id={{{qid|{{{item|}}}}}}
  |zoom={{{mapframe-zoom|5}}}
  |zoom={{{mapframe-zoom|5}}}
Line 23: Line 24:
| label1 = Location
| label1 = Location
| class1 = label
| class1 = label
|  data1 = {{Wikidata location|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|location={{{location|}}}|refs={{{refs|no}}}|qid={{{qid|{{{item|}}}}}} }}
|  data1 = {{#ifeq:{{{embed}}}|yes||{{Wikidata location|suppressfields={{{suppressfields|{{#ifeq:{{{embed}}}|yes|location}}}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|location={{{location|}}}|refs={{{refs|no}}}|qid={{{qid|{{{item|}}}}}}}}}}


| label2 = [[British national grid reference system|OS grid]]
| label2 = [[British national grid reference system|OS grid]]
|  data2 = {{gbmappingsmall|{{#invoke:WikidataIB|getValue|P613|qid={{{qid|{{{item|}}}}}}|noicon=true|name=os_grid_reference|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|{{{grid_ref_UK|}}}}}}}
|  data2 = {{gbmappingsmall|{{#invoke:WikidataIB|getValue|P613|qid={{{qid|{{{item|}}}}}}|noicon=true|name=os_grid_reference|fetchwikidata={{{fetchwikidata|{{#ifeq:{{{embed}}}|yes||ALL}}}}}|onlysourced={{{onlysourced|no}}}|{{{grid_ref_UK|}}}}}}}


| label3 = [[Geographic coordinate system|Coordinates]]
| label3 = [[Geographic coordinate system|Coordinates]]
|  data3 = {{#invoke:WikidataIB|getCoords|qid={{{qid|{{{item|}}}}}}|name=coordinates|fetchwikidata={{{fetchwikidata|ALL}}}|format={{{coord_format|}}}|{{{coordinates|}}}}}
|  data3 = {{#invoke:WikidataIB|getCoords|qid={{{qid|{{{item|}}}}}}|name=coordinates|fetchwikidata={{{fetchwikidata|{{#ifeq:{{{embed}}}|yes||ALL}}}}}|format={{{coord_format|}}}|{{{coordinates|}}}}}


| label4 = Designation
| label4 = Designation
Line 73: Line 74:
|  data14 = {{#invoke:WikidataIB |getValue|rank=best|P2923|qual=P462|name=focalheight|convert=yes|linked=no|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{focalheight|}}}}}
|  data14 = {{#invoke:WikidataIB |getValue|rank=best|P2923|qual=P462|name=focalheight|convert=yes|linked=no|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{focalheight|}}}}}


| label15 = Original lens
| label15 = Lens
|  data15 = {{{lens|}}}
|  data15 = {{{lens|}}}{{if both|{{{lens|}}}|{{{currentlens|}}}|&#32;(original),<br>}}{{{currentlens|}}}{{if both|{{{lens|}}}|{{{currentlens|}}}|&#32;(current)}}
 
| label16 = Current lens
| data16 = {{{currentlens|}}}


| label17 = Light source
| label17 = Light source
Line 123: Line 121:


| header31 = {{{module|}}}
| header31 = {{{module|}}}
| data100 = {{#if:{{{fetchwikidata|ALL}}}|{{main other |{{#ifeq:{{#invoke:String|match|s={{#property:P31}}test|pattern=lighthouse}}|lighthouse|{{EditOnWikidata}}|[[Category:General articles using infobox Lighthouse]] {{#ifeq:{{{qid|{{{item|}}}}}}||[[Category:Pages using infobox Lighthouse needing Wikidata item]]| {{EditOnWikidata|qid={{{qid|{{{item|}}}}}}}} }}}}}}}}
| data100 = {{#if:{{{fetchwikidata|ALL}}}|{{main other |{{#ifeq:{{#invoke:String|match|s={{#property:P31}}test|pattern=lighthouse}}|lighthouse|{{EditOnWikidata|qid={{{qid|{{{item|}}}}}}}}|[[Category:General articles using infobox Lighthouse]] {{#ifeq:{{{qid|{{{item|}}}}}}||[[Category:Pages using infobox Lighthouse needing Wikidata item]]| {{EditOnWikidata|qid={{{qid|{{{item|}}}}}}}} }}}}}}}}


}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox lighthouse with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox lighthouse]] with unknown parameter "_VALUE_"|ignoreblank=y| admiralty | alt | ARLHS | automated | canada | caption | characteristic | construction | coordinates | coordinates_footnotes | country | countrylink | countrynumber | currentlens | designation | fetchwikidata | focalheight | fogsignal | foundation | grid_ref_UK | height | heritage | image | image size | image_name | image_size | image_upright | image_width | imagesize | intensity | item | lens | lightsource | location | managingagent | map_caption | mapframe | mapframe-caption | mapframe-height | mapframe-lat | mapframe-latitude | mapframe-long | mapframe-longitude | mapframe-marker | mapframe-marker-color | mapframe-marker-colour | mapframe-width | mapframe-zoom | marking | module | name | NGA | onlysourced | qid | racon | range | refs | relief | shape | suppressfields | USCG | yearbuilt | yeardeactivated | yearlit  
}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox lighthouse with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox lighthouse]] with unknown parameter "_VALUE_"|ignoreblank=y| admiralty | alt | ARLHS | automated | canada | caption | characteristic | construction | coordinates | coordinates_footnotes | country | countrylink | countrynumber | currentlens | designation | embed | fetchwikidata | focalheight | fogsignal | foundation | grid_ref_UK | height | heritage | image | image size | image_name | image_size | image_upright | image_width | imagesize | intensity | item | lens | lightsource | location | managingagent | map_caption | mapframe | mapframe-caption | mapframe-height | mapframe-lat | mapframe-latitude | mapframe-long | mapframe-longitude | mapframe-marker | mapframe-marker-color | mapframe-marker-colour | mapframe-width | mapframe-zoom | marking | module | name | NGA | onlysourced | qid | racon | range | refs | relief | shape | suppressfields | USCG | yearbuilt | yeardeactivated | yearlit  
}}{{main other|{{#invoke:lighthouse tracking|tracking|heritage={{#invoke:WikidataIB|getValue|rank=best|P1435|name=heritage|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{qid|{{{item|}}}}}}}}}|linked=no|noicon=yes|{{{heritage|}}}}}
}}{{main other|{{#invoke:lighthouse tracking|tracking|heritage={{#invoke:WikidataIB|getValue|rank=best|P1435|name=heritage|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{qid|{{{item|}}}}}}}}}|linked=no|noicon=yes|{{{heritage|}}}}}
}}{{#ifeq:{{{admiralty|}}}{{{canada|}}}{{{NGA|}}}{{{ARLHS|}}}{{{USCG|}}}{{{countrynumber|}}}|{{#invoke:string|replace|{{{admiralty|}}}{{{canada|}}}{{{NGA|}}}{{{ARLHS|}}}{{{USCG|}}}{{{countrynumber|}}}|
}}{{#ifeq:{{{admiralty|}}}{{{canada|}}}{{{NGA|}}}{{{ARLHS|}}}{{{USCG|}}}{{{countrynumber|}}}|{{#invoke:string|replace|{{{admiralty|}}}{{{canada|}}}{{{NGA|}}}{{{ARLHS|}}}{{{USCG|}}}{{{countrynumber|}}}|

Revision as of 15:37, 16 March 2021

Infobox lighthouse
LensTemplate:If bothTemplate:If both