<?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%3ASandbox%2FAhecht%2FCite_DNV</id>
	<title>Module:Sandbox/Ahecht/Cite DNV - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FAhecht%2FCite_DNV"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Ahecht/Cite_DNV&amp;action=history"/>
	<updated>2026-04-30T13:48:18Z</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:Sandbox/Ahecht/Cite_DNV&amp;diff=145038&amp;oldid=prev</id>
		<title>imported&gt;Pppery: Pppery moved page Module:Cite DNV/sandbox to Module:Sandbox/Ahecht/Cite DNV without leaving a redirect: Module:Foo/sandbox is the naming convention for sandboxed additions to an existing the module, not the naming convention for non-fully-developed new modules</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Ahecht/Cite_DNV&amp;diff=145038&amp;oldid=prev"/>
		<updated>2018-06-27T18:43:14Z</updated>

		<summary type="html">&lt;p&gt;Pppery moved page &lt;a href=&quot;/index.php?title=Module:Cite_DNV/sandbox&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module:Cite DNV/sandbox (page does not exist)&quot;&gt;Module:Cite DNV/sandbox&lt;/a&gt; to &lt;a href=&quot;/research/Module:Sandbox/Ahecht/Cite_DNV&quot; title=&quot;Module:Sandbox/Ahecht/Cite DNV&quot;&gt;Module:Sandbox/Ahecht/Cite DNV&lt;/a&gt; without leaving a redirect: &lt;a href=&quot;/index.php?title=Module:Foo/sandbox&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module:Foo/sandbox (page does not exist)&quot;&gt;Module:Foo/sandbox&lt;/a&gt; is the naming convention for sandboxed additions to an existing the module, not the naming convention for non-fully-developed new modules&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
local htmlerror = require(&amp;#039;Module:Error&amp;#039;).error&lt;br /&gt;
&lt;br /&gt;
function p.citednv(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	local success=true&lt;br /&gt;
	local register=&amp;quot;DNV&amp;quot;&lt;br /&gt;
	local outstr = &amp;quot;&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		args[k] = v&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	url, vesselid = string.match(string.lower(args[&amp;#039;url&amp;#039;] or &amp;#039;&amp;#039;),&amp;#039;//exchange.dnv.com/exchange/main.aspx?(.*)vesselid=(g?%d%d%d%d%d%d?)&amp;#039;)&lt;br /&gt;
	vesselid = (vesselid or string.lower(((args[&amp;#039;id&amp;#039;] or args[&amp;#039;ID&amp;#039;]) or args[&amp;#039;vesselid&amp;#039;]) or &amp;#039;&amp;#039;) )&lt;br /&gt;
	if vesselid == &amp;#039;&amp;#039; then&lt;br /&gt;
		success=false&lt;br /&gt;
	elseif not tonumber(vesselid) then&lt;br /&gt;
		vesselid = string.upper(vesselid)&lt;br /&gt;
		register = &amp;quot;GL&amp;quot;&lt;br /&gt;
	elseif tonumber(vesselid) &amp;gt; 99999 then&lt;br /&gt;
		vesselid = &amp;quot;G&amp;quot;..vesselid&lt;br /&gt;
		register = &amp;quot;GL&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	shipname = ((string.match((args[&amp;#039;title&amp;#039;] or &amp;#039;&amp;#039;),&amp;#039;\&amp;#039;\&amp;#039;(.-)\&amp;#039;\&amp;#039;&amp;#039;) or args[&amp;#039;title&amp;#039;]) or (args[&amp;#039;shipname&amp;#039;] or args[&amp;#039;name&amp;#039;])) or &amp;#039;&amp;#039;&lt;br /&gt;
	if shipname == &amp;#039;&amp;#039; then success=false end&lt;br /&gt;
	&lt;br /&gt;
	if success then&lt;br /&gt;
		return  &amp;#039;{{cite ship register |register=&amp;#039;..register..&amp;#039; |id=&amp;#039;..vesselid..&amp;#039; |shipname=&amp;#039;..shipname..&amp;#039; |accessdate=&amp;#039;..((args[&amp;#039;accessdate&amp;#039;] or args[&amp;#039;access-date&amp;#039;]) or &amp;#039;&amp;#039;)..&amp;#039; }}&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		outstr = args[&amp;#039;url&amp;#039;] and &amp;#039;{{cite web&amp;#039; or &amp;#039;{{cite DNV&amp;#039;&lt;br /&gt;
		&lt;br /&gt;
		for k, v in pairs(origArgs) do&lt;br /&gt;
			outstr = outstr..&amp;#039; | &amp;#039;..k..&amp;#039;=&amp;#039;..v&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		outstr = outstr..&amp;#039;}}&amp;#039;..(args[&amp;#039;url&amp;#039;] and &amp;#039;&amp;#039; or htmlerror{&amp;#039;Error in [[Template:Cite DNV]]: Invalid parameters.&amp;#039;})&lt;br /&gt;
		&lt;br /&gt;
		return outstr&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Pppery</name></author>
	</entry>
</feed>