Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Difference between revisions of "Template:Infobox aircraft"

From FlightGear wiki
Jump to: navigation, search
m (Tiny fix for smaller monitors)
(Integrate)
Line 16: Line 16:
 
|data4    =
 
|data4    =
 
{{#if:{{{fgname|}}}|<tt>{{{fgname|}}}</tt>}}
 
{{#if:{{{fgname|}}}|<tt>{{{fgname|}}}</tt>}}
|label5  = [[Aircraft rating system|Status]]
+
|label5 = Ready
|data5   = {{#if:{{{status|}}}|{{{status}}} | {{#if: {{{status-fdm|}}} | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 17 | Advanced production | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 15 | Production | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 11 | Early production | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 8 | Beta | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} < 9 | Alpha |  }} }} }} }} }} | }} }}
+
|data5 = {{Ready|{{#titleparts:/{{{ready|}}}|1|2}}}} <!--
|label6   = FDM
+
-->{{Ready|{{#titleparts:/{{{ready|}}}|1|3}}}} <!--
|data6   = {{#if:{{{status-fdm|}}}|[[File:stars-{{{status-fdm}}}.png]] }}
+
-->{{Ready|{{#titleparts:/{{{ready|}}}|1|4}}}} <!--
|label7   = Systems
+
-->{{Ready|{{#titleparts:/{{{ready|}}}|1|5}}}} <!--
|data7   = {{#if:{{{status-systems|}}}|[[File:stars-{{{status-systems}}}.png]]}}
+
-->{{Ready|{{#titleparts:/{{{ready|}}}|1|6}}}} <!--
|label8   = Cockpit
+
-->{{Ready|{{#titleparts:/{{{ready|}}}|1|7}}}} <!--
|data8   = {{#if:{{{status-cockpit|}}}|[[File:stars-{{{status-cockpit}}}.png]]}}
+
-->{{Ready|{{#titleparts:/{{{ready|}}}|1|8}}}}
|label9   = Model
+
|label6   = [[Aircraft_rating_system|Status]]
|data9   = {{#if:{{{status-model|}}}|[[File:stars-{{{status-model}}}.png]]}}
+
|data6   = {{#if:{{{status|}}}|{{{status}}} | {{#if: {{{status-fdm|}}} | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 17 | Advanced production | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 15 | Production | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 11 | Early production | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 8 | Beta | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} < 9 | Alpha |  }} }} }} }} }} | }} }}
|data10   = {{#if:{{{development|}}}|[{{{development}}} Development repository]}}
+
|label7   = FDM
|data11   = {{#if:{{{download|}}}|[{{{download}}} Download]}}
+
|data7   = {{#if:{{{status-fdm|}}}|[[File:stars-{{{status-fdm}}}.png]] }}
|data12   = {{#if:{{{liverydbid|}}}|[http://liveries.flightgear.org/aircraft.php?id={{{liverydbid|}}}&display=2 Livery database]}}
+
|label9   = Systems
}}{{#if: {{{status-fdm|}}} | [[Category:Aircraft status: {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 17 | Advanced production | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 15 | Production | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 11 | Early production | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 8 | Beta | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} < 9 | Alpha | }} }} }} }} }}]] | }}{{#if: {{{image}}} | | [[Category:Image requested]]}}
+
|data9   = {{#if:{{{status-systems|}}}|[[File:stars-{{{status-systems}}}.png]]}}
{{#if:{{{ready|}}}|
+
|label10   = Cockpit
{{Ready|{{#titleparts: /{{{ready|}}} | 1 }}}}
+
|data10   = {{#if:{{{status-cockpit|}}}|[[File:stars-{{{status-cockpit}}}.png]]}}
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 2 }}}}
+
|label11   = Model
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 3 }}}}
+
|data11   = {{#if:{{{status-model|}}}|[[File:stars-{{{status-model}}}.png]]}}
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 4 }}}}
+
|data12   = {{#if:{{{development|}}}|[{{{development}}} Development repository]}}
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 5 }}}}
+
|data13   = {{#if:{{{download|}}}|[{{{download}}} Download]}}
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 6 }}}}
+
|data14   = {{#if:{{{liverydbid|}}}|[http://liveries.flightgear.org/aircraft.php?id={{{liverydbid|}}}&display=2 Livery database]}}
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 7 }}}}
+
}}<!--
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 8 }}}}
+
-->{{#if: {{{status-fdm|}}} | [[Category:Aircraft status: {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 17 | Advanced production | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 15 | Production | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 11 | Early production | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} > 8 | Beta | {{#ifexpr: {{#expr: {{{status-fdm|}}}+{{{status-systems|}}}+{{{status-cockpit|}}}+{{{status-model|}}} }} < 9 | Alpha | }} }} }} }} }}]] | }}{{#if: {{{image}}} | | [[Category:Image requested]]}}
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 9 }}}}
+
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 10 }}}}
+
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 11 }}}}
+
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 12 }}}}
+
}}
+
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
{{Informative template|1=
 
{{Informative template|1=
Line 91: Line 86:
 
; type:  Type of aircraft
 
; type:  Type of aircraft
  
; liverydbid:  [[FlightGear livery database|Livery database]] id of the aircraft
+
; liverydbid:  [[FlightGear_livery_database|Livery database]] ID of the aircraft
  
 
; authors:  List of authors of the aircraft
 
; authors:  List of authors of the aircraft
  
; fdm:  [[Flight Dynamics Model|FDM]] of the aircraft
+
; fdm:  [[Flight_Dynamics_Model|FDM]] of the aircraft
  
 
; fgname:  The name of the aircraft to use when launching FlightGear from the command line
 
; fgname:  The name of the aircraft to use when launching FlightGear from the command line
Line 111: Line 106:
  
 
=== Ready icons ===
 
=== Ready icons ===
Several icons are available to indicate certain capabilities of the aircraft.  You can add up to five icons to one aircraft.  Separate them with slashes.  They can be in any order.  Using <tt>airrefuel</tt>, <tt>bombable</tt>, <tt>dualcontrol</tt>, <tt>rembrandt</tt>, <tt>spacetrip</tt> will add the page to the categories [[:Category:Air refueling ready|Air refueling ready]], [[:Category:Bombable aircraft|Bombable aircraft]], [[:Category:Dual control aircraft|Dual control aircraft]], [[:Category:Rembrandt aircraft|Rembrandt aircraft]] and [[:Category:Spacecraft|Spacecraft]] respectively.  There full list is:
+
Several icons are available to indicate certain capabilities of the aircraft.  Separate them with slashes.  They can be in any order.  For example, using <tt>airrefuel</tt>, <tt>bombable</tt>, <tt>dualcontrol</tt> and <tt>rembrandt</tt> will add the page to the categories [[:Category:Air refueling ready|Air refueling ready]], [[:Category:Bombable aircraft|Bombable aircraft]], [[:Category:Dual control aircraft|Dual control aircraft]] and [[:Category:Rembrandt aircraft|Rembrandt aircraft]] respectively.  The full list is:
<pre style="white-space: pre-wrap;">
+
<pre>|ready = airrefuel/bombable/dualcontrol/rembrandt/canvas/checklist/tutorials</pre>
|ready = aerotow/aircraftmonth/airrefuel/bombable/dualcontrol/rembrandt/spacetrip/thermal/canvas/checklist/routemanager/tutorials
+
</pre>
+
  
 
}}
 
}}

Revision as of 12:26, 16 November 2014


The following template description is not displayed when the template is inserted in an article.

Goal

This infobox is used to summarize an aircraft's key points.

Usage

Add the following piece of code at the top of the article. Empty fields will not be shown. Check articles using this template to see how everything works and should look.

{{infobox aircraft
| name           = 
| image          = 
| alt            = 
| image2         = 
| alt2           = 
| type           = 
| liverydbid     = 
| authors        = 
| fdm            = 
| fgname         = 

| status-fdm     = 
| status-systems = 
| status-cockpit = 
| status-model   = 

| status         = 

| development    = 
| download       = 
| ready          =  
}}

All parameters are optional.

Basic data

name
Name of the aircraft
image
Screenshot of the aircraft without a File: or Image: prefix
alt
Caption for the screenshot
image2
Additional screenshot without a File: or Image: prefix, preferably a cockpit screenshot
alt2
Caption for the second screenshot
type
Type of aircraft
liverydbid
Livery database ID of the aircraft
authors
List of authors of the aircraft
fdm
FDM of the aircraft
fgname
The name of the aircraft to use when launching FlightGear from the command line
development
Link to development repository
download
Download link
ready
Adds icons to display certain capabilities of the aircraft

Aircraft status

Instead of a custom "status" text, you can use the aircraft rating system. The overall status is auto-calculated and will be displayed. If you use the aircraft rating system, remove the |status = line.

See Aircraft rating system for instructions on how to rate your aircraft.

Ready icons

Several icons are available to indicate certain capabilities of the aircraft. Separate them with slashes. They can be in any order. For example, using airrefuel, bombable, dualcontrol and rembrandt will add the page to the categories Air refueling ready, Bombable aircraft, Dual control aircraft and Rembrandt aircraft respectively. The full list is:

|ready = airrefuel/bombable/dualcontrol/rembrandt/canvas/checklist/tutorials