<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ANaval_Vessel_Register_URL%2Fdoc</id>
	<title>Module:Naval Vessel Register URL/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ANaval_Vessel_Register_URL%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Naval_Vessel_Register_URL/doc&amp;action=history"/>
	<updated>2026-04-16T03:59:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Naval_Vessel_Register_URL/doc&amp;diff=144082&amp;oldid=prev</id>
		<title>imported&gt;Pppery: Post-move cleanup</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Naval_Vessel_Register_URL/doc&amp;diff=144082&amp;oldid=prev"/>
		<updated>2020-10-22T19:53:16Z</updated>

		<summary type="html">&lt;p&gt;Post-move cleanup&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
== Summary ==&lt;br /&gt;
This module generates links to ships in the Naval Vessel Register (nvr.navy.mil) database. Intended to be used by:&lt;br /&gt;
*{{tlx|Naval Vessel Register URL}}&lt;br /&gt;
*{{tlx|Naval Vessel Register service craft URL}}&lt;br /&gt;
&lt;br /&gt;
NVR have adopted a file naming convention based on a ship&amp;#039;s [[hull classification symbol]] with an appended underscore and some number of digits.  The extra digits do not seem to follow an identifiable pattern so the former rules-based system used here no longer works.&lt;br /&gt;
&lt;br /&gt;
To get round the &amp;#039;new&amp;#039; file format, this version of the module adopts a brute-force mechanism by using a local database that maps a ship&amp;#039;s hull classification symbol to its associated NVR file name.  The database is two large Lua tables maintained at [[Module:Naval Vessel Register URL/data]].&lt;br /&gt;
&lt;br /&gt;
== Using this module from templates ==&lt;br /&gt;
&lt;br /&gt;
=== MakeShipLink ===&lt;br /&gt;
&lt;br /&gt;
This function returns a link to a ship&amp;#039;s page at the Naval Vessel Register website.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeShipLink|id=|title=}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeShipLink}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; — uses the calling template&amp;#039;s parameters&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039; — the ship&amp;#039;s case-insensitive hull classification symbol in one of five forms:&lt;br /&gt;
:#SSBN-659 – the preferred format because it matches the format for hull classification symbols generally used for US Navy ships throughout Wikipedia&lt;br /&gt;
:#SSBN 659&lt;br /&gt;
:#SSBN659&lt;br /&gt;
:#SSBN_659&lt;br /&gt;
:#SSBN_659_1635 – the NVR file name format as of September 2017&lt;br /&gt;
::There are exceptions.  There are three ships listed at the NVR website that do not have hull classification symbols.  These are: {{USS|Constitution}}, {{USS|Maine|ACR-1|6}}, and {{USS|Texas|1892|6}}.  For these three ships, use the ship&amp;#039;s name for this parameter.  The code word OLDIRON, previously used to identify &amp;#039;&amp;#039;Constitution&amp;#039;&amp;#039; is no longer supported.  &lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;2&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;title&amp;#039;&amp;#039;&amp;#039; — A title or label for the link.&lt;br /&gt;
 &lt;br /&gt;
Examples:&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeShipLink|DDG_1000}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; produces  {{#invoke:Naval Vessel Register URL|MakeShipLink|DDG_1000}}&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeShipLink|constitution}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; produces  {{#invoke:Naval Vessel Register URL|MakeShipLink|constitution}}&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeShipLink|maine|USS &amp;#039;&amp;#039;Maine&amp;#039;&amp;#039;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; produces  {{#invoke:Naval Vessel Register URL|MakeShipLink|maine|USS &amp;#039;&amp;#039;Maine&amp;#039;&amp;#039;}}&lt;br /&gt;
&lt;br /&gt;
=== MakeServiceCraftLink ===&lt;br /&gt;
&lt;br /&gt;
This function returns a link to a service craft in the Naval Vessel Register.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeServiceCraftLink|id=|title=}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeServiceCraftLink}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; — uses the calling template&amp;#039;s parameters&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
Parameters:&lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039; — the ship&amp;#039;s case-insensitive hull classification symbol in one of five forms:&lt;br /&gt;
:#YTB-760 – the preferred format because it matches the format for hull classification symbols generally used for US Navy ships throughout Wikipedia&lt;br /&gt;
:#YTB 760&lt;br /&gt;
:#YTB760&lt;br /&gt;
:#YTB_760&lt;br /&gt;
:#YTB_760_5292 – the NVR file name format as of September 2017&lt;br /&gt;
::There are exceptions.  NVR has separate pages for some single and some multiple sections of some floating drydocks. For these, this module adopts a convention similarly used by NVR where each section is distinguished by a letter designator; that letter must be appended to the hull classification symbol used in this parameter; see the examples&lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;2&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;title&amp;#039;&amp;#039;&amp;#039; — A title or label for the link. &lt;br /&gt;
Examples:&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeServiceCraftLink|AFDB-7F}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; produces  {{#invoke:Naval Vessel Register URL|MakeServiceCraftLink|AFDB7F}}&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Naval Vessel Register URL|MakeServiceCraftLink|ytb-760}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; produces  {{#invoke:Naval Vessel Register URL|MakeServiceCraftLink|ytb-760|&amp;#039;&amp;#039;Natick&amp;#039;&amp;#039;}}&lt;/div&gt;</summary>
		<author><name>imported&gt;Pppery</name></author>
	</entry>
</feed>