Template:Infobox lighthouse: Difference between revisions

From Random Island Wiki
Jump to navigation Jump to search
>MSGJ
(item parameter no longer in use, trim prefix CCG, repopulate NRHP heritage tracking cat, clear out pushpin uses from error cat)
>MSGJ
(rearrange some fields, allow for multiple lights to be shown)
Line 3: Line 3:
| bodyclass = vcard
| bodyclass = vcard
| titleclass = fn
| titleclass = fn
| autoheaders = y
| {{#ifeq:{{{embed}}}|yes|subheader|title}} = {{{name|{{#if:{{#invoke:Wikidata|ViewSomething|labels|en|value|id={{{qid|}}}}}|{{#invoke:Wikidata|ViewSomething|labels|en|value|id={{{qid|}}}}}|{{PAGENAMEBASE}}}}}}}{{#ifeq:{{{embed}}}|yes| {{EditAtWikidata|qid={{{qid|}}}}}}}
| {{#ifeq:{{{embed}}}|yes|subheader|title}} = {{{name|{{#if:{{#invoke:Wikidata|ViewSomething|labels|en|value|id={{{qid|}}}}}|{{#invoke:Wikidata|ViewSomething|labels|en|value|id={{{qid|}}}}}|{{PAGENAMEBASE}}}}}}}{{#ifeq:{{{embed}}}|yes| {{EditAtWikidata|qid={{{qid|}}}}}}}
| subheaderstyle = background:#bfbfbf; font-weight:bold;
| subheaderstyle = background:#bfbfbf; font-weight:bold;


Line 45: Line 46:
  |3={{#invoke:WikidataIB |getValue|P631|name=builder|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}}}
  |3={{#invoke:WikidataIB |getValue|P631|name=builder|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}}}
}}
}}
| label8 = First lit
| class8 = note
|  data8 = {{#invoke:WikidataIB |getValue|rank=best|P729|name=first lit|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{yearlit|}}}}}
| label9 = Automated
| class9 = note
|  data9 = {{#invoke:WikidataIB |getQualifierValue |P793 |pval=Q24410992 |qual=P585 |name=automated |suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{automated|}}} }}
| label10 = Deactivated
|  data10 = {{#invoke:WikidataIB |getValue|rank=best|P730|name=yeardeactivated|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{yeardeactivated|}}}}}


| label11 = Foundation
| label11 = Foundation
Line 63: Line 53:
|  data12 = {{#invoke:WikidataIB |getValue|P186|qual=P518|linked=no|name=construction|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{construction|}}}}}
|  data12 = {{#invoke:WikidataIB |getValue|P186|qual=P518|linked=no|name=construction|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{construction|}}}}}


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


| label14 = Markings
| label15 = Markings
| class14 = note
| class15 = note
data14 = {{#if:{{{marking|}}}
data15 = {{#if:{{{marking|}}}
  |{{{marking|}}}
  |{{{marking|}}}
  |{{comma separated entries
  |{{comma separated entries
Line 76: Line 69:
}}
}}


| label15 = Tower height
| label16 = Power source
|  data15 = {{#invoke:WikidataIB |getValue|rank=best|P2048|name=height|convert=yes|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{height|}}}}}
data16 = {{#invoke:WikidataIB|getValue|linked=no|P618|name=powersource|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}}}
 
| label16 = Focal height
|  data16 = {{#invoke:WikidataIB |getValue|rank=best|P2923|qual=P462|name=focalheight|convert=yes|linked=no|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{focalheight|}}}}}
 
| label17 = Lens
|  data17 = {{#invoke:WikidataIB |getValue|P9597|qual=DATES|linked=yes|name=lens|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{lens|}}}{{if both|{{{lens|}}}|{{{currentlens|}}}|&#32;(original),<br>}}{{{currentlens|}}}{{if both|{{{lens|}}}|{{{currentlens|}}}|&#32;(current)}}}}{{#if:{{{currentlens|}}}|[[Category:Lighthouses using current lens parameter]]{{#if:{{{lens|}}}||[[Category:Lighthouses using current lens parameter only]]}}}}
 
| label18 = Power source
data18 = {{#invoke:WikidataIB|getValue|linked=no|P618|name=powersource|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}}}
 
| label19 = Light source
|  data19 = {{{lightsource|}}}{{#if:{{{lightsource|}}}|{{#ifeq:{{Str find|{{lc:{{{lightsource}}}}}|solar}}|-1||[[Category:Solar powered lighthouses using wrong field]]}}}}


| label20 = Intensity
| label17 = Operator
data20 = {{#invoke:WikidataIB |getValue|rank=best|P3041|qual=P462|name=intensity|linked=no|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{intensity|}}}}}
data17 = {{#invoke:WikidataIB |getValue|rank=best|P137|qual=DATES|name=managingagent|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{managingagent|}}}}}


| label21 = Range
| label18 = Heritage
data21 = {{#invoke:WikidataIB |getValue|rank=best|P2929|qual=P462|name=range|convert=yes|linked=no|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{range|}}}}}
data18 = {{#invoke:WikidataIB |getValue|rank=best|P1435|name=heritage|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|linked=no|{{{heritage|}}}}}


| label22 = [[Light characteristic|Characteristic]]
| data20 = {{Infobox lighthouse/light
| class22 = note
| qid = {{{qid|}}}
| data22 = {{#if:{{{characteristic|}}}
| name = <!--Blank-->
  |{{{characteristic}}}
| suppressfields = {{{suppressfields|}}}
  |{{#if:{{#invoke:wd|qualifier|{{{qid|}}}|P1030|P805}}
| fetchwikidata = {{{fetchwikidata|ALL}}}
  |{{#if:{{#invoke:wd|property|raw|{{#invoke:wd|qualifier|{{{qid|}}}|raw|P1030|P805}}|P2910}}
  | onlysourced = {{{onlysourced|no}}}
  |[[File:{{#invoke:wd|property|raw|{{#invoke:wd|qualifier|{{{qid|}}}|raw|P1030|P805}}|P2910}}|20px]]&#32;
  | yearlit = {{{yearlit|}}}
  }}{{Tooltip|{{#invoke:WikidataIB|getValue|rank=best|P1030|qual=DATES|name=characteristic|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}}}|{{#invoke:wd|qualifier|{{{qid|}}}|P1030|P805}}}}
| automated = {{{automated|}}}
  |{{#invoke:WikidataIB |getValue|rank=best|P1030|name=characteristic|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}}}
| yeardeactivated = {{{yeardeactivated|}}}
  }}
| focalheight = {{{focalheight|}}}
| lens = {{{lens|}}}{{if both|{{{lens|}}}|{{{currentlens|}}}|&#32;(original),<br>}}{{{currentlens|}}}{{if both|{{{lens|}}}|{{{currentlens|}}}|&#32;(current)}}{{#if:{{{currentlens|}}}|[[Category:Lighthouses using current lens parameter]]{{#if:{{{lens|}}}||[[Category:Lighthouses using current lens parameter only]]}}}}
| lightsource = {{{lightsource|}}}{{#if:{{{lightsource|}}}|{{#ifeq:{{Str find|{{lc:{{{lightsource}}}}}|solar}}|-1||[[Category:Solar powered lighthouses using wrong field]]}}}}
| intensity = {{{intensity|}}}
| range = {{{range|}}}
| characteristic = {{{characteristic|}}}
| admiralty = {{{admiralty|}}}
| country = {{{country|}}}
| countrylink = {{{countrylink|}}}
| countrynumber = {{{countrynumber|}}}
  | NGA = {{{NGA|}}}
}}
}}


| label23 = [[Foghorn#Marine fog signals|Fog signal]]
| data21 = {{{light1|}}}
|  data23 = {{{fogsignal|}}}
 
| label24 = [[Racon]]
|  data24 = {{#invoke:WikidataIB |getValue|rank=best|P3994|name=racon|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{racon|}}}}}


| label25 = [[United Kingdom Hydrographic Office|Admiralty]] number
| data22 = {{{light2|}}}
|  data25 = {{#invoke:WikidataIB|getValue|rank=best|P3562|name=admiralty|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{admiralty|}}}}}


| label26 = [[Canadian Coast Guard|CCG]] number
| header30= {{#if:{{{light1|}}}{{{light2|}}}|Other}}
|  data26 = {{#invoke:WikidataIB |getValue|rank=best|P3920|name=CCG|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{#if:{{{canada|}}}|{{#ifeq:{{Str find|{{uc:{{{canada}}}}}|CCG}}|1|{{str right |{{{canada}}}|3}}|{{{canada}}}}}}}}}{{#if:{{{canada|}}}|{{#ifeq:{{Str find|{{uc:{{{canada}}}}}|CCG}}|-1||[[Category:Lighthouses with CCG prefix]]}}}}
| rowstyle30 = background:#b9deed;


| label27 = [[National Geospatial-Intelligence Agency|NGA]] number
| label31 = [[Foghorn#Marine fog signals|Fog signal]]
data27 = {{Infobox lighthouse/NGA|NGA={{#invoke:WikidataIB|getValue|rank=best|P3563|name=NGA|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|noicon=true|{{{NGA|}}}}}}}
data31 = {{{fogsignal|}}}


| label28 = [[Amateur Radio Lighthouse Society|ARLHS]] number
| label32 = [[Racon]]
data28 = {{#invoke:WikidataIB |getValue|rank=best|P2980|name=ARLHS|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{ARLHS|}}}}}
data32 = {{#invoke:WikidataIB |getValue|rank=best|P3994|name=racon|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{racon|}}}}}


| label29 = [[United States Coast Guard|USCG]] number
| label34 = [[Canadian Coast Guard|CCG]] no.
data29 = {{#invoke:WikidataIB |getValue|rank=best|P3723|name=USCG|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{USCG|}}}}}
data34 = {{#invoke:WikidataIB |getValue|rank=best|P3920|name=CCG|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{#if:{{{canada|}}}|{{#ifeq:{{Str find|{{uc:{{{canada}}}}}|CCG}}|1|{{str right |{{{canada}}}|3}}|{{{canada}}}}}}}}}{{#if:{{{canada|}}}|{{#ifeq:{{Str find|{{uc:{{{canada}}}}}|CCG}}|-1||[[Category:Lighthouses with CCG prefix]]}}}}


| label30 = {{#if:{{{countrylink|}}}|[{{{countrylink}}} {{{country}}}]|{{{country}}}}} number
| label36 = [[Amateur Radio Lighthouse Society|ARLHS]] no.
| data30 = {{{countrynumber|}}}
|  data36 = {{#invoke:WikidataIB |getValue|rank=best|P2980|name=ARLHS|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{ARLHS|}}}}}


| label31 = Operator
| label37 = [[United States Coast Guard|USCG]] no.
data31 = {{#invoke:WikidataIB |getValue|rank=best|P137|qual=DATES|name=managingagent|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{managingagent|}}}}}
data37 = {{#invoke:WikidataIB |getValue|rank=best|P3723|name=USCG|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|{{{USCG|}}}}}


| label32 = Heritage
| label38 = {{#if:{{{countrylink|}}}|[{{{countrylink}}} {{{country}}}]|{{{country}}}}} no.
|  data32 = {{#invoke:WikidataIB |getValue|rank=best|P1435|name=heritage|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|}}}|linked=no|{{{heritage|}}}}}
| data38 = {{{countrynumber|}}}


| data33 = {{{module|}}}
| header40= _BLANK_
| data100 = {{#if:{{{fetchwikidata|ALL}}}
| data41 = {{{module|}}}
| data42  = {{#if:{{{fetchwikidata|ALL}}}
  |{{#ifeq:{{{embed}}}|yes
  |{{#ifeq:{{{embed}}}|yes
   |<!--Null-->
   |<!--Null-->
Line 158: Line 145:
  }}
  }}
}}
}}
}}{{#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 | 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 | pushpin | pushpin_label_position | pushpin_map | pushpin_map_alt | pushpin_map_caption | pushpin_mapsize | pushpin_outside | pushpin_relief | 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 | lens | light1 | light2 | 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 | pushpin | pushpin_label_position | pushpin_map | pushpin_map_alt | pushpin_map_caption | pushpin_mapsize | pushpin_outside | pushpin_relief | qid | racon | range | refs | relief | shape | suppressfields | USCG | yearbuilt | yeardeactivated | yearlit  
}}{{#ifeq:{{{item|¬}}}|¬||[[Category:Lighthouses using item parameter]]}}{{#if:{{{pushpin|}}}{{{pushpin_label_position|}}}{{{pushpin_map|}}}{{{pushpin_map_alt|}}}{{{pushpin_map_caption|}}}{{{pushpin_mapsize|}}}{{{pushpin_outside|}}}{{{pushpin_relief|}}}|[[Category:Lighthouses using pushpin parameters]]}}{{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|}}}|linked=no|noicon=yes|{{{heritage|}}}}}}}}}<noinclude>
}}{{#ifeq:{{{item|¬}}}|¬||[[Category:Lighthouses using item parameter]]}}{{#if:{{{pushpin|}}}{{{pushpin_label_position|}}}{{{pushpin_map|}}}{{{pushpin_map_alt|}}}{{{pushpin_map_caption|}}}{{{pushpin_mapsize|}}}{{{pushpin_outside|}}}{{{pushpin_relief|}}}|[[Category:Lighthouses using pushpin parameters]]}}{{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|}}}|linked=no|noicon=yes|{{{heritage|}}}}}}}}}<noinclude>
{{documentation}}<!-- place category on the /doc sub-page, not here -->
{{documentation}}<!-- place category on the /doc sub-page, not here -->
</noinclude>
</noinclude>

Revision as of 01:50, 27 May 2021

Infobox lighthouse
LensTemplate:If bothTemplate:If both