Difference between revisions of "Template:Infobox observatory/sandbox"
Jump to navigation
Jump to search
imported>Ajh1492 |
imported>Jonesey95 (Convert coords to new parameters. See Wikipedia:Coordinates in infoboxes.) |
||
| Line 1: | Line 1: | ||
{{Infobox | {{Infobox | ||
| − | |bodyclass | + | | bodyclass = vcard |
| − | | | + | | title = {{{name|{{#if:{{#invoke:Wikidata|ViewSomething|labels|en|value}}|{{#invoke:Wikidata|ViewSomething|labels|en|value}}|{{PAGENAMEBASE}}}}}}} |
| − | + | | titleclass = fn org | |
| − | |||
| − | | | ||
| − | |||
| − | | image1 | + | | image1 = {{#invoke:InfoboxImage|InfoboxImage|image={{{logo|}}}|size={{{logo_size|{{{logo_width|}}}}}}|sizedefault=frameless|upright=1.1|alt={{{logo_alt|}}}}} |
| − | | caption1 | + | | caption1 = {{{logo_caption|{{{Logo_caption|}}}}}} |
| − | | image2 | + | | image2 = {{#invoke:InfoboxImage|InfoboxImage|image={{#invoke:Wikidata|getValue|P18|{{{image|FETCH_WIKIDATA}}} }}|size={{{image_size|{{{image_width|}}}}}}|sizedefault=frameless|upright=1.1|border=yes|alt={{{image_alt|{{{alt|}}}}}}}} |
| − | | caption2 | + | | caption2 = {{{caption|{{#invoke:Wikidata|claim|P18|qualifier=P2096|FETCH_WIKIDATA}}}}} |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | | + | | image3 = {{#if:{{{map_type|}}}|{{Location map|{{{map_type|}}} |
| − | | | + | | coordinates = {{#if:{{{coordinates|{{{coords|{{{coord|}}}}}}}}} | {{{coordinates|{{{coords|{{{coord|}}}}}}}}} | {{#if:{{#Property:P625}} | {{Coord|nosave=1|display=inline,title|format=dms}} }} }} |
| − | | | + | | lat = {{#if:{{{latm|}}}{{{latNS|}}}||{{#if:{{{latitude|}}}|{{{latitude}}}|{{{latd|}}}}}}} |
| − | | | + | | long = {{#if:{{{longm|}}}{{{longEW|}}}||{{#if:{{{longitude|}}}|{{{longitude}}}|{{{longd|}}}}}}} |
| − | | | + | | lat_deg = {{#if:{{{latm|}}}{{{latNS|}}}|{{{latd|}}}}} |
| − | | | + | | lat_min = {{#if:{{{latm|}}}{{{latNS|}}}|{{{latm|}}}}} |
| − | | | + | | lat_sec = {{#if:{{{lats|}}}{{{latNS|}}}|{{{lats|}}}}} |
| + | | lat_dir = {{#if:{{{latNS|}}}|{{{latNS|}}}}} | ||
| + | | lon_deg = {{#if:{{{longm|}}}{{{longEW|}}}|{{{longd|}}}}} | ||
| + | | lon_min = {{#if:{{{longm|}}}{{{longEW|}}}|{{{longm|}}}}} | ||
| + | | lon_sec = {{#if:{{{longs|}}}{{{longEW|}}}|{{{longs|}}}}} | ||
| + | | lon_dir = {{#if:{{{longEW|}}}|{{{longEW|}}}}} | ||
| + | | float = center | ||
| + | | label = {{If empty|{{{map_dot_label|}}}|{{{name|}}}|{{PAGENAMEBASE}}}} | ||
| + | | relief = {{{map_relief|}}} | ||
| + | | caption = {{If empty|{{{map_caption|}}}|Location in {{#invoke:Location map|data|{{{map_type}}}|name}}}} | ||
| + | | border = infobox | ||
| + | | width = {{{map_size|}}} | ||
| + | }}|{{#invoke:InfoboxImage|InfoboxImage|image={{{image_map|}}}|size={{{map_size|}}}|sizedefault=frameless|alt={{{map_alt|}}}}}}} | ||
| + | | caption3 = {{#if:{{{image_map|}}}|{{{map_caption|}}}}} | ||
| − | | | + | | label1 = Organization |
| − | | | + | | data1 = {{#invoke:Wikidata|getValue|P137|{{{organization|{{{organisation|FETCH_WIKIDATA}}}}}}}} |
| − | |||
| − | | | + | | label2 = [[List of observatory codes|Code]] |
| − | + | | data2 = {{#invoke:Wikidata|getValue|P717|{{{code|FETCH_WIKIDATA}}}}} | |
| − | | | ||
| − | |||
| − | | | ||
| − | | | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | | + | | label3 = Abbreviation |
| − | + | | data3 = {{#invoke:Wikidata|getValue|P1813|{{{abbreviation|FETCH_WIKIDATA}}}}} | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | < | + | | label4 = Location |
| − | </noinclude> | + | | data4 = {{#invoke:Wikidata|getValue|P276|{{{location|FETCH_WIKIDATA}}} }}{{#if:{{#Property:P276}}|{{#if:{{#Property:P17}}|{{#if:{{{location|}}}| |, {{#invoke:Wikidata|getValue|P17|FETCH_WIKIDATA}} }} }} }} |
| + | | class4 = label | ||
| + | |||
| + | | label5 = [[Geographic coordinate system|Coordinates]] | ||
| + | | data5 = {{#if:{{Both|{{{latitude|}}}{{{latd|}}}|{{{longitude|}}}{{{longd|}}}}}|[[Category:Pages using deprecated coordinates format|observatory]]{{Geobox coor|wrap=yes|{{#if:{{{latitude|}}}|{{{latitude}}}|{{{latd|}}}}}|{{{latm|}}}|{{{lats|}}}|{{{latNS|}}}|{{#if:{{{longitude|}}}|{{{longitude}}}|{{{longd|}}}}}|{{{longm|}}}|{{{longs|}}}|{{{longEW|}}}|type:landmark{{#if:{{{iso_region|}}}|_region:{{{iso_region}}}|{{#if:{{{location_country|}}}|_region:{{CountryAbbr|{{{location_country}}}|}}|}}}}|{{#if:{{{coordinates_display|}}}|title|μ}}={{{coordinates_display|}}}|format={{{coordinates_format|}}}}}|{{#if:{{{coordinates|{{{coords|{{{coord|}}}}}}}}} | {{{coordinates|{{{coords|{{{coord|}}}}}}}}}| {{#if:{{#Property:P625}} | {{Coord|nosave=1|display=inline,title|format=dms}} }} }} }} | ||
| + | | label6 = Altitude | ||
| + | | data6 = {{{altitude|{{#if:{{#property:P2044}}|{{#ifeq:{{#invoke:Wikidata|getUnits|P2386|FETCH_WIKIDATA}}|feet|{{convert|input=P2044|m|abbr=on}}|{{convert|input=P2044|ft|abbr=on}} }} }} }}} | ||
| + | | label7 = Weather | ||
| + | | data7 = {{{weather|}}} | ||
| + | | label8 = Established | ||
| + | | data8 = {{#invoke:Wikidata|getValue|P1619|{{{established|FETCH_WIKIDATA}}}}} | ||
| + | | label9 = Closed | ||
| + | | data9 = {{#invoke:Wikidata|getValue|P582|{{{closed|FETCH_WIKIDATA}}}}} | ||
| + | | rowclass9 = note | ||
| + | | label10 = Website | ||
| + | | data10 = {{{website|{{#if:{{#property:P856}}|{{Url|1={{#invoke:Wikidata|getValue|P856|FETCH_WIKIDATA}} }} }} }}} | ||
| + | | header11 = {{#if:{{{architect|}}}{{{architecture_firm|}}}{{{main_contractor|}}}{{{main_contractors|}}}|Design and construction}} | ||
| + | | label12 = Architect | ||
| + | | data12 = {{{architect|}}} | ||
| + | | label13 = Architecture firm | ||
| + | | data13 = {{{architecture_firm|}}} | ||
| + | | label14 = Main contractors | ||
| + | | data14 = {{{main_contractor|{{{main_contractors|}}}}}} | ||
| + | | label15 = Telescopes | ||
| + | | data15 = {{#if:{{{telescope1_type|}}}||{{#invoke:Wikidata|getValue|P527|{{{telescopes|FETCH_WIKIDATA}}} }}}} | ||
| + | |||
| + | | header16 = {{#if:{{{telescope1_type|}}}|Telescopes}} | ||
| + | | data17 = {{#if:{{{telescope1_type|}}}|{{Infobox | ||
| + | | subbox = yes | decat = yes | ||
| + | |||
| + | | label1 = {{{telescope1_name}}} | data1 = {{{telescope1_type|}}} | ||
| + | | label2 = {{{telescope2_name}}} | data2 = {{{telescope2_type|}}} | ||
| + | | label3 = {{{telescope3_name}}} | data3 = {{{telescope3_type|}}} | ||
| + | | label4 = {{{telescope4_name}}} | data4 = {{{telescope4_type|}}} | ||
| + | | label5 = {{{telescope5_name}}} | data5 = {{{telescope5_type|}}} | ||
| + | | label6 = {{{telescope6_name}}} | data6 = {{{telescope6_type|}}} | ||
| + | | label7 = {{{telescope7_name}}} | data7 = {{{telescope7_type|}}} | ||
| + | | label8 = {{{telescope8_name}}} | data8 = {{{telescope8_type|}}} | ||
| + | | label9 = {{{telescope9_name}}} | data9 = {{{telescope9_type|}}} | ||
| + | | label10 = {{{telescope10_name}}} | data10 = {{{telescope10_type|}}} | ||
| + | | label11 = {{{telescope11_name}}} | data11 = {{{telescope11_type|}}} | ||
| + | | label12 = {{{telescope12_name}}} | data12 = {{{telescope12_type|}}} | ||
| + | | label13 = {{{telescope13_name}}} | data13 = {{{telescope13_type|}}} | ||
| + | | label14 = {{{telescope14_name}}} | data14 = {{{telescope14_type|}}} | ||
| + | | label15 = {{{telescope15_name}}} | data15 = {{{telescope15_type|}}} | ||
| + | | label16 = {{{telescope16_name}}} | data16 = {{{telescope16_type|}}} | ||
| + | | label17 = {{{telescope17_name}}} | data17 = {{{telescope17_type|}}} | ||
| + | | label18 = {{{telescope18_name}}} | data18 = {{{telescope18_type|}}} | ||
| + | | label19 = {{{telescope19_name}}} | data19 = {{{telescope19_type|}}} | ||
| + | | label20 = {{{telescope20_name}}} | data20 = {{{telescope20_type|}}} | ||
| + | | label21 = {{{telescope21_name}}} | data21 = {{{telescope21_type|}}} | ||
| + | | label22 = {{{telescope22_name}}} | data22 = {{{telescope22_type|}}} | ||
| + | | label23 = {{{telescope23_name}}} | data23 = {{{telescope23_type|}}} | ||
| + | | label24 = {{{telescope24_name}}} | data24 = {{{telescope24_type|}}} | ||
| + | | label25 = {{{telescope25_name}}} | data25 = {{{telescope25_type|}}} | ||
| + | | label26 = {{{telescope26_name}}} | data26 = {{{telescope26_type|}}} | ||
| + | | label27 = {{{telescope27_name}}} | data27 = {{{telescope27_type|}}} | ||
| + | | label28 = {{{telescope28_name}}} | data28 = {{{telescope28_type|}}} | ||
| + | | label29 = {{{telescope29_name}}} | data29 = {{{telescope29_type|}}} | ||
| + | | label30 = {{{telescope30_name}}} | data30 = {{{telescope30_type|}}} | ||
| + | }}}} | ||
| + | |||
| + | | data31 = {{{commons_category | {{#if:{{#property:P373}}| {{cclink|{{#invoke:Wikidata |getValue |P373|FETCH_WIKIDATA}}|Related media on Wikimedia Commons}} }}}}} | ||
| + | |||
| + | | below = <div style="text-align: right;">[[[d:{{#invoke:Wikidata|pageId}}|edit on Wikidata]]]</div> | ||
| + | |||
| + | }}<includeonly>{{#invoke:check for unknown parameters|check|unknown=[[Category:Articles using Infobox observatory using locally defined parameters]]}}</includeonly><noinclude> | ||
| + | {{Documentation}}</noinclude> | ||
Revision as of 19:27, 14 December 2016
| Script error: No such module "Wikidata". Script error: No such module "Wikidata". | |
| Organization | Script error: No such module "Wikidata". |
|---|---|
| Code | Script error: No such module "Wikidata". |
| Abbreviation | Script error: No such module "Wikidata". |
| Location | Script error: No such module "Wikidata"., Script error: No such module "Wikidata". |
| Coordinates | Lua error in Module:Coordinates at line 611: attempt to index field 'wikibase' (a nil value). |
| Established | Script error: No such module "Wikidata". |
| Closed | Script error: No such module "Wikidata". |
| Website | Template:Url |
| Telescopes | Script error: No such module "Wikidata". |
[[[d:Script error: No such module "Wikidata".|edit on Wikidata]]] | |
| 50px | This is the template sandbox page for Template:Infobox observatory (diff). See also the companion subpage for test cases. |
| This template uses Lua: |
Contents
Usage
Simple
{{Infobox observatory}}
Data will be automatically included from Wikidata.
Full
| [[File:{{{image}}}|frameless|alt={{{alt}}}|upright=1|{{{alt}}}]] {{{caption}}} | |||||||||
| [[File:{{{logo}}}|frameless|alt={{{logo_alt}}}|upright=1|{{{logo_alt}}}]] {{{logo_caption}}} | |||||||||
| Alternative names | {{{alt_names}}} | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Named after | {{{namedafter}}} | ||||||||
| Organization | {{{organization}}} | ||||||||
| Observatory code | {{{code}}} | ||||||||
| Location | Lua error in Module:WikidataIB at line 1528: attempt to index field 'wikibase' (a nil value). | ||||||||
| Coordinates | {{{coordinates}}} | ||||||||
| Altitude | {{{altitude}}} | ||||||||
| Weather | {{{weather}}} | ||||||||
| Observing time | {{{obs-time}}} | ||||||||
| Established | {{{established}}} | ||||||||
| Closed | {{{closed}}} | ||||||||
| Website | {{{website}}} | ||||||||
| Architect | {{{architect}}} | ||||||||
| Architecture firm | {{{architecture_firm}}} | ||||||||
| Main contractors | {{{main_contractor}}} | ||||||||
| Telescopes | |||||||||
| |||||||||
| Template:Wikidata location map | |||||||||
| {{{commons_category}}} | |||||||||
{{Infobox observatory
| name =
| image =
| caption =
| alt =
| logo =
| logo_caption =
| logo_alt =
| alt_names =
| namedafter =
| organization =
| code =
| location =
| coordinates = <!-- {{Coord|LAT|LONG|type:landmark|display=inline,title}} -->
| altitude =
| weather =
| obs-time =
| established = <!-- {{Start date|YYYY|MM|DD}} -->
| closed =
| website = <!-- {{URL|example.com}} -->
| architect =
| architecture_firm =
| main_contractor =
| telescope1_name =
| telescope1_type =
| telescope2_name =
| telescope2_type =
| telescope3_name =
| telescope3_type =
| telescope4_name =
| telescope4_type =
| commons_category =
}}
Parameters
This template returns values from Wikidata where they are available; these values can be overridden by passing values to the relevant parameters.
| Parameter | Default | Description |
|---|---|---|
| name | Wikidata label (en) (Or Page name) |
name of the observatory |
| image | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P18) | image (use full wikicode) |
| caption | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P2096) | image caption |
| alt | alt caption | |
| logo | logo | |
| logo_caption | logo caption | |
| logo_alt | logo alt caption | |
| alt_names | Wikidata aliases (en) | alternative names / aliases for the telescope |
| namedafter | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P138) | person or organisation the observatory was named after |
| organization | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P137) | organization responsible for the observatory |
| code | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P717) | observatory code |
| location | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P706), Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P276), Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P131), Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P17) (fallback to Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P30) for Antarctica) | observatory's location |
| coordinates | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P625) | location coordinates, use {{coord}} with display=inline,title |
| altitude | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P2044) | altitude of the observatory |
| weather | weather | |
| obs-time | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P3891) | observing time available |
| established | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P1619) | when the observatory was established, use {{start date}} |
| closed | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P582) | when the observatory was closed, if appropriate |
| telescopes | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P527) | names of the telescopes at the observatory |
| website | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P856) | URL of the website for the observatory, use {{URL}} |
| architect | architect | |
| architecture_firm | architecture firm | |
| main_contractor | main contractor | |
| telescope1_name | name of the observatory's first telescope | |
| telescope1_type | first telescope's type (and any additional information) | |
| telescope2_name | name of the observatory's second telescope | |
| telescope2_type | second telescope's type (and any additional information) | |
| etc... | ||
| telescope29_name | name of the observatory's twenty-ninth telescope | |
| telescope29_type | twenty-ninth telescope's type (and any additional information) | |
| telescope30_name | name of the thirtieth telescope | |
| telescope30_type | thirtieth telescope's type (and any additional information) | |
| locmapin | Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P17) | use this parameter to override the location map shown, if necessary. See {{Wikidata location map}} |
| commons_category | commons sitelink | category name at Wikimedia Commons |
| refs | no | set to 'yes' to automatically display references from Wikidata |
| child | no | set to 'yes' to use as a child infobox of another infobox |
| embedded | embed another infobox into this one | |
Examples of use
- Infoboxes which only use Wikidata (no local parameters)
Microformat
Tracking categories
- Category:Articles using Infobox observatory using locally defined parameters (0)
- Category:Articles with infoboxes completely from Wikidata (0)
See also
Template:Organization infoboxes
| The above documentation is transcluded from Template:Infobox observatory/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |