Difference between revisions of "Template:Infobox observatory/doc"

From blackwiki
Jump to navigation Jump to search
imported>Sardanaphalus
(→‎See also: template, DEFAULTSORT)
imported>Mike Peel
(Update documentation)
Line 1: Line 1:
 
{{documentation subpage}}
 
{{documentation subpage}}
 
== Usage ==
 
== Usage ==
 +
=== Simple ===
 +
<pre>{{Infobox telescope}}</pre>
 +
 +
Data will be automatically included from Wikidata.
 +
 +
=== Full ===
 +
{{Infobox observatory
 +
|name            = {{{name}}}
 +
|image          = {{{image}}}
 +
|caption        = {{{caption}}}
 +
|organization    = {{{organization}}}
 +
|code            = {{{code}}}
 +
|location        = {{{location}}}
 +
|coords          = {{{coords}}}
 +
|altitude        = {{{altitude}}}
 +
|weather        = {{{weather}}}
 +
|established    = {{{established}}}
 +
|closed          = {{{closed}}}
 +
|website        = {{{website}}}
 +
|telescope1_name = {{{telescope1_name}}}
 +
|telescope1_type = {{{telescope1_type}}}
 +
|telescope2_name = {{{telescope2_name}}}
 +
|telescope2_type = {{{telescope2_type}}}
 +
|telescope3_name = ...
 +
|telescope3_type = ...
 +
|telescope30_name= {{{telescope30_name}}}
 +
|telescope30_type= {{{telescope30_type}}}
 +
}}
 +
 
<pre style="overflow:auto">
 
<pre style="overflow:auto">
 
{{Infobox observatory
 
{{Infobox observatory
Line 26: Line 55:
 
}}
 
}}
 
</pre>
 
</pre>
{{Infobox observatory
+
===Parameters===
|name            = {{{name}}}
+
This template returns values from [[Wikidata]] where they are available; these values can be overridden by passing values to the relevant parameters.
|image          = {{{image}}}
+
 
|caption        = {{{caption}}}
 
|organization    = {{{organization}}}
 
|code            = {{{code}}}
 
|location        = {{{location}}}
 
|coords          = {{{coords}}}
 
|altitude        = {{{altitude}}}
 
|weather        = {{{weather}}}
 
|established    = {{{established}}}
 
|closed          = {{{closed}}}
 
|website        = {{{website}}}
 
|telescope1_name = {{{telescope1_name}}}
 
|telescope1_type = {{{telescope1_type}}}
 
|telescope2_name = {{{telescope2_name}}}
 
|telescope2_type = {{{telescope2_type}}}
 
|telescope3_name = ...
 
|telescope3_type = ...
 
|telescope30_name= {{{telescope30_name}}}
 
|telescope30_type= {{{telescope30_type}}}
 
}}
 
 
{| class="wikitable"
 
{| class="wikitable"
! Parameter !! Description</tr>
+
! Parameter       !! Default !! Description
|colspan="2" style="background:#eaeaea;"| Required parameters in '''bold'''
+
|-
 +
| '''name'''  || || The name of the observatory.
 +
|-
 +
| background  || || The colour of the background of the table.
 +
|-
 +
| image        || {{wdp|P18}} || The image for the infobox (use full wikicode).
 +
|-
 +
| caption      || || A caption for the image.
 +
|-
 +
| organization || {{wdp|P137}} || The organization responsible for the observatory.
 +
|-
 +
| code        || || Observatory code.
 +
|-
 +
| location    || || The observatory's location.
 +
|-
 +
| coords      || || Location coordinates. Use {{tl|coord}} with ''display=inline,title''
 +
|-
 +
| altitude    || || The altitude of the observatory.
 +
|-
 +
| established  || || When the observatory was established. Use  {{Tl|Start date}}
 +
|-
 +
| closed      || || When the observatory was closed, if appropriate.
 +
|-
 +
| website      || {{wdp|P856}} || The URL of the website for the observatory. Use {{tl|URL}}
 +
|-
 +
| telescope1_name  || || The name of the observatory's first telescope.
 +
|-
 +
| telescope1_type  || || First telescope's type (and any additional information).
 +
|-
 +
| telescope2_name  || || The name of the observatory's second telescope.
 +
|-
 +
| telescope2_type  || || Second telescope's type (and any additional information).
 +
|-
 +
|colspan="2"| ''etc...''.
 +
|-
 +
| telescope29_name || || The name of the observatory's twenty-ninth telescope.
 +
|-
 +
| telescope29_type || || Twenty-ninth telescope's type (and any additional information).
 
|-
 
|-
| '''name'''  || The name of the observatory.</tr>
+
| telescope30_name || || The name of the thirtieth telescope.
| background  || The colour of the background of the table.</tr>
 
| image        || The image for the infobox (use full wikicode).</tr>
 
| caption      || A caption for the image.</tr>
 
| organization || The organization responsible for the observatory.</tr>
 
| code        || Observatory code.</tr>
 
| location    || The observatory's location.</tr>
 
| coords      || Location coordinates. Use {{tl|coord}} with ''display=inline,title''</tr>
 
| altitude    || The altitude of the observatory.</tr>
 
| established  || When the observatory was established. Use  {{Tl|Start date}}</tr>
 
| closed      || When the observatory was closed, if appropriate.</tr>
 
| website      || The URL of the website for the observatory. Use {{tl|URL}}</tr>
 
 
|-
 
|-
| telescope1_name  || The name of the observatory's first telescope.</tr>
+
| telescope30_type || || Thirtieth telescope's type (and any additional information).
| telescope1_type  || First telescope's type (and any additional information).</tr>
 
| telescope2_name  || The name of the observatory's second telescope.</tr>
 
| telescope2_type  || Second telescope's type (and any additional information).</tr>
 
|colspan="2"| ''etc...''.</tr>
 
| telescope29_name || The name of the observatory's twenty-ninth telescope.</tr>
 
| telescope29_type || Twenty-ninth telescope's type (and any additional information).</tr>
 
| telescope30_name || The name of the thirtieth telescope.</tr>
 
| telescope30_type || Thirtieth telescope's type (and any additional information).</tr>
 
 
|}
 
|}
  

Revision as of 23:13, 14 January 2016

Usage

Simple

{{Infobox telescope}}

Data will be automatically included from Wikidata.

Full

{{{name}}}
[[File:{{{image}}}|frameless|upright=1]]
{{{caption}}}
Alternative namesScript error: No such module "Wikidata".Script error: No such module "EditAtWikidata".
Organization{{{organization}}}
Observatory code{{{code}}}
LocationLua error in Module:WikidataIB at line 1528: attempt to index field 'wikibase' (a nil value).
Coordinates{{{coords}}}
Altitude{{{altitude}}}
Weather{{{weather}}}
Established{{{established}}}
Closed{{{closed}}}
Website{{{website}}}
Telescopes
{{{telescope1_name}}}{{{telescope1_type}}}
{{{telescope2_name}}}{{{telescope2_type}}}
......
{{{telescope30_name}}}{{{telescope30_type}}}
Template:Wikidata location map
Commons page [[Commons:Category:Lua error in Module:WikidataIB at line 497: attempt to index field 'wikibase' (a nil value).|Related media on Wikimedia Commons]]
{{Infobox observatory
|name            = {{SUBST:PAGENAME}}
|background      = 
|image           = 
|caption         = 
|organization    = 
|code            = 
|location        = 
|coords          = <!-- {{Coord|LAT|LONG|type:landmark|display=inline,title}} -->
|altitude        = 
|weather         = 
|established     = <!-- {{Start date|YYYY|MM|DD}} -->
|closed          = 
|website         = <!-- {{URL|example.com}} -->
|telescope1_name = 
|telescope1_type = 
|telescope2_name = 
|telescope2_type = 
|telescope3_name = 
|telescope3_type = 
|telescope4_name = 
|telescope4_type = 
}}

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 The name of the observatory.
background The colour of the background of the table.
image Template:Wdp The image for the infobox (use full wikicode).
caption A caption for the image.
organization Template:Wdp The organization responsible for the observatory.
code Observatory code.
location The observatory's location.
coords Location coordinates. Use {{coord}} with display=inline,title
altitude The altitude of the observatory.
established When the observatory was established. Use {{Start date}}
closed When the observatory was closed, if appropriate.
website Template:Wdp The URL of the website for the observatory. Use {{URL}}
telescope1_name The name of the observatory's first telescope.
telescope1_type First telescope's type (and any additional information).
telescope2_name The name of the observatory's second telescope.
telescope2_type Second telescope's type (and any additional information).
etc....
telescope29_name The name of the observatory's twenty-ninth telescope.
telescope29_type Twenty-ninth telescope's type (and any additional information).
telescope30_name The name of the thirtieth telescope.
telescope30_type Thirtieth telescope's type (and any additional information).

Examples of use

Microformat

Template:UF-hcard-geo

See also

Template:Organization infoboxes