Help:Templates: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (→‎Small collection of various templates: message box → messagebox for consistancy)
(Moved the infoboxes to Help:List of infobox templates and added a few more of them there)
Line 25: Line 25:


== Small collection of various templates ==
== Small collection of various templates ==
For a rather complete list of messagebox templates, see [[Help:List of messagebox templates]].
{{hatnote|For rather complete lists of infobox and messagebox templates, see [[Help:List of infobox templates]] and [[Help:List of messagebox templates]].}}


{| border=1 cellpadding=3 style="border: 1px #AAAAAA solid; border-collapse: collapse;background:#ffffff;"
{| border=1 cellpadding=3 style="border: 1px #AAAAAA solid; border-collapse: collapse;background:#ffffff;"
Line 49: Line 49:
|
|
|}
|}
== Infoboxes ==
=== Aircraft ===
{{infobox Aircraft
|image =A380.jpg
|name =Airbus A380
|type =Airliner
|livery =British Airways, Emirates Airline, Singapore Airlines
|authors = Ampere K.
|fdm =JSBSim
|status =Under development
|fgname =<tt>A380</tt>
}}
{{-}}
=== Airport ===
{{infobox Airport
|name = Amsterdam Airport Schiphol
|image =EHAM.jpg
|alt =Schiphol in the [[FlightGear NL]] scenery
|iata =AMS
|icao =EHAM
|type =public
|owner =Schiphol Group
|city =Amsterdam, The Netherlands
|runway= 18R/36L
|length= 3800 m 
|material= Asfalt
|runway2= 06/24
|length2= 3490 m 
|material2=Asfalt
|website =http://www.schiphol.nl
}}
{{-}}
=== User ===
{{User
|name = Jack
|location = New York, United States
|age = 21
|job = Pilot
|interests = FlightGear, Computers, Aircraft
|callsign = jackie
|favourite =[[Boeing 747-400]], [[Cessna C172]]
|website =[http://www.jp.flightgear.org http://www.jp.flightgear.org]
}}


[[Category:Help]]
[[Category:Help]]

Revision as of 11:02, 7 November 2013

This page is meant to help you with the use of templates on the wiki.

Editing or creating templates

Editing a template is almost as easy as editing a normal wiki page. Lets say, you want to edit a template with the name "what you always wanted to know". To do so open "wiki.flightgear.org/Template:what_you_always_wanted_to_know" (mind the underscores, that replace the spaces!). If you created a new template, you can embed it in any wiki article from now on by writing: {{what you always wanted to know}} (insert the template name here).

Translating templates

Translating templates is working different than translating normal articles. All translations are written in the same file. The translated text (in this case a German and a Spanish one) is surrounded by the following construct:

{{ #ifeq: {{#titleparts: {{PAGENAME}} | 1 }} | De | German text... | {{ #ifeq: {{#titleparts: {{PAGENAME}} | 1 }} | Es | Spanish text... | English text... }} }}

This is a script, which tells the wiki software, that the block containing the German text should only be evaluated, if the name of the page, the template is embedded in, contains the "De" text pattern, which can be found in all names of German wiki-pages. The Spanish translation is treated the same way. If none of the language codes is found in the pages name, we can be sure, it is an English one or another language, which is not handled so far by the template and apply the English version of the text. Do not forget the closing brackets at the end. You need two of them for every translation, except for the English. Of course this works for any language. Just look up your language code.


Small collection of various templates

Tag Text that will be shown Place
{{abc}}

  A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z 


Top
{{Boeing}} Bottom
{{Building}} Bottom
{{Main article|Link to article}}

1rightarrow.png See Link to article for the main article about this subject.