Difference between revisions of "Template:Infobox observatory/sandbox"
Jump to navigation
Jump to search
imported>Ajh1492 (map box) |
|||
| Line 11: | Line 11: | ||
|labelstyle = padding:0 0.5em 0 0; background:transparent; line-height:1.1em; | |labelstyle = padding:0 0.5em 0 0; background:transparent; line-height:1.1em; | ||
|datastyle = padding:0; line-height:1.2em; vertical-align:middle; | |datastyle = padding:0; line-height:1.2em; vertical-align:middle; | ||
| + | |||
| + | | image3 = {{#if:{{{map_type|}}}|{{Location map|{{{map_type|}}} | ||
| + | |alt = {{{map_alt|}}} | ||
| + | |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 | ||
| + | |mark = Red pog.svg | ||
| + | |marksize= 7 | ||
| + | |label = {{{map dot label|{{{map_dot_label|}}}}}} | ||
| + | |relief = {{{relief|}}} | ||
| + | |border = none | ||
| + | |caption = <!--leave blank--> | ||
| + | |width = {{{map_size|}}} | ||
| + | }} |<!-- else if map_type is blank | ||
| + | -->{{#invoke:InfoboxImage|InfoboxImage|image={{{image_map|}}}|size={{{map_size|}}}|sizedefault=frameless|alt={{{map_alt|}}}}}<!-- end if map_type | ||
| + | -->}} | ||
| + | | caption3 = {{#if:{{{map_type|}}} |{{{map_caption|Location within {{#invoke:Location map|data|{{{map_type}}}|name}}}}} |{{#if:{{{image_map|}}} |{{{map_caption|}}} }}}} | ||
|label1 = Organization | |label1 = Organization | ||
| Line 19: | Line 44: | ||
|data3 = {{{location|}}} | |data3 = {{{location|}}} | ||
|class3 = label | |class3 = label | ||
| − | |label4 | + | |
| − | |data4 = {{#if:{{{ | + | | label4 = [[Geographic coordinate system|Coordinates]] |
| + | | data4 = {{#if:{{both|{{{latitude|}}}{{{latd|}}}|{{{longitude|}}}{{{longd|}}}}}| | ||
| + | {{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|}}}}}|{{{coordinates|}}}}} | ||
| + | |||
|label5 = Altitude | |label5 = Altitude | ||
|data5 = {{{altitude|}}} | |data5 = {{{altitude|}}} | ||
Revision as of 14:14, 10 January 2015
| 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. |