<?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%3ANewDYKnomination</id>
	<title>Module:NewDYKnomination - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ANewDYKnomination"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:NewDYKnomination&amp;action=history"/>
	<updated>2026-05-26T12:36:45Z</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:NewDYKnomination&amp;diff=144123&amp;oldid=prev</id>
		<title>imported&gt;Wugapodes: have the &quot;Reviewed: &quot; text always print, previously would only add some unused bullet points if |reviewed= not specified</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:NewDYKnomination&amp;diff=144123&amp;oldid=prev"/>
		<updated>2022-06-04T16:17:03Z</updated>

		<summary type="html">&lt;p&gt;have the &amp;quot;Reviewed: &amp;quot; text always print, previously would only add some unused bullet points if |reviewed= not specified&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements {{newDYKnomination}}.&lt;br /&gt;
&lt;br /&gt;
local lang = mw.language.getContentLanguage()&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Output template&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This template contains the final output of the module. Parameters like&lt;br /&gt;
-- ${PARAMETER_NAME} are substituted with the results of the output template&lt;br /&gt;
-- parameter functions below.&lt;br /&gt;
&lt;br /&gt;
local OUTPUT_TEMPLATE = [=[&lt;br /&gt;
{{DYKsubpage&lt;br /&gt;
|monthyear=${MONTH_AND_YEAR} &lt;br /&gt;
|passed=&amp;lt;!--When closing discussion, enter yes, no, or withdrawn --&amp;gt;&lt;br /&gt;
|2=${INPUT_ERRORS}&lt;br /&gt;
{{DYK conditions}}&lt;br /&gt;
{{DYK header|${HEADING}}}&lt;br /&gt;
{{DYK nompage links|nompage=${NOM_SUBPAGE}|${NOMPAGE_LINK_ARGS}}}&lt;br /&gt;
${IMAGE}${DYK_LISTEN}${DYK_WATCH}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
                   Please do not edit above this line unless you are a DYK volunteer who is closing the discussion.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* ${HOOK}${ALT_HOOKS}${REVIEWED}${COMMENT}&lt;br /&gt;
&amp;lt;small&amp;gt;${STATUS} by ${AUTHORS}. ${NOMINATED} at ~~~~~.&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;!--${CHECK_CREDITS_WARNING}&lt;br /&gt;
${CREDITS}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* &amp;lt;!-- REPLACE THIS LINE TO WRITE FIRST COMMENT, KEEPING THE ASTERISK  *   --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
${FILE_BREAK}}}&amp;lt;!--Please do not write below this line or remove this line. Place comments above this line.--&amp;gt;]=]&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Helper functions&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- Creates a formatted error message that can be used with substitution.&lt;br /&gt;
local function formatError(msg)&lt;br /&gt;
	return string.format(&amp;#039;{{DYK error|1=%s}}&amp;#039;, msg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Creates a boilerplate error message for invalid titles.&lt;br /&gt;
local function formatInvalidTitleError(page, pageType)&lt;br /&gt;
	local msg = string.format(&lt;br /&gt;
		&amp;#039;&amp;quot;%s&amp;quot; is not a valid %s; check for bad characters&amp;#039;,&lt;br /&gt;
		page, pageType&lt;br /&gt;
	)&lt;br /&gt;
	return formatError(msg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Make a title object from the given page name. Return nil if the title is&lt;br /&gt;
-- invalid.&lt;br /&gt;
local function makeTitle(page)&lt;br /&gt;
	local title = mw.title.new(page)&lt;br /&gt;
	if title and title.text ~= &amp;quot;&amp;quot; then&lt;br /&gt;
		return title&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Same as {{ROOTPAGENAME}}. If the page is an invalid title, returns nil.&lt;br /&gt;
local function getRootPageText(page)&lt;br /&gt;
	local title = makeTitle(page)&lt;br /&gt;
	if title and title.rootPageTitle then&lt;br /&gt;
		return title.rootPageTitle.text&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Makes template invocations for templates like {{DYK listen}} and&lt;br /&gt;
-- {{DYK watch}}.&lt;br /&gt;
local function makeFileTemplateInvocation(name, first, second)&lt;br /&gt;
	if not first then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	ret[#ret + 1] = &amp;#039;{{&amp;#039;&lt;br /&gt;
	ret[#ret + 1] = name&lt;br /&gt;
	ret[#ret + 1] = &amp;#039;|&amp;#039;&lt;br /&gt;
	ret[#ret + 1] = first&lt;br /&gt;
	if second then&lt;br /&gt;
		ret[#ret + 1] = &amp;#039;|&amp;#039;&lt;br /&gt;
		ret[#ret + 1] = second&lt;br /&gt;
	end&lt;br /&gt;
	ret[#ret + 1] = &amp;#039;}}&amp;#039;&lt;br /&gt;
	return table.concat(ret)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Normalize positional parameters for a template invocation. If any of the&lt;br /&gt;
-- parameters contain equals signs, the parameters are all prefixed with&lt;br /&gt;
-- numbers.&lt;br /&gt;
local function normalizeTemplateParameters(params)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local hasEquals = false&lt;br /&gt;
	for i, param in ipairs(params) do&lt;br /&gt;
		if param:find(&amp;#039;=&amp;#039;) then&lt;br /&gt;
			hasEquals = true&lt;br /&gt;
			break&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if hasEquals then&lt;br /&gt;
		for i, param in ipairs(params) do&lt;br /&gt;
			ret[i] = string.format(&amp;#039;%d=%s&amp;#039;, i, param)&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		for i, param in ipairs(params) do&lt;br /&gt;
			ret[i] = param&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Makes a link to a user&amp;#039;s user page and talk page, like found in a standard&lt;br /&gt;
-- signature.&lt;br /&gt;
local function makeUserLinks(user)&lt;br /&gt;
	return string.format(&lt;br /&gt;
		&amp;#039;[[User:%s|%s]] ([[User talk:%s|talk]])&amp;#039;,&lt;br /&gt;
		user, user, user&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns an array of authors. If the user didn&amp;#039;t specify any authors, the&lt;br /&gt;
-- first one is the result of {{REVISIONUSER}}.&lt;br /&gt;
local function getNormalisedAuthors(data)&lt;br /&gt;
	local authors = {}&lt;br /&gt;
	for i, author in ipairs(data.authors) do&lt;br /&gt;
		authors[i] = author&lt;br /&gt;
	end&lt;br /&gt;
	authors[1] = authors[1] or data.revisionUser&lt;br /&gt;
	return authors&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Removes gaps from sparse arrays. This is used to process numbered arguments&lt;br /&gt;
-- like author2 and ALT4.&lt;br /&gt;
local compressSparseArray = require(&amp;quot;Module:TableTools&amp;quot;).compressSparseArray&lt;br /&gt;
&lt;br /&gt;
-- Splits numbered arguments by their prefixes. A table of arguments like this:&lt;br /&gt;
--    {foo1 = &amp;quot;foo1&amp;quot;, foo2 = &amp;quot;foo2&amp;quot;, bar3 = &amp;quot;bar3&amp;quot;}&lt;br /&gt;
-- Would be turned into this:&lt;br /&gt;
--    {foo = {[1] = &amp;quot;foo1&amp;quot;, [2] = &amp;quot;foo2&amp;quot;}, bar = {[3] = &amp;quot;bar3&amp;quot;}}&lt;br /&gt;
-- Note that the subtables of the returned tables are not normal arrays, but&lt;br /&gt;
-- sparse arrays (there can be gaps between values).&lt;br /&gt;
local function splitByPrefix(args)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for key, val in pairs(args) do&lt;br /&gt;
		if type(key) == &amp;#039;string&amp;#039; then&lt;br /&gt;
			local prefix, num = key:match(&amp;#039;^(.-)([1-9][0-9]*)$&amp;#039;)&lt;br /&gt;
			if prefix then&lt;br /&gt;
				num = tonumber(num)&lt;br /&gt;
				ret[prefix] = ret[prefix] or {}&lt;br /&gt;
				ret[prefix][num] = val&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns an array of numbered arguments with the given prefixes. Earlier&lt;br /&gt;
-- prefixes have precedence, and args[prefix] will overwrite args[prefix .. 1].&lt;br /&gt;
-- For example, for this arguments table:&lt;br /&gt;
--   {&lt;br /&gt;
--      author = &amp;quot;author&amp;quot;,&lt;br /&gt;
--      author1 = &amp;quot;author1&amp;quot;,&lt;br /&gt;
--      author2 = &amp;quot;author2,&lt;br /&gt;
--      creator2 = &amp;quot;creator2&amp;quot;&lt;br /&gt;
--   }&lt;br /&gt;
-- The function call getPrefixedArgs(args, splitArgs, {&amp;#039;creator&amp;#039;, &amp;#039;author&amp;#039;})&lt;br /&gt;
-- will produce:&lt;br /&gt;
--   {&amp;quot;author&amp;quot;, &amp;quot;creator2&amp;quot;}&lt;br /&gt;
--&lt;br /&gt;
-- Parameters:&lt;br /&gt;
-- args - the table of arguments specified by the user&lt;br /&gt;
-- splitArgs - the table of arguments as processed by splitByPrefix&lt;br /&gt;
-- prefixes - an array of prefixes&lt;br /&gt;
local function getPrefixedArgs(args, splitArgs, prefixes)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for i, prefix in ipairs(prefixes) do&lt;br /&gt;
		if splitArgs[prefix] then&lt;br /&gt;
			for num, val in pairs(splitArgs[prefix]) do&lt;br /&gt;
				if not ret[num] then&lt;br /&gt;
					ret[num] = val&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- Allow prefix to overwrite prefix1.&lt;br /&gt;
	for _, prefix in ipairs(prefixes) do&lt;br /&gt;
		local val = args[prefix]&lt;br /&gt;
		if val then&lt;br /&gt;
			ret[1] = val&lt;br /&gt;
			break&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return compressSparseArray(ret)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Output template parameter functions&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- The results of these functions are substituted into parameters in the&lt;br /&gt;
-- output template. The parameters look like ${PARAMETER_NAME}. Trying to use&lt;br /&gt;
-- a parameter that doesn&amp;#039;t have a function defined here will result in an&lt;br /&gt;
-- error.&lt;br /&gt;
--&lt;br /&gt;
-- The functions take a data table as a single argument. This table contains&lt;br /&gt;
-- the following fields:&lt;br /&gt;
-- * errors - a table of formatted error messages that were found when&lt;br /&gt;
--     processing the input.&lt;br /&gt;
-- * args - the table of arguments supplied by the user.&lt;br /&gt;
-- * articles - an array of the article names found in the arguments.&lt;br /&gt;
-- * authors - an array of the expanders/creators/writers/authors found in the&lt;br /&gt;
--     arguments.&lt;br /&gt;
-- * revisionUser - the user that last edited the page. As this module is only&lt;br /&gt;
--     substituted, this is always the current user.&lt;br /&gt;
-- * alts - an array of the ALT hooks found in the arguments.&lt;br /&gt;
-- * title - the mw.title object for the current page.&lt;br /&gt;
--&lt;br /&gt;
-- Template parameter functions should return a string, false, or nil.&lt;br /&gt;
-- Functions returning false or nil will be treated as outputting the empty&lt;br /&gt;
-- string &amp;quot;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
local params = {}&lt;br /&gt;
&lt;br /&gt;
-- Renders any errors that were found when processing the input.&lt;br /&gt;
function params.INPUT_ERRORS(data)&lt;br /&gt;
	local nErrors = #data.errors&lt;br /&gt;
	if nErrors &amp;gt; 1 then&lt;br /&gt;
		return &amp;#039;\n* &amp;#039; .. table.concat(data.errors, &amp;#039;\n* &amp;#039;)&lt;br /&gt;
	elseif nErrors == 1 then&lt;br /&gt;
		return &amp;#039;\n&amp;#039; .. data.errors[1]&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- The current month and year, e.g. &amp;quot;March 2015&amp;quot;.&lt;br /&gt;
function params.MONTH_AND_YEAR()&lt;br /&gt;
	return lang:formatDate(&amp;#039;F Y&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- The contents of the heading.&lt;br /&gt;
function params.HEADING(data)&lt;br /&gt;
	return table.concat(data.articles, &amp;#039;, &amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- The current subpage name.&lt;br /&gt;
function params.NOM_SUBPAGE(data)&lt;br /&gt;
	if string.match(data.title.text,&amp;quot;/&amp;quot;) then&lt;br /&gt;
		return string.gsub(data.title.text,data.title.rootText .. &amp;quot;/&amp;quot;,&amp;quot;&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		return data.title.text&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Other arguments for the nompage link template, separated by pipes.&lt;br /&gt;
function params.NOMPAGE_LINK_ARGS(data)&lt;br /&gt;
	local vals = normalizeTemplateParameters(data.articles)&lt;br /&gt;
	return table.concat(vals, &amp;#039;|&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- All of the image display code.&lt;br /&gt;
function params.IMAGE(data)&lt;br /&gt;
	local args = data.args&lt;br /&gt;
	if not args.image then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	local image = getRootPageText(args.image)&lt;br /&gt;
	if not image then&lt;br /&gt;
		image = formatInvalidTitleError(args.image, &amp;#039;image name&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	local caption = args.caption or args.rollover&lt;br /&gt;
	local template = [=[&lt;br /&gt;
{{main page image/DYK|image=%s|caption=%s}}&amp;lt;!--See [[Template:Main page image/DYK]] for other parameters--&amp;gt;&lt;br /&gt;
]=]&lt;br /&gt;
	return string.format(&lt;br /&gt;
		template,&lt;br /&gt;
		image,&lt;br /&gt;
		caption or &amp;#039;CAPTION TEXT GOES HERE&amp;#039;&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- The {{DYK listen}} template.&lt;br /&gt;
function params.DYK_LISTEN(data)&lt;br /&gt;
	local args = data.args&lt;br /&gt;
	return makeFileTemplateInvocation(&lt;br /&gt;
		&amp;#039;DYK Listen&amp;#039;,&lt;br /&gt;
		args.sound,&lt;br /&gt;
		args.soundcaption&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- The {{DYK watch}} template.&lt;br /&gt;
function params.DYK_WATCH(data)&lt;br /&gt;
	local args = data.args&lt;br /&gt;
	return makeFileTemplateInvocation(&lt;br /&gt;
		&amp;#039;DYK Watch&amp;#039;,&lt;br /&gt;
		args.video,&lt;br /&gt;
		args.videocaption&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- The hook text.&lt;br /&gt;
function params.HOOK(data)&lt;br /&gt;
	return data.args.hook or &amp;quot;... that ....?&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- All of the ALT hooks that were specified with the ALT1, ALT2, ... etc.&lt;br /&gt;
-- parameters.&lt;br /&gt;
function params.ALT_HOOKS(data)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for i, alt in ipairs(data.alts) do&lt;br /&gt;
		ret[i] = string.format(&amp;quot;\n** &amp;#039;&amp;#039;&amp;#039;ALT%d&amp;#039;&amp;#039;&amp;#039;: %s&amp;quot;, i, alt)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(ret)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- A note saying which nomination the submitter reviewed.&lt;br /&gt;
function params.REVIEWED(data)&lt;br /&gt;
	local args = data.args&lt;br /&gt;
	local ret = &amp;quot;\n** &amp;#039;&amp;#039;Reviewed&amp;#039;&amp;#039;: &amp;quot;&lt;br /&gt;
	if args.reviewed then&lt;br /&gt;
		local reviewedTitle = makeTitle(&lt;br /&gt;
			&amp;#039;Template:Did you know nominations/&amp;#039; .. args.reviewed&lt;br /&gt;
		)&lt;br /&gt;
		if reviewedTitle and reviewedTitle.exists then&lt;br /&gt;
			ret = ret .. string.format(&lt;br /&gt;
				&amp;#039;[[%s|%s]]&amp;#039;,&lt;br /&gt;
				reviewedTitle.prefixedText,&lt;br /&gt;
				reviewedTitle.subpageText&lt;br /&gt;
			)&lt;br /&gt;
		else&lt;br /&gt;
			local reviewedTitle = makeTitle(&lt;br /&gt;
				&amp;#039;Wikipedia:Did you know nominations/&amp;#039; .. args.reviewed	&lt;br /&gt;
			)&lt;br /&gt;
			if reviewedTitle and reviewedTitle.exists then&lt;br /&gt;
				ret = ret .. string.format(&lt;br /&gt;
					&amp;#039;[[%s|%s]]&amp;#039;,&lt;br /&gt;
					reviewedTitle.prefixedText,&lt;br /&gt;
					reviewedTitle.subpageText&lt;br /&gt;
				)&lt;br /&gt;
			else&lt;br /&gt;
				ret = ret .. args.reviewed&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- A comment.&lt;br /&gt;
function params.COMMENT(data)&lt;br /&gt;
	if data.args.comment then&lt;br /&gt;
		return &amp;quot;\n** &amp;#039;&amp;#039;Comment&amp;#039;&amp;#039;: &amp;quot; .. data.args.comment&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- The status of the article when it was nominated for DYK.&lt;br /&gt;
function params.STATUS(data)&lt;br /&gt;
	local status = data.args.status&lt;br /&gt;
	status = status and status:lower()&lt;br /&gt;
&lt;br /&gt;
	-- Created&lt;br /&gt;
	if status == &amp;#039;new&amp;#039; then&lt;br /&gt;
		return &amp;#039;Created&amp;#039;&lt;br /&gt;
	-- Expanded&lt;br /&gt;
	elseif status == &amp;#039;expanded&amp;#039; or status == &amp;#039;expansion&amp;#039; then&lt;br /&gt;
		return &amp;#039;5x expanded&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	-- Moved to mainspace&lt;br /&gt;
	elseif status == &amp;#039;mainspace&amp;#039; or status == &amp;#039;moved&amp;#039; then&lt;br /&gt;
		return &amp;#039;Moved to mainspace&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	-- Converted from a redirect&lt;br /&gt;
	elseif status == &amp;#039;convert&amp;#039;&lt;br /&gt;
                or status == &amp;#039;converted&amp;#039;&lt;br /&gt;
                or status == &amp;#039;redirect&amp;#039;&lt;br /&gt;
        then&lt;br /&gt;
		return &amp;#039;Converted from a redirect&amp;#039;&lt;br /&gt;
&lt;br /&gt;
	-- Improved to GA&lt;br /&gt;
	elseif status == &amp;#039;ga&amp;#039; then&lt;br /&gt;
		return &amp;#039;Improved to Good Article status&amp;#039;&lt;br /&gt;
&lt;br /&gt;
	-- Default&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;#039;Created/expanded&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end	&lt;br /&gt;
&lt;br /&gt;
-- A list of the authors, with user and user talk links.&lt;br /&gt;
function params.AUTHORS(data)&lt;br /&gt;
	local authors = getNormalisedAuthors(data)&lt;br /&gt;
	for i, author in ipairs(authors) do&lt;br /&gt;
		authors[i] = makeUserLinks(author)&lt;br /&gt;
	end&lt;br /&gt;
	local separator = &amp;#039;, &amp;#039;&lt;br /&gt;
	local conjunction&lt;br /&gt;
	if #authors &amp;gt; 2 then&lt;br /&gt;
		conjunction = &amp;#039;, and &amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		conjunction = &amp;#039; and &amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	return mw.text.listToText(authors, separator, conjunction)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Blurb for who the article was nominated by.&lt;br /&gt;
function params.NOMINATED(data)&lt;br /&gt;
	local authors = data.authors&lt;br /&gt;
	if #authors &amp;gt; 1 or authors[1] and authors[1] ~= data.revisionUser then&lt;br /&gt;
		return &amp;#039;Nominated by &amp;#039; .. makeUserLinks(data.revisionUser)&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;#039;Self-nominated&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Warning to check that the credits are correct.&lt;br /&gt;
function params.CHECK_CREDITS_WARNING(data)&lt;br /&gt;
	if #data.articles &amp;gt; 1 then&lt;br /&gt;
		return &amp;#039;Please check to make sure these auto-generated credits are correct.&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- DYK credits. These are used by the bot to credit people on their talk pages&lt;br /&gt;
-- and to tag articles.&lt;br /&gt;
function params.CREDITS(data)&lt;br /&gt;
	local authors = getNormalisedAuthors(data)&lt;br /&gt;
	local articles = data.articles&lt;br /&gt;
	local nompage = params.NOM_SUBPAGE(data)&lt;br /&gt;
	local nominator = data.revisionUser&lt;br /&gt;
	local nominatorIsAuthor = false&lt;br /&gt;
	for i, author in ipairs(data.authors) do&lt;br /&gt;
		if author == nominator then&lt;br /&gt;
			nominatorIsAuthor = true&lt;br /&gt;
			break&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local ret = {}&lt;br /&gt;
&lt;br /&gt;
	local function addTemplate(template, article, user, subpage)&lt;br /&gt;
		local params = normalizeTemplateParameters{article, user}&lt;br /&gt;
		if subpage then&lt;br /&gt;
			table.insert(params, &amp;#039;subpage=&amp;#039; .. subpage)&lt;br /&gt;
		end&lt;br /&gt;
		ret[#ret + 1] = string.format(&lt;br /&gt;
			&amp;#039;* {{%s|%s}}&amp;#039;,&lt;br /&gt;
			template,&lt;br /&gt;
			table.concat(params, &amp;#039;|&amp;#039;)&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- First article, a special case&lt;br /&gt;
	do&lt;br /&gt;
		local article = articles[1]&lt;br /&gt;
		addTemplate(&lt;br /&gt;
			&amp;#039;DYKmake&amp;#039;,&lt;br /&gt;
			article,&lt;br /&gt;
			authors[1],&lt;br /&gt;
			nompage&lt;br /&gt;
		)&lt;br /&gt;
		for i = 2, #authors do&lt;br /&gt;
			addTemplate(&amp;#039;DYKmake&amp;#039;, article, authors[i], nompage)&lt;br /&gt;
		end&lt;br /&gt;
		if not nominatorIsAuthor then&lt;br /&gt;
			addTemplate(&amp;#039;DYKnom&amp;#039;, article, nominator)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Second article and up&lt;br /&gt;
	for i = 2, #articles do&lt;br /&gt;
		local article = articles[i]&lt;br /&gt;
		for j, author in ipairs(authors) do&lt;br /&gt;
			addTemplate(&amp;#039;DYKmake&amp;#039;, article, author, nompage)&lt;br /&gt;
		end&lt;br /&gt;
		if not nominatorIsAuthor then&lt;br /&gt;
			addTemplate(&amp;#039;DYKnom&amp;#039;, article, nominator)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return table.concat(ret, &amp;#039;\n&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- If a file was displayed, use the {{-}} template so that it doesn&amp;#039;t spill&lt;br /&gt;
-- over into the next nomination.&lt;br /&gt;
function params.FILE_BREAK(data)&lt;br /&gt;
	local args = data.args&lt;br /&gt;
	if args.image or args.sound or args.video then&lt;br /&gt;
		return &amp;#039;{{-}}&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Exports&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p._main(args, frame, title)&lt;br /&gt;
	-- Subst check.&lt;br /&gt;
	-- Check for the frame object as well to make debugging easier from the&lt;br /&gt;
	-- debug console.&lt;br /&gt;
	if frame and not mw.isSubsting() then&lt;br /&gt;
		return &amp;#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;&amp;#039; ..&lt;br /&gt;
			&amp;#039;This template must be [[Wikipedia:Substitution|substituted]]. &amp;#039; ..&lt;br /&gt;
			&amp;#039;Replace &amp;lt;code&amp;gt;{{NewDYKnomination}}&amp;lt;/code&amp;gt; with &amp;#039; ..&lt;br /&gt;
			&amp;#039;&amp;lt;code&amp;gt;{{subst:NewDYKnomination}}&amp;lt;/code&amp;gt;.&amp;lt;/strong&amp;gt;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set default arguments.&lt;br /&gt;
	frame = frame or mw.getCurrentFrame()&lt;br /&gt;
	title = title or mw.title.getCurrentTitle()&lt;br /&gt;
&lt;br /&gt;
	-- Process data from the arguments.&lt;br /&gt;
	local splitArgs = splitByPrefix(args)&lt;br /&gt;
	local articles = getPrefixedArgs(args, splitArgs, {&amp;#039;article&amp;#039;})&lt;br /&gt;
	local authors = getPrefixedArgs(&lt;br /&gt;
		args,&lt;br /&gt;
		splitArgs,&lt;br /&gt;
		{&amp;#039;expander&amp;#039;, &amp;#039;creator&amp;#039;, &amp;#039;writer&amp;#039;, &amp;#039;author&amp;#039;}&lt;br /&gt;
	)&lt;br /&gt;
	local alts = getPrefixedArgs(args, splitArgs, {&amp;#039;ALT&amp;#039;})&lt;br /&gt;
&lt;br /&gt;
	-- Input sanity checks.&lt;br /&gt;
	local errors = {}&lt;br /&gt;
	for i, article in ipairs(articles) do&lt;br /&gt;
		local articleTitle = makeTitle(article)&lt;br /&gt;
		if not articleTitle then&lt;br /&gt;
			table.insert(errors, formatInvalidTitleError(&lt;br /&gt;
				article,&lt;br /&gt;
				&amp;#039;article name&amp;#039;&lt;br /&gt;
			))&lt;br /&gt;
			articles[i] = &amp;#039;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if #articles &amp;lt; 1 then&lt;br /&gt;
		articles[1] = title.subpageText&lt;br /&gt;
	end&lt;br /&gt;
	for i, author in ipairs(authors) do&lt;br /&gt;
		authors[i] = getRootPageText(author)&lt;br /&gt;
		if not authors[i] then&lt;br /&gt;
			table.insert(errors, formatInvalidTitleError(author, &amp;#039;user name&amp;#039;))&lt;br /&gt;
			authors[i] = &amp;#039;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Substitute the parameters in the output template.&lt;br /&gt;
	local data = {&lt;br /&gt;
		errors = errors,&lt;br /&gt;
		args = args,&lt;br /&gt;
		articles = articles,&lt;br /&gt;
		authors = authors,&lt;br /&gt;
		revisionUser = frame:preprocess(&amp;#039;{{safesubst:REVISIONUSER}}&amp;#039;),&lt;br /&gt;
		alts = alts,&lt;br /&gt;
		title = title,&lt;br /&gt;
	}&lt;br /&gt;
	local ret = OUTPUT_TEMPLATE:gsub(&amp;#039;${([%u_]+)}&amp;#039;, function (funcName)&lt;br /&gt;
		local func = params[funcName]&lt;br /&gt;
		if not func then&lt;br /&gt;
			error(string.format(&lt;br /&gt;
				&amp;quot;invalid parameter &amp;#039;${%s}&amp;#039; &amp;quot; ..&lt;br /&gt;
				&amp;quot;(no corresponding parameter function found)&amp;quot;,&lt;br /&gt;
				funcName&lt;br /&gt;
			))&lt;br /&gt;
		end&lt;br /&gt;
		return func(data) or &amp;#039;&amp;#039;&lt;br /&gt;
	end)&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame, {&lt;br /&gt;
		wrappers = &amp;#039;Template:NewDYKnomination&amp;#039;&lt;br /&gt;
	})&lt;br /&gt;
	return p._main(args, frame)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Wugapodes</name></author>
	</entry>
</feed>