<?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%2FDeryck_Chan%2Frfdt</id>
	<title>Module:Sandbox/Deryck Chan/rfdt - 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%2FDeryck_Chan%2Frfdt"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Deryck_Chan/rfdt&amp;action=history"/>
	<updated>2026-04-20T18:30:25Z</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/Deryck_Chan/rfdt&amp;diff=145330&amp;oldid=prev</id>
		<title>imported&gt;Deryck Chan: alternative test for multiple parameters</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Deryck_Chan/rfdt&amp;diff=145330&amp;oldid=prev"/>
		<updated>2017-02-22T22:03:34Z</updated>

		<summary type="html">&lt;p&gt;alternative test for multiple parameters&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local rfd = {}&lt;br /&gt;
&lt;br /&gt;
function rfd.test1 (frame)&lt;br /&gt;
	local test_string1 = frame.args[1]&lt;br /&gt;
	return test_string1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function rfd.test2 (frame) --this bit dumps a noinclude into the final output&lt;br /&gt;
	local test_string11 = frame.args[1]&lt;br /&gt;
	local test_string12 = frame.args[2]&lt;br /&gt;
	return test_string11 .. &amp;#039;&amp;lt;noinclude&amp;gt;&amp;#039; .. test_string12 .. &amp;#039;&amp;lt;/noinclude&amp;gt;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function rfd.test3(frame) --this bit literally just dumps a human understandable safesubst string&lt;br /&gt;
	local linkstring = &amp;#039;[[{{ {{{|safesubst:}}}FULLPAGENAME}}#{{ {{{|safesubst:}}}CURRENTTIMESTAMP}}]]&amp;#039;&lt;br /&gt;
	local anchorstring = &amp;#039;&amp;lt;span id=&amp;quot;{{ {{{|safesubst:}}}CURRENTTIMESTAMP}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
	return linkstring&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function rfd.test4(frame)&lt;br /&gt;
	return mw.title.getCurrentTitle()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function rfd.rfdt_collapsebox(frame) --this bit creates the &amp;quot;closed discussion&amp;quot; notice&lt;br /&gt;
	local message_string1 = &amp;#039;&amp;lt;includeonly&amp;gt;[[File:Symbol move vote.svg|16px|link=|alt=]] &amp;#039;&lt;br /&gt;
	.. &amp;quot;&amp;#039;&amp;#039;&amp;#039;Closed discussion&amp;#039;&amp;#039;&amp;#039;, click &amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	local link_string = &amp;quot;[[{{ {{{|safesubst:}}}FULLPAGENAME}}#{{ {{{|safesubst:}}}CURRENTTIMESTAMP}}|here]]&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	local message_string2 = &amp;#039; to view full discussion.&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	local result_string = &amp;#039;&amp;#039;&lt;br /&gt;
	if (frame.args[1]) then --this line doesn&amp;#039;t work yet because Lua evaluates an empty string as true&lt;br /&gt;
		result_string = &amp;#039; Result was: &amp;#039; .. frame.args[1]&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local end_string = &amp;#039;&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
	return message_string1 .. link_string .. message_string2 .. result_string .. end_string&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function rfd.rfdb_noinclude(frame)&lt;br /&gt;
	return &amp;#039;&amp;lt;/noinclude&amp;gt;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function rfd.generate_icon(frame)&lt;br /&gt;
	&lt;br /&gt;
	local function match_result(result_parameter)&lt;br /&gt;
			&lt;br /&gt;
		local find_count = 0&lt;br /&gt;
		&lt;br /&gt;
		local result_match = &amp;#039;&amp;#039;&lt;br /&gt;
		&lt;br /&gt;
		local parameter_lower = result_parameter:lower()&lt;br /&gt;
		&lt;br /&gt;
		if (parameter_lower:find(&amp;#039;keep&amp;#039;)) then&lt;br /&gt;
			result_match = &amp;#039;Keep&amp;#039;&lt;br /&gt;
			find_count = find_count + 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if (parameter_lower:find(&amp;#039;delete&amp;#039;)) then&lt;br /&gt;
			result_match = &amp;#039;Delete&amp;#039;&lt;br /&gt;
			find_count = find_count + 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if (parameter_lower:find(&amp;#039;retarget&amp;#039;)) then&lt;br /&gt;
			result_match = &amp;#039;Retarget&amp;#039;&lt;br /&gt;
			find_count = find_count + 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if (parameter_lower:find(&amp;#039;disambiguate&amp;#039;) or parameter_lower:find(&amp;#039;dab&amp;#039;) or parameter_lower:find(&amp;#039;sia&amp;#039;) or parameter_lower:find(&amp;#039;set index&amp;#039;)) then&lt;br /&gt;
			result_match = &amp;#039;Disambiguate&amp;#039;&lt;br /&gt;
			find_count = find_count + 1&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if find_count &amp;gt;= 2 then&lt;br /&gt;
			result_match = &amp;#039;Multiple&amp;#039;&lt;br /&gt;
		elseif find_count &amp;lt;= 0 then&lt;br /&gt;
			result_match = &amp;#039;None&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		return result_match, &amp;#039;lalala&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local result_string1, result_string2 = match_result(frame.args[1])&lt;br /&gt;
	&lt;br /&gt;
	return result_string1 .. &amp;#039;abcd&amp;#039; .. result_string2&lt;br /&gt;
	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return rfd&lt;/div&gt;</summary>
		<author><name>imported&gt;Deryck Chan</name></author>
	</entry>
</feed>