Template:Infobox aircraft: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (Adding spaces after the copyable examples)
(Doc style; Made it possible to use lists in some of the fields)
Line 8: Line 8:
|data1    = {{{type|}}}
|data1    = {{{type|}}}
|label2  = Author(s)
|label2  = Author(s)
|data2    = {{{authors|}}}
|data2    =
{{{authors|}}}
|label3  = FDM
|label3  = FDM
|data3    = {{{fdm|}}}
|data3    =
{{{fdm|}}}
|label4  = --aircraft=
|label4  = --aircraft=
|data4    = {{#if:{{{fgname|}}}|<tt>{{{fgname|}}}</tt>}}
|data4    =
{{#if:{{{fgname|}}}|<tt>{{{fgname|}}}</tt>}}
|label5  = Status
|label5  = Status
|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    = {{#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 |  }} }} }} }} }} | }} }}
Line 34: Line 37:


== Usage ==
== Usage ==
To use this infobox, simply add the following piece of code at the top of your article. You do not have to fill in all the forms. If one is empty, it won't be shown. Just add as much information as you can find. Check other articles to see how everything works and should look.
Add the following piece of code at the top of the article. Empty fields will not be shown. Check [[Special:WhatLinksHere/Template:Infobox_aircraft|articles using this template]] to see how everything works and should look.
<nowiki>{{</nowiki>'''infobox aircraft'''
<nowiki>|</nowiki> ''name''          =
<nowiki>|</nowiki> ''image''          =
<nowiki>|</nowiki> ''alt''            =
<nowiki>|</nowiki> ''image2''        =
<nowiki>|</nowiki> ''alt2''          =
<nowiki>|</nowiki> ''type''          =
<nowiki>|</nowiki> ''liverydbid''    =
<nowiki>|</nowiki> ''authors''        =
<nowiki>|</nowiki> ''fdm''            =
<nowiki>|</nowiki> ''fgname''        =
<nowiki>|</nowiki> ''status-fdm''    =
<nowiki>|</nowiki> ''status-systems'' =
<nowiki>|</nowiki> ''status-cockpit'' =
<nowiki>|</nowiki> ''status-model''  =
<nowiki>|</nowiki> ''status''        =
<nowiki>|</nowiki> ''development''    =
<nowiki>|</nowiki> ''download''      =
<nowiki>}}</nowiki>


<pre>
All parameters are optional.
{{infobox Aircraft
 
|name =
=== Basic data ===
|image =
; name:  Name of the aircraft
|alt =
 
|type =
; image:  Screenshot of the aircraft
|liverydbid =
 
|authors =
; alt:  Caption for the screenshot
|status =
 
|fdm =
; image2:  Additional screenshot, ''preferably a cockpit screenshot''
|fgname =
 
|download =
; alt2:  Caption for the second screenshot
|development =
 
}}
; type:  Type of aircraft
</pre>
 
; liverydbid:  [[FlightGear livery database|Livery database]] id of the aircraft
 
; authors:  List of authors 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
 
; development:  Link to development repository


=== Adding a second image ===
; download: Download link
Optionally a second image can be added via:
<pre>
|image2 =
|alt2 =
</pre>


=== Aircraft status ===
=== Aircraft status ===
Instead of a custom "status" text, you can also use the available [[Formalizing Aircraft Status|official status system]]. The overall status is auto-calculated and will be displayed. Remove the <tt><nowiki>|status =</nowiki></tt> line if you use the official system and add the following lines, each with a rating on a scale of 0 to 5.
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 <tt><nowiki>|status =</nowiki></tt> line.
 
See [[Formalizing Aircraft Status]] for instructions on how to rate your aircraft.
<pre>
|status-fdm =
|status-systems =
|status-cockpit =
|status-model =
</pre>


See [[Aircraft rating system]] for instructions on how to rate your aircraft.
<!--
=== 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.
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.
Line 77: Line 100:
|ready = aerotow/aircraftmonth/airrefuel/bombable/dualcontrol/rembrandt/spacetrip/thermal
|ready = aerotow/aircraftmonth/airrefuel/bombable/dualcontrol/rembrandt/spacetrip/thermal
</pre>
</pre>
 
-->
}}
}}



Revision as of 11:28, 14 June 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       = 
}}

All parameters are optional.

Basic data

name
Name of the aircraft
image
Screenshot of the aircraft
alt
Caption for the screenshot
image2
Additional screenshot, 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

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.