Template:Infobox lighthouse: Difference between revisions

From Random Island Wiki
Jump to navigation Jump to search
>MSGJ
(support for embed=yes for auxiliary infoboxes, merge lens fields into one)
>MSGJ
(add field for builder, fix for subbox, tweaks to editonwikidata link for subbox)
Line 3: Line 3:
| bodyclass = vcard
| bodyclass = vcard
| titleclass = fn
| titleclass = fn
| 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>
| title = <div style="{{#ifeq:{{{embed}}}|yes|background:#bfbfbf;font-weight:bold;text-align:center;}}">{{{name|{{#if:{{#invoke:Wikidata|ViewSomething|labels|en|value|id={{{qid|{{{item|}}}}}}}}|{{#invoke:Wikidata|ViewSomething|labels|en|value|id={{{qid|{{{item|}}}}}}}}|{{PAGENAMEBASE}}}}}}}{{#ifeq:{{{embed}}}|yes|&#32;{{EditAtWikidata|qid={{{qid|{{{item|}}}}}}}}}}</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}}
Line 38: Line 38:
|  data5 = {{#invoke:WikidataIB |getValue|rank=best|P571|name=constructed|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{yearbuilt|}}}}}
|  data5 = {{#invoke:WikidataIB |getValue|rank=best|P571|name=constructed|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{yearbuilt|}}}}}


| label6 = First lit
| label6 = Built by
| class6 = note
| data6 = {{comma separated entries
| data6 = {{#invoke:WikidataIB |getValue|rank=best|P729|name=first lit|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{yearlit|}}}}}
|1={{#invoke:WikidataIB |getValue|P287|name=designer|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}}}
|2={{#invoke:WikidataIB |getValue|P193|name=designer|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}}}
}}


| label7 = Automated
| label7 = First lit
| class7 = note
| class7 = note
|  data7 = {{#invoke:WikidataIB |getQualifierValue |P793 |pval=Q24410992 |qual=P585 |name=automated |suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{automated|}}} }}
|  data7 = {{#invoke:WikidataIB |getValue|rank=best|P729|name=first lit|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{yearlit|}}}}}


| label8 = Deactivated
| label8 = Automated
|  data8 = {{#invoke:WikidataIB |getValue|rank=best|P730|name=yeardeactivated|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{yeardeactivated|}}} }}
| class8 = note
|  data8 = {{#invoke:WikidataIB |getQualifierValue |P793 |pval=Q24410992 |qual=P585 |name=automated |suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{automated|}}} }}


| label9 = Foundation
| label9 = Deactivated
|  data9 = {{{foundation|}}}
|  data9 = {{#invoke:WikidataIB |getValue|rank=best|P730|name=yeardeactivated|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{yeardeactivated|}}} }}


| label10 = Construction
| label10 = Foundation
|  data10 = {{#invoke:String2 | ucfirst | {{#invoke:WikidataIB |getValue|P186|qual=P518|linked=no|name=construction|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{construction|}}}}}}}
|  data10 = {{{foundation|}}}


| label11 = Tower shape
| label11 = Construction
|  data11 = {{#invoke:String2 | ucfirst | {{#invoke:WikidataIB |getValue|linked=no|P1419|qual=P518|name=shape|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{shape|}}}}}}}
|  data11 = {{#invoke:String2 | ucfirst | {{#invoke:WikidataIB |getValue|P186|qual=P518|linked=no|name=construction|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{construction|}}}}}}}


| label12 = Markings
| label12 = Tower shape
| class12 = note
|  data12 = {{#invoke:String2 | ucfirst | {{#invoke:WikidataIB |getValue|linked=no|P1419|qual=P518|name=shape|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{shape|}}}}}}}
data12 = {{#if:{{{marking|}}}
 
| label13 = Markings
| class13 = note
data13 = {{#if:{{{marking|}}}
  |{{{marking|}}}
  |{{{marking|}}}
  |{{#invoke:String2 | ucfirst |{{comma separated entries
  |{{#invoke:String2 | ucfirst |{{comma separated entries
Line 68: Line 74:
}}}}
}}}}


| label13 = Tower height
| label14 = Tower height
data13 = {{#invoke:WikidataIB |getValue|rank=best|P2048|name=height|convert=yes|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{height|}}}}}
data14 = {{#invoke:WikidataIB |getValue|rank=best|P2048|name=height|convert=yes|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{height|}}}}}


| label14 = Focal height
| label15 = Focal height
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|}}}}}
data15 = {{#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 = Lens
| label16 = Lens
data15 = {{{lens|}}}{{if both|{{{lens|}}}|{{{currentlens|}}}|&#32;(original),<br>}}{{{currentlens|}}}{{if both|{{{lens|}}}|{{{currentlens|}}}|&#32;(current)}}
data16 = {{{lens|}}}{{if both|{{{lens|}}}|{{{currentlens|}}}|&#32;(original),<br>}}{{{currentlens|}}}{{if both|{{{lens|}}}|{{{currentlens|}}}|&#32;(current)}}


| label17 = Light source
| label17 = Light source
Line 120: Line 126:
|  data30 = {{#invoke:WikidataIB |getValue|rank=best|P1435|name=heritage|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|linked=no|{{{heritage|}}}}}
|  data30 = {{#invoke:WikidataIB |getValue|rank=best|P1435|name=heritage|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|linked=no|{{{heritage|}}}}}


| header31 = {{{module|}}}
| data31  = {{{module|}}}
| 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|}}}}}}}} }}}}}}}}
| data100 = {{#if:{{{fetchwikidata|ALL}}}
 
|{{#ifeq:{{{embed}}}|yes|
  |{{#ifeq:{{#invoke:String|match|s={{#property:P31}}test|pattern=lighthouse}}|lighthouse
  |{{EditOnWikidata|qid={{{qid|{{{item|}}}}}}}}<!--Wikidata item is lighthouse -->
  |[[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 | 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  
}}{{#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|}}}}}

Revision as of 03:27, 18 March 2021

Infobox lighthouse
LensTemplate:If bothTemplate:If both