Template:Infobox aircraft: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Use unfirom infobox template)
Line 1: Line 1:
<includeonly>{| style="background: white; width: 260px; font-size: 90%; text-align: left; border: 1px silver solid; border-collapse: collapse; margin-left:1em; float: right;" cellpadding="3" border="1"
<includeonly>{{Infobox
! colspan="2" style="text-align: center; background-color: #0f7a71; color: white; font-size: larger;" | {{{name}}}
|title    = {{{name|}}}
|-
|image    = {{#if:{{{image|}}}|[[Image:{{{image|}}}{{{!}}}{{{width{{{!}}}270px}}}{{{!}}}{{{alt{{{!}}}}}}]]}}
{{#if:{{{image|}}}|
|caption  = {{{alt}}}
! colspan="2" {{!}} <center>[[Image:{{{image|}}}|{{{width|270px}}}|{{{alt|}}}]]<br/><small>{{{alt|}}}</small></center>|
|image2  = {{#if:{{{image2|}}}|[[Image:{{{image2|}}}{{{!}}}{{{width2{{{!}}}270px}}}{{{!}}}{{{alt2{{{!}}}}}}]]}}
! colspan="2" {{!}} <center>[[Special:UploadWizard|Image requested]]</center>}}
|caption2 = {{{alt2}}}
|-
|label1  = Type
{{#if:{{{image2|}}}|
|data1    = {{{type|}}}
! colspan="2" {{!}} <center>[[Image:{{{image2|}}}|{{{width|270px}}}|{{{alt2|}}}]]<br/><small>{{{alt2|}}}</small></center>|
|label2  = Author(s)
|data2    = {{{authors|}}}
|label3  = FDM
|data3    = {{{fdm|}}}
|label4  = --aircraft=
|data4    = {{{fgname|}}}
|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 |  }} }} }} }} }} | }} }}
|label6  = FDM
|data6    = {{#if:{{{status-fdm|}}}|[[File:stars-{{{status-fdm}}}.png]] }}
|label7  = Systems
|data7    = {{#if:{{{status-systems|}}}|[[File:stars-{{{status-systems}}}.png]]}}
|label8  = Cockpit
|data8    = {{#if:{{{status-cockpit|}}}|[[File:stars-{{{status-cockpit}}}.png]]}}
|label9  = Model
|data9    = {{#if:{{{status-model|}}}|[[File:stars-{{{status-model}}}.png]]}}
|data10  = {{#if:{{{development|}}}|'''[{{{development}}} Development repository]'''}}
|data11  = {{#if:{{{download|}}}|'''[{{{download}}} Download]'''}}
}}
}}
|-
 
{{#if:{{{type|}}}|
{{#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 | }} }} }} }} }}]] | }}
{{!}} width="60px" {{!}}  Type
{{!}} {{!}} {{{type|}}} }}
|-
{{#if:{{{livery|}}}|
{{!}} {{!}}  Liveries
{{!}} {{!}} {{{livery|}}} }}
|-
{{#if:{{{authors|}}}|
{{!}} {{!}}  Author(s)
{{!}} {{!}} {{{authors|}}} }}
|-
{{#if:{{{version|}}}|
{{!}} {{!}}  Version
{{!}} {{!}} {{{version}}} }}
|-
{{#if:{{{fdm|}}}|
{{!}} {{!}} [[FDM]]
{{!}} {{!}} {{{fdm|}}} }}
|-
{{#if:{{{fgname|}}}|
{{!}} {{!}}  --aircraft
{{!}} style="font-family: 'Courier New'" {{!}}  {{{fgname}}} }}
|-
{{!}} style="background-color: #0f7a71; color: white; font-size: larger;" {{!}} Status
{{#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 |  }} }} }} }} }} | }} }}
|-
{{#if:{{{status-fdm|}}}|
{{!}} {{!}}  FDM
{{!}} {{!}} [[File:stars-{{{status-fdm}}}.png]] }}
|-
{{#if:{{{status-systems|}}}|
{{!}} {{!}}  Systems
{{!}} {{!}} [[File:stars-{{{status-systems}}}.png]] }}
|-
{{#if:{{{status-cockpit|}}}|
{{!}} {{!}}  Cockpit
{{!}} {{!}} [[File:stars-{{{status-cockpit}}}.png]] }}
|-
{{#if:{{{status-model|}}}|
{{!}} {{!}}  Model
{{!}} {{!}} [[File:stars-{{{status-model}}}.png]] }}
|-
{{#if:{{{ready|}}}|
{{!}} colspan="2" style="text-align: center;" {{!}}
{{Ready|{{#titleparts: /{{{ready|}}} | 1 }}}}
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 2 }}}}
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 3 }}}}
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 4 }}}}
{{Ready|{{#titleparts: /{{{ready|}}} | 1 | 5 }}}}
}}
<!-- comment out ratingbar, as extension is disabled
|-
{{!}} colspan="2" style="text-align: center;" {{!}} <w4g_ratingbar style="stars"/>
-->
|-
{{#if:{{{download|}}}|
{{!}} colspan="2" style="text-align: center;" {{!}} '''[{{{download}}} Download]'''  }}
|-
{{#if:{{{liverydbid|}}}|
{{!}} colspan="2" style="text-align: center;" {{!}} '''[http://liveries.flightgear.org/aircraft.php?id={{{liverydbid|}}}&display=2 Livery database]'''  }}
|-
{{#if:{{{development|}}}|
{{!}} colspan="2" style="text-align: center;" {{!}} '''[{{{development}}} Development]'''  }}
|}{{#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]]}}</includeonly><!--
{{#if: {{{image}}} | | [[Category:Image requested]]}}</includeonly><!--



Revision as of 13:27, 3 June 2012

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

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.

{{infobox Aircraft
|name 			=
|image 			=
|alt 			=
|type 			=
|livery 		=
|liverydbid		=
|authors 		=
|status 		=
|version 		=
|fdm 			=
|fgname 		=
|download 		=
|development 		=
}}

Adding a second image

Optionally a second image can be added via:

|image2			=
|alt2			=

Aircraft status

Instead of a custom "status" text, you can also use the available official status system. The overall status is auto-calculated and will be displayed. Remove the |status = line if you use the official system and add the following lines, each with a rating on a scale of 0 to 5.

See Formalizing Aircraft Status for instructions on how to rate your aircraft.

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

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.

Using airrefuel, bombable, spacetrip, dualcontrol will add the page to the categories Air refueling ready, Bombable aircraft, Aerospace and Dual control aircraft respectively.

|ready			= aerotow/aircraftmonth/airrefuel/bombable/spacetrip/thermal/dualcontrol