<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bharatpedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox_ship</id>
	<title>Module:Infobox ship - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.bharatpedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox_ship"/>
	<link rel="alternate" type="text/html" href="https://en.bharatpedia.org/w/index.php?title=Module:Infobox_ship&amp;action=history"/>
	<updated>2026-10-25T01:10:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://en.bharatpedia.org/w/index.php?title=Module:Infobox_ship&amp;diff=556128&amp;oldid=prev</id>
		<title>WikiDwarf: Add missing module</title>
		<link rel="alternate" type="text/html" href="https://en.bharatpedia.org/w/index.php?title=Module:Infobox_ship&amp;diff=556128&amp;oldid=prev"/>
		<updated>2026-06-06T05:53:09Z</updated>

		<summary type="html">&lt;p&gt;Add missing module&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;strict&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
local utilities = require (&amp;#039;Module:WPSHIPS_utilities&amp;#039;);&lt;br /&gt;
local infobox = require (&amp;#039;Module:Infobox&amp;#039;).infobox;&lt;br /&gt;
local infobox_ship_flag = utilities._infobox_ship_flag;&lt;br /&gt;
local ship_name_format = utilities._ship_name_format;&lt;br /&gt;
local synonym_check = utilities._synonym_check;&lt;br /&gt;
local unbulleted_list = utilities._unbulleted_list;&lt;br /&gt;
&lt;br /&gt;
local get_args = require (&amp;#039;Module:Arguments&amp;#039;).getArgs;&lt;br /&gt;
&lt;br /&gt;
local data = mw.loadData (&amp;#039;Module:Infobox_ship/data&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; L I N E _ I T E M S &amp;gt;-----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
spin through &amp;lt;params_t&amp;gt; sequence.  Get parameter name and matching infobox label.  Look in &amp;lt;args_t&amp;gt; for parameter name.  When parameter&lt;br /&gt;
name has a value, add infobox label and parameter value to the infobox table &amp;lt;infobox_ship_t&amp;gt;.  &amp;lt;i&amp;gt; identifies where label and data&lt;br /&gt;
enumerators begin.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function line_items (args_t, params_t, infobox_ship_t, i, frame)&lt;br /&gt;
	for _, v in ipairs (params_t) do											-- v is a sequence table with parameter name and associated infobox label&lt;br /&gt;
		if args_t[v[1]] then													-- if parameter has a value&lt;br /&gt;
			infobox_ship_t[&amp;#039;label&amp;#039; .. i] = v[2];								-- add the label&lt;br /&gt;
			infobox_ship_t[&amp;#039;data&amp;#039; .. i] = unbulleted_list (args_t[v[1]]);		-- and add the parameter value as data&lt;br /&gt;
			i = i + 1;															-- bump the enumerator&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; A D D _ W A R N I N G &amp;gt;--------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
for unknown parameters, add a message in the edit-preview message box&lt;br /&gt;
&lt;br /&gt;
&amp;lt;template&amp;gt; is the name of the enclosing infobox ship or one of the subtemplates&lt;br /&gt;
&amp;lt;k&amp;gt; is the parameter name&lt;br /&gt;
&amp;lt;v&amp;gt; is the parameter value&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function add_warning (template, k, v)&lt;br /&gt;
	v = v:gsub (data.stripmarker, &amp;#039;&amp;#039;);											-- suppress stripmarkers in the warning message&lt;br /&gt;
	mw.addWarning (string.format (data.warning_fmt_str, data.warn_span_style, data.warn_code_style, template, template, data.warn_code_style, k, v));&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; U N K N O W N _ P A R A M S _C H E C K &amp;gt;---------------------------------------&lt;br /&gt;
&lt;br /&gt;
check parameters supplied in &amp;lt;template&amp;gt; against known parameters for that template.  Emit preview warning when&lt;br /&gt;
a parameter is unknown.&lt;br /&gt;
&lt;br /&gt;
Empty unknown parameters are not identified because Module:Arguments removes blank parameters by default.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function unknown_params_check (args_t, known_params_t, template)&lt;br /&gt;
	local has_unknown_params = false;&lt;br /&gt;
&lt;br /&gt;
	for k, v in pairs (args_t) do&lt;br /&gt;
		if &amp;#039;string&amp;#039; == type (k) then&lt;br /&gt;
			local param = k:gsub (&amp;#039;%d+$&amp;#039;, &amp;#039;#&amp;#039;);									-- for enumerated parameters, replace enumerator with &amp;#039;#&amp;#039;&lt;br /&gt;
			if not known_params_t[param] then&lt;br /&gt;
				add_warning (template, k, v);									-- add warning message when &amp;lt;param&amp;gt; is not known for &amp;lt;template&amp;gt;&lt;br /&gt;
				has_unknown_params = data.cat_this_namespace;					-- add unknown params category when infobox is rendered; mainspace and draftspace only&lt;br /&gt;
			end&lt;br /&gt;
		else																	-- here when &amp;lt;k&amp;gt; not a string (likely a positional parameter)&lt;br /&gt;
			add_warning (template, k, v);										-- add warning message when &amp;lt;param&amp;gt; is not known for &amp;lt;template&amp;gt;&lt;br /&gt;
			has_unknown_params = data.cat_this_namespace;						-- add unknown params category when infobox is rendered; mainspace and draftspace only&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return has_unknown_params;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; F I N A L _ R E N D E R I N G &amp;gt;------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
final rendering for the various subtemplates&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function final_rendering (infobox_ship_t, frame, has_unknown_params, template)&lt;br /&gt;
	if &amp;#039;yes&amp;#039; ~= infobox_ship_t.child then										-- when not &amp;#039;yes&amp;#039;, we are in stand-alone mode&lt;br /&gt;
		infobox_ship_t.bodyclass = &amp;#039;ib-ship&amp;#039;;									-- use basic infobox css for stand-alone mode&lt;br /&gt;
		infobox_ship_t.templatestyles = data.templatestyles -- apply templatestyles&lt;br /&gt;
		return table.concat ({			&lt;br /&gt;
				infobox (infobox_ship_t),										-- render the infobox&lt;br /&gt;
				(has_unknown_params and data.categories_t.unknown) or &amp;#039;&amp;#039;		-- add category for any unknown parameters&lt;br /&gt;
			});&lt;br /&gt;
	else&lt;br /&gt;
		infobox_ship_t.label100 = &amp;#039;__1B0X_5H1P__&amp;#039;;&lt;br /&gt;
		infobox_ship_t.data100 = template&lt;br /&gt;
		return frame:expandTemplate ({title=&amp;#039;Infobox&amp;#039;, args = infobox_ship_t});	-- return a rendering of this infobox&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; D I S P L A Y T I T L E _ M A K E &amp;gt;--------------------------------------------&lt;br /&gt;
&lt;br /&gt;
account for namespace when creating {{DIPSLAYSTYLE}} magic word&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function DISPLAYTITLE_make (display_title)&lt;br /&gt;
	local namespace_name = data.namespace_number ~= 0 and (data.namespace_name .. &amp;#039;:&amp;#039;) or &amp;#039;&amp;#039;;	-- no namespace prefix for articles in mainspace&lt;br /&gt;
&lt;br /&gt;
	return string.format (&amp;#039;{{DISPLAYTITLE:%s%s}}&amp;#039;, namespace_name, display_title);	-- construct magic word&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; I N F O B O X _ S H I P _ B E G I N &amp;gt;------------------------------------------&lt;br /&gt;
&lt;br /&gt;
fill infobox table parameters &amp;#039;bodystyle&amp;#039; and &amp;#039;title&amp;#039; (infobox caption); auto-article title formatting ({{DISPLAYTITLE}})&lt;br /&gt;
&lt;br /&gt;
TODO: can we make |infobox_caption=yes render the caption in the same format as the displayed article title?  Do&lt;br /&gt;
this instead of forcing editors to write and format the caption manually when the article title doesn&amp;#039;t have ship&lt;br /&gt;
prefix or disambiguation.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function infobox_ship_begin (args_t, infobox_ship_t, frame)&lt;br /&gt;
	local name = mw.title.getCurrentTitle().text;&lt;br /&gt;
&lt;br /&gt;
	infobox_ship_t[&amp;#039;bodyclass&amp;#039;] = &amp;#039;ib-ship&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
	if args_t.infobox_caption then&lt;br /&gt;
		if &amp;#039;yes&amp;#039; == args_t.infobox_caption then									-- format article title as infobox caption&lt;br /&gt;
			infobox_ship_t.title = ship_name_format ({name=name, adj=&amp;#039;off&amp;#039;, showerrs=args_t.showerrs, sclass=args_t.sclass});&lt;br /&gt;
		elseif &amp;#039;nodab&amp;#039; == args_t.infobox_caption then							-- format article title without disambiguation as infobox caption&lt;br /&gt;
			infobox_ship_t.title = ship_name_format ({name=name, dab=&amp;#039;none&amp;#039;, showerrs=args_t.showerrs});&lt;br /&gt;
		else																	-- use value supplied in |infobox_caption= as infobox caption&lt;br /&gt;
			infobox_ship_t.title = args_t.infobox_caption;&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		infobox_ship_t.title = &amp;#039;&amp;#039;;												-- to allow for possible displaytitle concatenation&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args_t.display_title then&lt;br /&gt;
		if &amp;#039;ital&amp;#039; == args_t.display_title then									-- use {{italic title}} template&lt;br /&gt;
			infobox_ship_t.title = infobox_ship_t.title .. require (&amp;#039;Module:italic title&amp;#039;)._main ({});	-- {{italic title}} without template overhead&lt;br /&gt;
		elseif (&amp;#039;none&amp;#039; ~= args_t.display_title) then							-- any value but &amp;#039;none&amp;#039;	use value in |display_title= for {{DISPLAYTITLE}} magic word&lt;br /&gt;
			infobox_ship_t.title = infobox_ship_t.title .. frame:preprocess (DISPLAYTITLE_make (args_t.display_title));&lt;br /&gt;
		end&lt;br /&gt;
	else																		-- |display_title= empty or omitted, use article title&lt;br /&gt;
		infobox_ship_t.title = infobox_ship_t.title .. frame:preprocess (DISPLAYTITLE_make (ship_name_format ({name=name, sclass=args_t.sclass})));&lt;br /&gt;
	end&lt;br /&gt;
end	&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; I M A G E _ P A R A M S _ C H E C K &amp;gt;------------------------------------------&lt;br /&gt;
&lt;br /&gt;
emit maint cat and warning message when:&lt;br /&gt;
	- |image_caption= and/or |image_alt= have a value but |image= does not have a value.&lt;br /&gt;
	- |image_size=300px&lt;br /&gt;
	- |image= has extended image syntax&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function image_params_check (args_t)&lt;br /&gt;
	local image_warning_flag;													-- flag; true when ibox has |image_alt= or |image_caption= but no |image=&lt;br /&gt;
	local template_name = &amp;#039;Infobox ship/image&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
	local image_link = args_t.image and args_t.image:match (&amp;#039;^%b[]&amp;#039;);			-- get first wikilink in |image= if any&lt;br /&gt;
	if image_link and (image_link:match (&amp;#039;%[%[%s*[Ff]ile:&amp;#039;) or image_link:match (&amp;#039;%[%[%s*[Ii]mage:&amp;#039;)) then	-- check for |image= with extended image syntax&lt;br /&gt;
		mw.addWarning (string.format (data.image_EIS_warning_fmt_str, data.warn_span_style, data.warn_code_style, template_name, template_name, data.warn_code_style));	-- extended image syntax found add warning&lt;br /&gt;
		image_warning_flag = true;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args_t.image_size and args_t.image_size:match (&amp;#039;300&amp;#039;) then				-- 300 is default size so this parameter/value pair superfluous&lt;br /&gt;
		mw.addWarning (string.format (data.image_size_warning_fmt_str, data.warn_span_style, data.warn_code_style, template_name, template_name, data.warn_code_style));	-- add warning&lt;br /&gt;
		image_warning_flag = true;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not args_t.image and (args_t.image_caption or args_t.image_alt) then		-- caption or alt without image is meaningless&lt;br /&gt;
		mw.addWarning (string.format (data.image_missing_warning_fmt_str, data.warn_span_style, data.warn_code_style, template_name, template_name, data.warn_code_style, data.warn_code_style, data.warn_code_style, data.warn_code_style));	-- add warning&lt;br /&gt;
		image_warning_flag = true;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return image_warning_flag;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; I N F O B O X _ S H I P _ I M A G E &amp;gt;------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Infobox ship|infobox_ship_image}} – for stand-alone mode&lt;br /&gt;
&lt;br /&gt;
Returns a child infobox for Infobox ship/image unless |child=no for a stand-alone rendering&lt;br /&gt;
&lt;br /&gt;
images in {{infobox ship}} default to 300px; upright is ignored&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function infobox_ship_image (frame)&lt;br /&gt;
	local template_name = &amp;#039;Infobox ship/image&amp;#039;;&lt;br /&gt;
	local args_t = get_args (frame);&lt;br /&gt;
&lt;br /&gt;
	local image_warning_flag = image_params_check (args_t) and data.cat_this_namespace;	-- categorize any image warnings&lt;br /&gt;
	local non_std_img_size_flag = args_t.image_size and not args_t.image_size:match (&amp;#039;300&amp;#039;) and data.cat_this_namespace;	-- not a warning; categorize non-standar image size use&lt;br /&gt;
	&lt;br /&gt;
	local infobox_ship_t = {&lt;br /&gt;
		child = args_t.child or &amp;#039;yes&amp;#039;;											-- default to child&lt;br /&gt;
		image1 = require (&amp;#039;Module:InfoboxImage&amp;#039;).InfoboxImage ({args = {&amp;#039;InfoboxImage&amp;#039;, &amp;#039;InfoboxImage&amp;#039;, image=args_t.image, size=args_t.image_size, alt=args_t.image_alt, sizedefault = &amp;#039;300px&amp;#039;}});	-- upright=&amp;#039;1&amp;#039; ignored&lt;br /&gt;
		caption1 = args_t.image_caption;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
	local has_unknown_params = unknown_params_check (frame:getParent().args, data.known_infobox_ship_image_params_t, template_name);	-- emit warning for all unknown parameters; even those that are empty&lt;br /&gt;
&lt;br /&gt;
	return table.concat ({&lt;br /&gt;
		final_rendering (infobox_ship_t, frame, has_unknown_params, &amp;#039;image&amp;#039;),	-- return final rendering of this infobox&lt;br /&gt;
		(has_unknown_params and data.categories_t.unknown) or &amp;#039;&amp;#039;,&lt;br /&gt;
		(image_warning_flag and data.categories_t.image_syntax) or &amp;#039;&amp;#039;,&lt;br /&gt;
		((not args_t.image) and (data.cat_this_namespace and data.categories_t.no_image)) or &amp;#039;&amp;#039;,&lt;br /&gt;
		(non_std_img_size_flag and data.categories_t.non_std_img_size ) or &amp;#039;&amp;#039;,&lt;br /&gt;
		});&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; I N F O B O X _ S H I P _ C A R E E R &amp;gt;----------------------------------------&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Infobox ship|infobox_ship_career}} – for stand-alone mode&lt;br /&gt;
&lt;br /&gt;
Returns a child infobox for Infobox ship/career unless |child=no for a stand-alone rendering&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function infobox_ship_career (frame)&lt;br /&gt;
	local template_name = &amp;#039;Infobox ship/career&amp;#039;;&lt;br /&gt;
	local args_t = get_args (frame);&lt;br /&gt;
	args_t.hide_header= args_t.hide_header and args_t.hide_header:lower();		-- set to lowercase if set&lt;br /&gt;
&lt;br /&gt;
	local infobox_ship_t = {&lt;br /&gt;
		child = args_t.child or &amp;#039;yes&amp;#039;;											-- default to child&lt;br /&gt;
		headerclass = &amp;#039;ib-ship-country&amp;#039;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
	if args_t.infobox_caption then												-- special case for |infobox_caption=&lt;br /&gt;
		if &amp;#039;yes&amp;#039; == infobox_ship_t.child then									-- if not stand-alone&lt;br /&gt;
			add_warning (template_name, &amp;#039;infobox_caption&amp;#039;, args_t.infobox_caption);	--emit preview warning message&lt;br /&gt;
		else&lt;br /&gt;
			infobox_ship_t.title = args_t.infobox_caption;						-- translate |infobox_caption= to |title= used by Module:Infobox&lt;br /&gt;
			args_t.infobox_caption = nil;										-- unset to avoid preview error message; no longer needed&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
		&lt;br /&gt;
	local i = 1;&lt;br /&gt;
&lt;br /&gt;
	if &amp;#039;yes&amp;#039; ~= args_t.hide_header then											-- |hide_header=yes then no header&lt;br /&gt;
		if not (&amp;#039;title&amp;#039; == args_t.hide_header) then								-- |hide_header=title then no title bar&lt;br /&gt;
			local spoof_t = {&lt;br /&gt;
				child = &amp;#039;yes&amp;#039;,													-- default to child&lt;br /&gt;
				decat = &amp;#039;yes&amp;#039;,													-- spoof infobox does not have data; don&amp;#039;t categorize in Category:Articles using infobox templates with no data rows&lt;br /&gt;
				header1 = &amp;#039;History&amp;#039;,&lt;br /&gt;
				headerclass = &amp;quot;ib-ship-history&amp;quot;,&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
			infobox_ship_t.data1 = frame:expandTemplate ({title=&amp;#039;Infobox&amp;#039;, args = spoof_t});	-- return a rendering of this spoof infobox&lt;br /&gt;
			i = i + 1;&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if args_t.country and args_t.flag then&lt;br /&gt;
			infobox_ship_t[&amp;#039;header&amp;#039; .. i] = infobox_ship_flag (args_t.flag) .. &amp;#039;&amp;lt;span style=&amp;quot;padding-left:1em&amp;quot;&amp;gt;&amp;#039; .. args_t.country .. &amp;#039;&amp;lt;/span&amp;gt;&amp;#039;;&lt;br /&gt;
		elseif args_t.country then&lt;br /&gt;
			infobox_ship_t[&amp;#039;header&amp;#039; .. i] = args_t.country;&lt;br /&gt;
		elseif args_t.flag then&lt;br /&gt;
			infobox_ship_t[&amp;#039;header&amp;#039; .. i] = infobox_ship_flag (args_t.flag);&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if infobox_ship_t[&amp;#039;header&amp;#039; .. i] then&lt;br /&gt;
		i = i + 1;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local error_flag;&lt;br /&gt;
	error_flag = synonym_check (args_t, &amp;#039;ship_stricken&amp;#039;, &amp;#039;ship_struck&amp;#039;, error_flag);	-- error if both synonymous parameters set&lt;br /&gt;
	synonym_check (args_t, &amp;#039;ship_honours&amp;#039;, &amp;#039;ship_honors&amp;#039;, error_flag);&lt;br /&gt;
&lt;br /&gt;
	line_items (args_t, data.infobox_career_params_t, infobox_ship_t, i, frame);		-- go do all of the other infobox parameters&lt;br /&gt;
	local has_unknown_params = unknown_params_check (frame:getParent().args, data.known_infobox_ship_career_params_t, &amp;#039;Infobox ship/career&amp;#039;);	-- emit warning for all unknown parameters; even those that are empty&lt;br /&gt;
&lt;br /&gt;
	return table.concat ({&lt;br /&gt;
		final_rendering (infobox_ship_t, frame, has_unknown_params, &amp;#039;career&amp;#039;),			-- return final rendering of this infobox&lt;br /&gt;
		(has_unknown_params and data.categories_t.unknown) or &amp;#039;&amp;#039;&lt;br /&gt;
		});&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; I N F O B O X _ S H I P _ C H A R A C T E R I S T I C S &amp;gt;----------------------&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Infobox ship|infobox_ship_characteristics}} – for stand-alone mode&lt;br /&gt;
&lt;br /&gt;
Returns a child infobox for Infobox ship/characteristics unless |child=no for a stand-alone rendering&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function infobox_ship_characteristics (frame)&lt;br /&gt;
	local template_name = &amp;#039;Infobox ship/characteristics&amp;#039;;&lt;br /&gt;
	local args_t = get_args (frame);&lt;br /&gt;
	args_t.hide_header= args_t.hide_header and args_t.hide_header:lower();		-- set to lowercase if set&lt;br /&gt;
&lt;br /&gt;
	local infobox_ship_t = {&lt;br /&gt;
		child = args_t.child or &amp;#039;yes&amp;#039;,											-- default to child&lt;br /&gt;
		headerclass = &amp;#039;ib-ship-general&amp;#039;&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
	if args_t.infobox_caption then												-- special case for |infobox_caption=&lt;br /&gt;
		if &amp;#039;yes&amp;#039; == infobox_ship_t.child then									-- if not stand-alone&lt;br /&gt;
			add_warning (template_name, &amp;#039;infobox_caption&amp;#039;, args_t.infobox_caption);	--emit preview warning message&lt;br /&gt;
		else&lt;br /&gt;
			infobox_ship_t.title = args_t.infobox_caption;						-- translate |infobox_caption= to |title= used by Module:Infobox&lt;br /&gt;
			args_t.infobox_caption = nil;										-- unset to avoid preview error message; no longer needed&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
		&lt;br /&gt;
	local i = 1;&lt;br /&gt;
&lt;br /&gt;
	if &amp;#039;yes&amp;#039; ~= args_t.hide_header then											-- |hide_header=yes then no header&lt;br /&gt;
		local header = &amp;#039;General characteristics&amp;#039;;								-- the default header&lt;br /&gt;
		if args_t.header_caption then&lt;br /&gt;
			header = header .. &amp;#039; &amp;#039; .. args_t.header_caption;					-- concatenate |header_caption= onto default header&lt;br /&gt;
		end&lt;br /&gt;
		infobox_ship_t[&amp;#039;header&amp;#039; .. i] = header;									-- add the header&lt;br /&gt;
		i = i + 1;																-- bump the enumerator&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local error_flag;&lt;br /&gt;
	error_flag = synonym_check (args_t, &amp;#039;ship_armour&amp;#039;, &amp;#039;ship_armor&amp;#039;, error_flag);	-- error if both synonymous parameters set&lt;br /&gt;
	synonym_check (args_t, &amp;#039;ship_draught&amp;#039;, &amp;#039;ship_draft&amp;#039;, error_flag);				-- when both set modify with error message and category&lt;br /&gt;
&lt;br /&gt;
	line_items (args_t, data.infobox_characteristics_params_t, infobox_ship_t, i, frame);	-- go do all of the other infobox parameters&lt;br /&gt;
	local has_unknown_params = unknown_params_check (frame:getParent().args, data.known_infobox_ship_characteristics_params_t, template_name);	-- emit warning for all unknown parameters; even those that are empty&lt;br /&gt;
&lt;br /&gt;
	return table.concat ({&lt;br /&gt;
		final_rendering (infobox_ship_t, frame, has_unknown_params, &amp;#039;characteristics&amp;#039;),			-- return final rendering of this infobox&lt;br /&gt;
		(has_unknown_params and data.categories_t.unknown) or &amp;#039;&amp;#039;&lt;br /&gt;
		});&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; I N F O B O X _ S H I P _ C L A S S _ O V E R V I E W &amp;gt;------------------------&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Infobox ship|infobox_ship_class_overview}} – for stand-alone mode&lt;br /&gt;
&lt;br /&gt;
Returns a child infobox for Infobox ship/class overview unless |child=no for a stand-alone rendering&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function infobox_ship_class_overview (frame)&lt;br /&gt;
	local template_name = &amp;#039;Infobox ship/class overview&amp;#039;;&lt;br /&gt;
	local args_t = get_args (frame);&lt;br /&gt;
	args_t.hide_header= args_t.hide_header and args_t.hide_header:lower();		-- set to lowercase if set&lt;br /&gt;
&lt;br /&gt;
	local infobox_ship_t = {&lt;br /&gt;
		child = args_t.child or &amp;#039;yes&amp;#039;,											-- default to child&lt;br /&gt;
		headerclass = &amp;#039;ib-ship-general&amp;#039;&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
	if args_t.infobox_caption then												-- special case for |infobox_caption=&lt;br /&gt;
		if &amp;#039;yes&amp;#039; == infobox_ship_t.child then									-- if not stand-alone&lt;br /&gt;
			add_warning (template_name, &amp;#039;infobox_caption&amp;#039;, args_t.infobox_caption);	--emit preview warning message&lt;br /&gt;
		else&lt;br /&gt;
			infobox_ship_t.title = args_t.infobox_caption;						-- translate |infobox_caption= to |title= used by Module:Infobox&lt;br /&gt;
			args_t.infobox_caption = nil;										-- unset to avoid preview error message; no longer needed&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i = 1;&lt;br /&gt;
&lt;br /&gt;
	if &amp;#039;yes&amp;#039; ~= args_t.hide_header then											-- |hide_header=yes then no header&lt;br /&gt;
		infobox_ship_t[&amp;#039;header&amp;#039; .. i] = &amp;#039;Class overview&amp;#039;;						-- add the header&lt;br /&gt;
		i = i + 1;																-- bump the enumerator&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	synonym_check (args_t, &amp;#039;total_ships_cancelled&amp;#039;, &amp;#039;total_ships_canceled&amp;#039;, nil);	-- error if both synonymous parameters set&lt;br /&gt;
&lt;br /&gt;
	line_items (args_t, data.infobox_class_overview_params_t, infobox_ship_t, i, frame);	-- go do all of the other infobox parameters&lt;br /&gt;
	local has_unknown_params = unknown_params_check (frame:getParent().args, data.known_infobox_ship_class_overview_params_t, template_name);	-- emit warning for all unknown parameters; even those that are empty&lt;br /&gt;
&lt;br /&gt;
	return table.concat ({&lt;br /&gt;
		final_rendering (infobox_ship_t, frame, has_unknown_params, &amp;#039;class overview&amp;#039;),			-- return final rendering of this infobox&lt;br /&gt;
		(has_unknown_params and data.categories_t.unknown) or &amp;#039;&amp;#039;&lt;br /&gt;
		});&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; I N F O B O X _ S H I P _ S E R V I C E _ R E C O R D &amp;gt;------------------------&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Infobox ship|infobox_ship_service_record}} – for stand-alone mode&lt;br /&gt;
&lt;br /&gt;
Returns a child infobox for Infobox ship/service record unless |child=no for a stand-alone rendering.  This&lt;br /&gt;
function implements the ship-only portion of {{Infobox service record}}; does not know about |is_ship= and&lt;br /&gt;
|is_multi= parameters.  Adds support for |hide_header= parameter&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function infobox_ship_service_record (frame)&lt;br /&gt;
	local template_name = &amp;#039;Infobox ship/service record&amp;#039;;&lt;br /&gt;
	local args_t = get_args (frame);&lt;br /&gt;
	args_t.hide_header= args_t.hide_header and args_t.hide_header:lower();		-- set to lowercase if set&lt;br /&gt;
&lt;br /&gt;
	local infobox_ship_t = {&lt;br /&gt;
		child = args_t.child or &amp;#039;yes&amp;#039;,											-- default to child&lt;br /&gt;
		headerclass = &amp;#039;ib-ship-general&amp;#039;&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
	if args_t.infobox_caption then												-- special case for |infobox_caption=&lt;br /&gt;
		if &amp;#039;yes&amp;#039; == infobox_ship_t.child then									-- if not stand-alone&lt;br /&gt;
			add_warning (template_name, &amp;#039;infobox_caption&amp;#039;, args_t.infobox_caption);	--emit preview warning message&lt;br /&gt;
		else&lt;br /&gt;
			infobox_ship_t.title = args_t.infobox_caption;						-- translate |infobox_caption= to |title= used by Module:Infobox&lt;br /&gt;
			args_t.infobox_caption = nil;										-- unset to avoid preview error message; no longer needed&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i = 1;&lt;br /&gt;
&lt;br /&gt;
	if &amp;#039;yes&amp;#039; ~= args_t.hide_header then											-- |hide_header=yes then no header&lt;br /&gt;
		infobox_ship_t[&amp;#039;header&amp;#039; .. i] = args_t.header_caption or args_t.label or &amp;#039;Service record&amp;#039;;		-- add the header; |label= is deprecated&lt;br /&gt;
		i = i + 1;																-- bump the enumerator&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	line_items (args_t, data.infobox_ship_service_record_params_t, infobox_ship_t, i, frame);	-- go do all of the other infobox parameters&lt;br /&gt;
	local has_unknown_params = unknown_params_check (frame:getParent().args, data.known_infobox_ship_service_record_params_t, template_name);	-- emit warning for all unknown parameters; even those that are empty&lt;br /&gt;
&lt;br /&gt;
	return table.concat ({&lt;br /&gt;
		final_rendering (infobox_ship_t, frame, has_unknown_params, &amp;#039;service record&amp;#039;),			-- return final rendering of this infobox&lt;br /&gt;
		(has_unknown_params and data.categories_t.unknown) or &amp;#039;&amp;#039;&lt;br /&gt;
		});&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; I N F O B O X _ S H I P &amp;gt;------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{{#invoke:Infobox ship|infobox_ship}}&lt;br /&gt;
&lt;br /&gt;
To discover when two child infoboxen are concatenated without a proper |sectionn= parameter between them, this&lt;br /&gt;
function looks for and counts the special secret |label100=__1B0X_5H1P__ and |data100=&amp;lt;template name&amp;gt;.  Each child&lt;br /&gt;
appends the special secret parameters at final_rendering().  This function counts and deletes those special secret&lt;br /&gt;
parameters.  If the count is:&lt;br /&gt;
	0 – ok; parameter does not include a child infobox rendering&lt;br /&gt;
	1 – ok; parameter holds only one child infobox&lt;br /&gt;
	2+ – not ok&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function infobox_ship (frame)&lt;br /&gt;
	local args_t = get_args (frame);&lt;br /&gt;
&lt;br /&gt;
	local infobox_ship_t = {};													-- table that holds infobox parameters&lt;br /&gt;
&lt;br /&gt;
	infobox_ship_begin (args_t, infobox_ship_t, frame);							-- fetch parameters that once belonged to obsolete {{infobox ship begin}}&lt;br /&gt;
&lt;br /&gt;
	for k, v in pairs (args_t) do												-- copy infobox parameters from the frame into our local table&lt;br /&gt;
		if &amp;#039;string&amp;#039; == type (k) then											-- must be string; positional parameters not supported&lt;br /&gt;
			local enum = k:match (&amp;#039;section(%d+)&amp;#039;);								-- &amp;lt;enum&amp;gt; gets a value when this parameter is |section&amp;lt;n&amp;gt;= &lt;br /&gt;
			if enum then&lt;br /&gt;
				infobox_ship_t[&amp;#039;data&amp;#039;..enum] = v;								-- translate |section&amp;lt;n&amp;gt; = to |data&amp;lt;n&amp;gt;=&lt;br /&gt;
			else&lt;br /&gt;
				infobox_ship_t[k] = v;											-- assume that parameter name is one known to Module:Infobox&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for k, v in pairs (infobox_ship_t) do										-- look for malformed input (concatenated child infoboxen)&lt;br /&gt;
		if k:find (&amp;#039;data&amp;#039;, 1, true) then										-- only look in values assigned to |datan= (née |sectionn=)&lt;br /&gt;
			local name, count = v:gsub (&amp;#039;&amp;lt;tr&amp;gt;&amp;lt;th scope=\&amp;quot;row\&amp;quot; class=\&amp;quot;infobox%-label\&amp;quot;&amp;gt;__1B0X_5H1P__&amp;lt;/th&amp;gt;&amp;lt;td class=\&amp;quot;infobox%-data\&amp;quot;&amp;gt;[%l ]+&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;#039;, &amp;#039;&amp;#039;);	-- count special secret parameters &lt;br /&gt;
&lt;br /&gt;
			if 1 &amp;lt; count then													-- more than one when parameter has concatenated child infoboxen&lt;br /&gt;
				infobox_ship_t[k] = table.concat ({&lt;br /&gt;
					string.format (data.error_messages_t.missing_section, k:match (&amp;#039;%d&amp;#039;)),		-- emit an error message; replaces the concatenated subtemplate&lt;br /&gt;
					(data.cat_this_namespace and data.categories_t.missing_section) or &amp;#039;&amp;#039;,		-- and also categorize&lt;br /&gt;
					});&lt;br /&gt;
			else&lt;br /&gt;
				infobox_ship_t[k] = name;										-- delete special secret |label100=__1B0X_5H1P__ and |data100=&amp;lt;template name&amp;gt;&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local has_unknown_params = unknown_params_check (frame:getParent().args, data.known_infobox_ship_params_t, &amp;#039;Infobox ship&amp;#039;);	-- emit warning for all unknown parameters; even those that are empty&lt;br /&gt;
&lt;br /&gt;
	infobox_ship_t.templatestyles = data.templatestyles -- apply template styles&lt;br /&gt;
	return table.concat ({&lt;br /&gt;
			infobox (infobox_ship_t),											-- render the infobox&lt;br /&gt;
			(has_unknown_params and data.categories_t.unknown) or &amp;#039;&amp;#039;			-- add category for any unknown parameters&lt;br /&gt;
		});&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
		&lt;br /&gt;
--[[--------------------------&amp;lt; E X P O R T S &amp;gt;----------------------------------------------------------------&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
	infobox_ship = infobox_ship,&lt;br /&gt;
	infobox_ship_image = infobox_ship_image,&lt;br /&gt;
	infobox_ship_career = infobox_ship_career,&lt;br /&gt;
	infobox_ship_characteristics = infobox_ship_characteristics,&lt;br /&gt;
	infobox_ship_class_overview = infobox_ship_class_overview,&lt;br /&gt;
	infobox_ship_service_record = infobox_ship_service_record,&lt;br /&gt;
	}&lt;/div&gt;</summary>
		<author><name>WikiDwarf</name></author>
	</entry>
</feed>