Template:Infobox lighthouse: Difference between revisions

From Random Island Wiki
Jump to navigation Jump to search
>MSGJ
(add field for builder, fix for subbox, tweaks to editonwikidata link for subbox)
>MSGJ
(adjust coding for embedded infoboxes, add some qualifiers, fix coding for editonwikidata link)
Line 3: Line 3:
| bodyclass = vcard
| bodyclass = vcard
| titleclass = fn
| titleclass = fn
| 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>
| {{#ifeq:{{{embed}}}|yes|subheader|title}} = {{{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|}}}}}}}}}}
 
| subheaderstyle = background:#bfbfbf; font-weight:bold;


| 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 69: Line 71:
  |{{{marking|}}}
  |{{{marking|}}}
  |{{#invoke:String2 | ucfirst |{{comma separated entries
  |{{#invoke:String2 | ucfirst |{{comma separated entries
   |1={{#invoke:WikidataIB|getValue|linked=no|P5422|qual=P518|name=pattern|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}}}
   |1={{#invoke:WikidataIB|getValue|linked=no|P462|qual=P518|name=pattern|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}}}
   |2={{#invoke:WikidataIB|getValue|linked=no|P462|qual=P518|name=pattern|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}}}
   |2={{#invoke:WikidataIB|getValue|linked=no|P5422|qual=P1114, P462, P7469, P518|name=pattern|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}}}
  }}
  }}
}}}}
}}}}
Line 87: Line 89:


| label18 = Intensity
| label18 = Intensity
|  data18 = {{#invoke:WikidataIB |getValue|rank=best|P3041|name=intensity|convert=|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{intensity|}}}}}
|  data18 = {{#invoke:WikidataIB |getValue|rank=best|P3041|qual=P462|name=intensity|convert=|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|qid={{{qid|{{{item|}}}}}}|{{{intensity|}}}}}


| label19 = Range
| label19 = Range
Line 131: Line 133:
   |{{#ifeq:{{#invoke:String|match|s={{#property:P31}}test|pattern=lighthouse}}|lighthouse
   |{{#ifeq:{{#invoke:String|match|s={{#property:P31}}test|pattern=lighthouse}}|lighthouse
   |{{EditOnWikidata|qid={{{qid|{{{item|}}}}}}}}<!--Wikidata item is lighthouse -->
   |{{EditOnWikidata|qid={{{qid|{{{item|}}}}}}}}<!--Wikidata item is lighthouse -->
   |[[Category:General articles using infobox Lighthouse]] {{#ifeq:{{{qid|{{{item|}}}}}}|
   |[[Category:General articles using infobox Lighthouse]]{{#if:{{{qid|{{{item|}}}}}}
    |{{EditOnWikidata|qid={{{qid|{{{item|}}}}}}}}
     |[[Category:Pages using infobox Lighthouse needing Wikidata item]]
     |[[Category:Pages using infobox Lighthouse needing Wikidata item]]
    |{{EditOnWikidata|qid={{{qid|{{{item|}}}}}}}}
   }}
   }}
   }}
   }}

Revision as of 10:57, 21 March 2021

Infobox lighthouse
LensTemplate:If bothTemplate:If both