Difference between revisions of "Template:Airreg"

From blackwiki
Jump to navigation Jump to search
blackwiki>Deeday-UK
(link to UK CAA G-INFO search updated)
blackwiki>Shelbystripes
(Adding registration number to generated citation; this will help with pages involving multiple aircraft, such as USAir Flight 1493)
Line 1: Line 1:
 
{{#switch: {{{1|}}}
 
{{#switch: {{{1|}}}
 
   |C
 
   |C
   |CF = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=Canadian Civil Aircraft Register|url=http://wwwapps.tc.gc.ca/Saf-Sec-Sur/2/CCARCS-RIACC/RchHsRes.aspx?st=2&m={{!}}{{{2}}}{{!}}&rfr2=RchHs.aspx|website=Transport Canada}}}}
+
   |CF = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=Canadian Civil Aircraft Register ({{{1}}}-{{{2}}}) |url=http://wwwapps.tc.gc.ca/Saf-Sec-Sur/2/CCARCS-RIACC/RchHsRes.aspx?st=2&m={{!}}{{{2}}}{{!}}&rfr2=RchHs.aspx|website=Transport Canada}}}}
   |G  = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=GINFO Database|url=http://publicapps.caa.co.uk/modalapplication.aspx?catid=1&pagetype=65&appid=1&mode=detailnosummary&fullregmark={{{2}}}|website=Civil Aviation Authority}}}}
+
   |G  = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=GINFO Database ({{{1}}}-{{{2}}}) |url=http://publicapps.caa.co.uk/modalapplication.aspx?catid=1&pagetype=65&appid=1&mode=detailnosummary&fullregmark={{{2}}}|website=Civil Aviation Authority}}}}
   |HB = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=Swiss Aircraft Registry|url=http://www.bazl.admin.ch/experten/luftfahrzeuge/luftfahrzeugregister/index.html?lang=en&nummer={{{2}}}|website=Federal Office of Civil Aviation}}}}
+
   |HB = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=Swiss Aircraft Registry ({{{1}}}-{{{2}}}) |url=http://www.bazl.admin.ch/experten/luftfahrzeuge/luftfahrzeugregister/index.html?lang=en&nummer={{{2}}}|website=Federal Office of Civil Aviation}}}}
 
   |HL = {{{1}}}{{{2}}}{{{3|}}}
 
   |HL = {{{1}}}{{{2}}}{{{3|}}}
 
   |JA = {{{1}}}{{{2}}}{{{3|}}}
 
   |JA = {{{1}}}{{{2}}}{{{3|}}}
   |N  = {{{1}}}{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=FAA Registry|url=http://registry.faa.gov/aircraftinquiry/NNum_Results.aspx?NNumbertxt={{{1}}}{{{2}}}|website=Federal Aviation Administration}}}}
+
   |N  = {{{1}}}{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=FAA Registry ({{{1}}}{{{2}}}) |url=http://registry.faa.gov/aircraftinquiry/NNum_Results.aspx?NNumbertxt={{{1}}}{{{2}}}|website=Federal Aviation Administration}}}}
   |OY = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=Statens Luftfartsvæsen|url=http://dcaa.trafikstyrelsen.dk/natregister/index.php?phplens_natreg_soeg_ny=filterview&num=10&lens_F0%5B%5D=%3D+Flyvemaskine&lens_F0_max=5&lens_F0_Exact=1&lens_F1={{{1}}}-{{{2}}}&_match_natreg_soeg_ny=2&PHPLENS_Filter=S%F8g&_urlParams_=LeNs|website=Danish Transport Authority}}}}
+
   |OY = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=Statens Luftfartsvæsen ({{{1}}}-{{{2}}}) |url=http://dcaa.trafikstyrelsen.dk/natregister/index.php?phplens_natreg_soeg_ny=filterview&num=10&lens_F0%5B%5D=%3D+Flyvemaskine&lens_F0_max=5&lens_F0_Exact=1&lens_F1={{{1}}}-{{{2}}}&_match_natreg_soeg_ny=2&PHPLENS_Filter=S%F8g&_urlParams_=LeNs|website=Danish Transport Authority}}}}
   |PH = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=Civil aircraft register|url=http://www.newfoundland.nl/luchtvaartregister/user/en/luchtvaartuig.php?registratie={{{1}}}-{{{2}}}|website=Inspectie Leefomgeving en Transport}}}}
+
   |PH = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web |title=Civil aircraft register ({{{1}}}-{{{2}}}) |url=http://www.newfoundland.nl/luchtvaartregister/user/en/luchtvaartuig.php?registratie={{{1}}}-{{{2}}}|website=Inspectie Leefomgeving en Transport}}}}
 
   |PP
 
   |PP
 
   |PR
 
   |PR
 
   |PS
 
   |PS
 
   |PT
 
   |PT
   |PU = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=Registro Aeronáutico Brasileiro|url=http://www2.anac.gov.br/aeronaves/cons_rab_print.asp?nf={{{1}}}{{{2}}}|website=Agência Nacional de Aviação Civil}}}}
+
   |PU = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web |title=Registro Aeronáutico Brasileiro ({{{1}}}-{{{2}}}) |url=http://www2.anac.gov.br/aeronaves/cons_rab_print.asp?nf={{{1}}}{{{2}}}|website=Agência Nacional de Aviação Civil}}}}
   |VH = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=CASA Aircraft Register|url=http://casa-query.funnelback.com/search/search.cgi?collection=casa_aircraft_register&meta_v_sand={{{2}}}|website=Civil Aviation Safety Authority}}}}
+
   |VH = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web |title=CASA Aircraft Register ({{{1}}}-{{{2}}}) |url=http://casa-query.funnelback.com/search/search.cgi?collection=casa_aircraft_register&meta_v_sand={{{2}}}|website=Civil Aviation Safety Authority}}}}
   |ZK = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=Active Aircraft Register|url=http://www.caa.govt.nz/Script/AirReg3_new.asp?Mark={{{2}}}|website=Civil Aviation Authority of New Zealand}}}}
+
   |ZK = {{{1}}}-{{{2}}}{{{3|}}}{{#tag:ref|{{cite web|title=Active Aircraft Register ({{{1}}}-{{{2}}}) |url=http://www.caa.govt.nz/Script/AirReg3_new.asp?Mark={{{2}}}|website=Civil Aviation Authority of New Zealand}}}}
 
   |#default = {{{1}}}-{{{2}}}{{{3|}}}
 
   |#default = {{{1}}}-{{{2}}}{{{3|}}}
 
}}<noinclude>{{documentation}}</noinclude>
 
}}<noinclude>{{documentation}}</noinclude>

Revision as of 22:37, 28 December 2017

{{{1}}}-{{{2}}}

Template documentation[view] [edit] [history] [purge]

The Airreg template can be used to generate footnote references to entries in aviation authority registries for the desired aircraft registration; for example: {{Airreg|N|470A}} produces:

N470A[1]

Template:Reflist-talk

Only a limited number of national registries are supported (see below), i.e. those whose websites allow registration-based searches via URL parameters (HTTP GET requests).

Editors beware: formatting of code to make it "look nice" is likely to inadvertently introduce leading and trailing blank lines into the template output.

Usage

The template takes three positional parameters:

  1. Country prefix
  2. Registration string
  3. Punctuation (optional)

The prefix can be any of the ICAO country prefixes, although only for supported countries a footnote reference will be generated. For non-supported countries, the template simply outputs the registration in full, e.g. {{Airreg|TZ|AMK}} produces TZ-AMK

Any punctuation that is required to be placed before the citation marker (per WP:PAIC) can be specified as third parameter, e.g. {{Airreg|N|470A|,}} produces:

N470A,[2]

Template:Reflist-talk

Supported country prefixes

    _
C    |
CF  _> Canada

G   United Kingdom  (see note 1)
HB  Switzerland
N   United States (see note 2)
OY  Denmark
PH  Netherlands
    _
PP   |
PR   |
PS    > Brazil
PT   |
PU  _|

VH  Australia
ZK  New Zealand

Notes

  1. As of February 2018, the G-INFO register has removed support for HTTP GET search requests, therefore this template simply links to the main G-INFO search page.
  2. Pre-1949 registrations (NC, NX etc.) are not supported and cause the FAA registry website to return a 'Can Not Process Your Request At This Time' error. The use of the Airreg template in these cases is not recommended.
  3. South Korea (HL) and Japan (JA) are not supported, but are listed in the code among the supported prefixes, in order for the complete registration to be correctly outputted without a hyphen, unlike the default case that covers all other non-supported nations.
  1. "FAA Registry (N470A)". Federal Aviation Administration.
  2. "FAA Registry (N470A)". Federal Aviation Administration.