Template:Infobox lighthouse: Difference between revisions

From Random Island Wiki
Jump to navigation Jump to search
>MSGJ
m (link NGA number if it is the correct format, also use P631 for "built by")
>MSGJ
(explanatory tooltip for light characteristic, improved logic for tracking categories)
Line 15: Line 15:
  |frame-width={{{mapframe-width|}}}
  |frame-width={{{mapframe-width|}}}
  |frame-height={{{mapframe-height|}}}
  |frame-height={{{mapframe-height|}}}
  |marker={{{mapframe-marker|}}}
  |marker={{{mapframe-marker|lighthouse}}}
  |marker-color={{{mapframe-marker-color|{{{mapframe-marker-colour|}}}}}}
  |marker-color={{{mapframe-marker-color|{{{mapframe-marker-colour|}}}}}}
  |coord={{{coordinates|}}}
  |coord={{{coordinates|}}}
Line 97: Line 97:
| label20 = [[Light characteristic|Characteristic]]
| label20 = [[Light characteristic|Characteristic]]
| class20 = note
| class20 = note
|  data20 = {{#invoke:WikidataIB |getValue|rank=best|P1030|name=characteristic|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{characteristic|}}}}}
|  data20 = {{#if:{{{characteristic|}}}
|{{{characteristic}}}
|{{#if:{{#invoke:wd|qualifier|{{{qid|{{{item|}}}}}}|P1030|P805}}
  |{{#if:{{#invoke:wd|property|raw|{{#invoke:wd|qualifier|{{{qid|{{{item|}}}}}}|raw|P1030|P805}}|P2910}}
  |[[File:{{#invoke:wd|property|raw|{{#invoke:wd|qualifier|{{{qid|{{{item|}}}}}}|raw|P1030|P805}}|P2910}}|20px]] 
  }}{{Tooltip|{{#invoke:WikidataIB|getValue|rank=best|P1030|name=characteristic|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}}}|{{#invoke:wd|qualifier|{{{qid|{{{item|}}}}}}|P1030|P805}}}}
  |{{#invoke:WikidataIB |getValue|rank=best|P1030|name=characteristic|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}}}
}}
}}


| label21 = [[Foghorn#Marine fog signals|Fog signal]]
| label21 = [[Foghorn#Marine fog signals|Fog signal]]
Line 131: Line 139:
| data31  = {{{module|}}}
| data31  = {{{module|}}}
| data100 = {{#if:{{{fetchwikidata|ALL}}}
| data100 = {{#if:{{{fetchwikidata|ALL}}}
  |{{#ifeq:{{{embed}}}|yes|
  |{{#ifeq:{{{embed}}}|yes
   |{{#ifeq:{{#invoke:String|match|s={{#property:P31}}test|pattern=lighthouse}}|lighthouse
  |<!--Null-->
   |{{EditOnWikidata|qid={{{qid|{{{item|}}}}}}}}<!--Wikidata item is lighthouse -->
   |{{#ifexpr:{{#ifeq:{{#invoke:wd|property|raw|P31}}|Q39715
   |[[Category:General articles using infobox Lighthouse]]{{#if:{{{qid|{{{item|}}}}}}
    |1<!--Instance of lighthouse-->
    |{{#ifeq:{{#invoke:wd|property|raw|{{#invoke:wd|property|raw|P31}}|P279}}|Q39715
    |1<!--Subclass of lighthouse-->
    |0<!--Not a lighthouse-->
    }}
  }}
   |{{EditOnWikidata|qid={{{qid|{{{item|}}}}}}}}
   |{{#if:{{{qid|{{{item|}}}}}}
     |{{EditOnWikidata|qid={{{qid|{{{item|}}}}}}}}
     |{{EditOnWikidata|qid={{{qid|{{{item|}}}}}}}}
     |[[Category:Pages using infobox Lighthouse needing Wikidata item]]
     |[[Category:Pages using infobox Lighthouse needing Wikidata item]]

Revision as of 05:20, 28 March 2021

Infobox lighthouse
LensTemplate:If bothTemplate:If both