FANDOM


m (Usage)
(Infobox updated using the portable infobox migration tool)
Line 1: Line 1:
<onlyinclude>
+
<infobox theme="Theme1">
{| class="infobox galaxy-details" cellspacing="2" cellpadding="0"
+
<title source="name">
|-
+
<label>Name</label>
! class="col-header" colspan="2" |<div style="font-size:1.2em;">{{{name}}}</div><div style="font-size: 0.9em; line-height:1.5em; margin:2px 10px;">{{{region}}}</div>
+
<default>{{PAGENAME}}</default>
{{#if: {{{image|}}} | {{!}}-
+
</title>
{{!}} align="center" colspan="2" {{!}}[[Image:{{#if:{{#explode:{{#explode:{{{image}}}|{{!}}|0}}|:|1}}|{{#explode:{{#explode:{{{image}}}|{{!}}|0}}|:|1}}|{{{image}}}}}|258px]] <!-- The code above filters out any instances of [[File:]] and [[Image:]] from the value as it is unneeded in the parameter. Also checks if the resulting string is blank and directly use the image value instead. -->
+
<data source="region"><label>Region</label></data>
}}
+
<image source="image">
|-
+
<caption source="caption"/>
| class="col-caption" colspan="2" |{{{caption}}}
+
</image>
{{#ifeq:{{{worldtype|N/A}}}|N/A||
+
<data source="worldtype"><label>Type</label></data>
{{!}}-
+
<data source="orbitaldistance">
{{!}} class="col-left" {{!}}Type
+
<label>Orbital Distance</label>
{{!}} class="col-right" {{!}}{{{worldtype|N/A}}}
+
<format>{{#if: {{#ifexpr:{{{orbitaldistance}}} }}
}}
 
|-
 
| class="col-left" |Orbital Distance
 
| class="col-right" |{{#if: {{{orbitaldistance}}}
 
|{{#if: {{#ifexpr:{{{orbitaldistance}}} }}
 
 
|{{#switch: {{lc: {{{orbitaldistance}}} }} | classified = Classified | N/A }}
 
|{{#switch: {{lc: {{{orbitaldistance}}} }} | classified = Classified | N/A }}
 
|{{formatnum: {{{orbitaldistance}}} }} {{{orbitaldistanceunits|AU}}}
 
|{{formatnum: {{{orbitaldistance}}} }} {{{orbitaldistanceunits|AU}}}
}}
+
}}</format>
|N/A
+
<default>N/A</default>
}}
+
</data>
|-
+
<data source="orbitalperiod">
| class="col-left" |Orbital Period
+
<label>Orbital Period</label>
| class="col-right" |{{#if: {{{orbitalperiod}}}
+
<format>{{#if: {{#ifexpr:{{{orbitalperiod}}} }}
|{{#if: {{#ifexpr:{{{orbitalperiod}}} }}
 
 
|{{#switch: {{lc: {{{orbitalperiod}}} }} | classified = Classified | N/A }}
 
|{{#switch: {{lc: {{{orbitalperiod}}} }} | classified = Classified | N/A }}
 
|{{formatnum: {{{orbitalperiod}}} }} {{{orbitalperiodunits|Earth {{plural: {{{orbitalperiod}}}|Year|Years}} }}}
 
|{{formatnum: {{{orbitalperiod}}} }} {{{orbitalperiodunits|Earth {{plural: {{{orbitalperiod}}}|Year|Years}} }}}
}}
+
}}</format>
|N/A
+
<default>N/A</default>
}}
+
</data>
|-
+
<data source="kepler">
| class="col-left" |Keplerian Ratio
+
<label>Keplerian Ratio</label>
| class="col-right" |{{#if: {{{kepler}}}
+
<format>{{#if: {{#ifexpr:{{{kepler}}} }}
|{{#if: {{#ifexpr:{{{kepler}}} }}
 
 
|{{#switch: {{lc: {{{kepler}}} }} | classified = Classified | N/A }}
 
|{{#switch: {{lc: {{{kepler}}} }} | classified = Classified | N/A }}
 
|{{formatnum: {{{kepler}}} }}
 
|{{formatnum: {{{kepler}}} }}
}}
+
}}</format>
|{{#if: {{{orbitaldistance}}} | {{#if: {{#ifexpr:{{{orbitaldistance}}} }}
+
<default>{{#if: {{{orbitaldistance}}} | {{#if: {{#ifexpr:{{{orbitaldistance}}} }}
 
|N/A
 
|N/A
 
|{{#if: {{{orbitalperiod}}} | {{#if: {{#ifexpr:{{{orbitalperiod}}} }}
 
|{{#if: {{{orbitalperiod}}} | {{#if: {{#ifexpr:{{{orbitalperiod}}} }}
Line 43: Line 43:
 
}}
 
}}
 
}} |N/A }}
 
}} |N/A }}
}} |N/A }}
+
}} |N/A }}</default>
}}
+
</data>
|-
+
<data source="radius">
| class="col-left" |Radius
+
<label>Radius</label>
| class="col-right" |{{#if: {{{radius}}}
+
<format>{{#if: {{#ifexpr:{{{radius}}} }}
|{{#if: {{#ifexpr:{{{radius}}} }}
 
 
|{{#switch: {{lc: {{{radius}}} }} | classified = Classified | N/A }}
 
|{{#switch: {{lc: {{{radius}}} }} | classified = Classified | N/A }}
 
|{{formatnum: {{{radius}}} }} km
 
|{{formatnum: {{{radius}}} }} km
}}
+
}}</format>
|N/A
+
<default>N/A</default>
}}
+
</data>
|-
+
<data source="daylength">
| class="col-left" |Day Length
+
<label>Day Length</label>
| class="col-right" |{{#if: {{{daylength}}}
+
<format>{{#if: {{#ifexpr:{{{daylength}}} }}
|{{#if: {{#ifexpr:{{{daylength}}} }}
 
 
|{{#switch: {{lc: {{{daylength}}} }} | classified = Classified | N/A }}
 
|{{#switch: {{lc: {{{daylength}}} }} | classified = Classified | N/A }}
 
|{{formatnum: {{{daylength}}} }} {{{daylengthunits|Earth {{plural: {{{daylength}}}|Hour|Hours}} }}}
 
|{{formatnum: {{{daylength}}} }} {{{daylengthunits|Earth {{plural: {{{daylength}}}|Hour|Hours}} }}}
}}
+
}}</format>
|N/A
+
<default>N/A</default>
}}
+
</data>
|-
+
<data source="atmpressure">
| class="col-left" |Atm. Pressure
+
<label>Atm. Pressure</label>
| class="col-right" |{{#if: {{{atmpressure}}}
+
<format>{{#if: {{#ifexpr:{{{atmpressure}}} }}
|{{#if: {{#ifexpr:{{{atmpressure}}} }}
 
 
|{{#switch: {{lc: {{{atmpressure}}} }} | classified = Classified | trace = Trace | N/A }}
 
|{{#switch: {{lc: {{{atmpressure}}} }} | classified = Classified | trace = Trace | N/A }}
 
|{{formatnum: {{{atmpressure}}} }} atm
 
|{{formatnum: {{{atmpressure}}} }} atm
}}
+
}}</format>
|N/A
+
<default>N/A</default>
}}
+
</data>
|-
+
<data source="surfacetemp">
| class="col-left" |Surface Temp
+
<label>Surface Temp</label>
| class="col-right" |{{#if: {{{surfacetemp}}}
+
<format>{{#if: {{#ifexpr:{{{surfacetemp}}} }}
|{{#if: {{#ifexpr:{{{surfacetemp}}} }}
 
 
|{{#switch: {{lc: {{{surfacetemp}}} }} | classified = Classified | N/A }}
 
|{{#switch: {{lc: {{{surfacetemp}}} }} | classified = Classified | N/A }}
 
|{{formatnum: {{{surfacetemp}}} }} &deg;C {{{stnotes|}}}
 
|{{formatnum: {{{surfacetemp}}} }} &deg;C {{{stnotes|}}}
}}
+
}}</format>
|N/A
+
<default>N/A</default>
}}
+
</data>
|-
+
<data source="surfacegrav">
| class="col-left" |Surface Gravity
+
<label>Surface Gravity</label>
| class="col-right" |{{#if: {{{surfacegrav}}}
+
<format>{{#if: {{#ifexpr:{{{surfacegrav}}} }}
|{{#if: {{#ifexpr:{{{surfacegrav}}} }}
 
 
|{{#switch: {{lc: {{{surfacegrav}}} }} | classified = Classified | N/A }}
 
|{{#switch: {{lc: {{{surfacegrav}}} }} | classified = Classified | N/A }}
 
|{{formatnum: {{{surfacegrav}}} }} ''g''
 
|{{formatnum: {{{surfacegrav}}} }} ''g''
}}
+
}}</format>
|N/A
+
<default>N/A</default>
}}
+
</data>
|-
+
<data source="mass">
| class="col-left" |Mass
+
<label>Mass</label>
| class="col-right" |{{#if: {{{mass}}}
+
<format>{{#if: {{#ifexpr:{{{mass}}} }}
|{{#if: {{#ifexpr:{{{mass}}} }}
 
 
|{{#switch: {{lc: {{{mass}}} }} | classified = Classified | N/A }}
 
|{{#switch: {{lc: {{{mass}}} }} | classified = Classified | N/A }}
 
|{{formatnum: {{{mass}}} }} {{{massunits|Earth {{plural:{{{mass}}}|Mass|Masses}}}}}
 
|{{formatnum: {{{mass}}} }} {{{massunits|Earth {{plural:{{{mass}}}|Mass|Masses}}}}}
}}
+
}}</format>
|{{#if: {{{surfacegrav}}} | {{#if: {{#ifexpr:{{{surfacegrav}}} }}
+
<default>{{#if: {{{surfacegrav}}} | {{#if: {{#ifexpr:{{{surfacegrav}}} }}
 
|N/A
 
|N/A
 
|{{#if: {{{radius}}} | {{#if: {{#ifexpr:{{{radius}}} }}
 
|{{#if: {{{radius}}} | {{#if: {{#ifexpr:{{{radius}}} }}
Line 97: Line 97:
 
|{{formatnum:{{#expr:(0.0000000244*{{{surfacegrav}}}*{{{radius}}}*{{{radius}}}) round 3}}}} Earth Masses
 
|{{formatnum:{{#expr:(0.0000000244*{{{surfacegrav}}}*{{{radius}}}*{{{radius}}}) round 3}}}} Earth Masses
 
}} |N/A }}
 
}} |N/A }}
}} |N/A }}
+
}} |N/A }}</default>
}}
+
</data>
|-
+
<data source="satellites"><label>Satellites</label><default>N/A</default></data>
| class="col-left" |Satellites
+
<navigation>{{#ifeq:{{ns:0}}|{{NAMESPACE}}|}}</navigation>
| class="col-right" |{{{satellites|N/A}}}
+
</infobox>
|-
 
|}{{#ifeq:{{ns:0}}|{{NAMESPACE}}|}}
 
</onlyinclude>
 
 
 
<noinclude>
 
<noinclude>
 
{{-}}
 
{{-}}

Revision as of 15:17, March 21, 2017


Usage

All variables below are passed from corresponding {{PlanetDetails}} entries. {{Planet}} controls how the information is presented. Numeric entries usually formatted to number for calculations. Null/invalid entries output N/A.

{{Planet
| name                 = 
| region               = Region of space that the body is located in.
                         Outputs the following information from PlanetDetails:
                         [[{{{cluster}}}]] and [[{{{system}}}]].
| image                = Strips any [[File:]] or [[Image:]] headers passed from
                         PlanetDetails.
| caption              = 
| worldtype            = 
| orbitaldistance      = 
| orbitaldistanceunits = 
| orbitalperiod        = Default measurement is Earth Year/s.
| orbitalperiodunits   = 
| kepler               = 
| radius               = 
| daylength            = Default measurement is Earth Hour/s.
| daylengthunits       = 
| atmpressure          = 
| surfacetemp          = 
| stnotes              = 
| surfacegrav          = 
| mass                 = Can accept and display manual entry.
| massunits            = 
| satellites           = 
}}
Community content is available under CC-BY-SA unless otherwise noted.