<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://luteandlore.ink/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AEp_ref</id>
	<title>Module:Ep ref - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://luteandlore.ink/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AEp_ref"/>
	<link rel="alternate" type="text/html" href="https://luteandlore.ink/wiki/index.php?title=Module:Ep_ref&amp;action=history"/>
	<updated>2026-09-16T21:49:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://luteandlore.ink/wiki/index.php?title=Module:Ep_ref&amp;diff=542&amp;oldid=prev</id>
		<title>Thaskthebard: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://luteandlore.ink/wiki/index.php?title=Module:Ep_ref&amp;diff=542&amp;oldid=prev"/>
		<updated>2025-12-09T15:34:43Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:34, 9 December 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Thaskthebard</name></author>
	</entry>
	<entry>
		<id>https://luteandlore.ink/wiki/index.php?title=Module:Ep_ref&amp;diff=541&amp;oldid=prev</id>
		<title>criticalrole&gt;Dexcuracy at 20:41, 14 September 2020</title>
		<link rel="alternate" type="text/html" href="https://luteandlore.ink/wiki/index.php?title=Module:Ep_ref&amp;diff=541&amp;oldid=prev"/>
		<updated>2020-09-14T20:41:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
local p = {}&lt;br /&gt;
 &lt;br /&gt;
-- function to create and format the reference&lt;br /&gt;
function p.epRef(frame)&lt;br /&gt;
    local reference = true&lt;br /&gt;
    local epSwitcher = require(&amp;#039;Module:Ep/Switcher&amp;#039;)&lt;br /&gt;
 &lt;br /&gt;
    -- receiving {{ep ref}} parameters&lt;br /&gt;
    local ep = frame.args[&amp;quot;ep&amp;quot;] or &amp;quot;&amp;quot;&lt;br /&gt;
    local part = frame.args[&amp;quot;part&amp;quot;] or nil&lt;br /&gt;
    local intro = frame.args[&amp;quot;intro&amp;quot;] or nil&lt;br /&gt;
    local more = frame.args[&amp;quot;more&amp;quot;] or nil&lt;br /&gt;
    local vod = frame.args[&amp;quot;vod&amp;quot;] or nil&lt;br /&gt;
    local group = frame.args[&amp;quot;group&amp;quot;] or nil&lt;br /&gt;
    local name = frame.args[&amp;quot;name&amp;quot;] or nil&lt;br /&gt;
    local startTime = frame.args[1] or nil&lt;br /&gt;
    local endTime = frame.args[2] or nil&lt;br /&gt;
    local cite = frame.args[&amp;quot;cite&amp;quot;] or nil&lt;br /&gt;
    local nsfw = frame.args[&amp;quot;nsfw&amp;quot;] or nil&lt;br /&gt;
 &lt;br /&gt;
    local epName, CxEE = epSwitcher.epSwitcher(frame, reference)&lt;br /&gt;
 &lt;br /&gt;
    if isnotempty(CxEE) then epName = &amp;quot;\&amp;quot;[[&amp;quot; .. epName .. &amp;quot;]]\&amp;quot;&amp;quot; end&lt;br /&gt;
 &lt;br /&gt;
    -- &amp;lt;small&amp;gt;(CxEE)&amp;lt;/small&amp;gt;&lt;br /&gt;
    local small = mw.html.create(&amp;#039;small&amp;#039;)&lt;br /&gt;
    small&lt;br /&gt;
        :wikitext(&amp;quot;(&amp;quot; .. CxEE .. &amp;quot;)&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
    if isnotempty(CxEE) then fullEpName = epName .. &amp;quot; &amp;quot; .. tostring(small)&lt;br /&gt;
    else fullEpName = epName end&lt;br /&gt;
 &lt;br /&gt;
    -- Set empty CxEE value to 0x00 for the purposes of the &amp;quot;Articles needing citations/0x00&amp;quot; category&lt;br /&gt;
    if not isnotempty(CxEE) then CxEE = &amp;quot;0x00&amp;quot; end&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    -- if part was used to define a Trial of the Take episode, remove part from final reference&lt;br /&gt;
    if CxEE == &amp;quot;1x18&amp;quot; or CxEE == &amp;quot;1x19&amp;quot; or CxEE == &amp;quot;1x20&amp;quot; or CxEE == &amp;quot;1x21&amp;quot; then part = &amp;quot;&amp;quot; end&lt;br /&gt;
 &lt;br /&gt;
    -- get YouTube URL from Module:Ep/YTURLSwitcher/URLs&lt;br /&gt;
    local ytURL = mw.loadData(&amp;#039;Module:Ep/YTURLSwitcher/URLs&amp;#039;)&lt;br /&gt;
    local url&lt;br /&gt;
    if isnotempty(vod) then url = vod&lt;br /&gt;
    elseif isnotempty(part) then url = ytURL[CxEE .. part] &lt;br /&gt;
    else url = ytURL[CxEE] or ytURL[&amp;quot;default&amp;quot;] end&lt;br /&gt;
 &lt;br /&gt;
    --add timestamp to youtube URL&lt;br /&gt;
    local timeSnippet&lt;br /&gt;
    local timedURL&lt;br /&gt;
    local longURL = false&lt;br /&gt;
    local timeLength&lt;br /&gt;
 &lt;br /&gt;
    if isnotempty(url) then longURL = string.find(url, &amp;quot;?&amp;quot;) end&lt;br /&gt;
 &lt;br /&gt;
    -- split timestamp at colons&lt;br /&gt;
    if isnotempty(startTime) then timeSnippet = split(startTime, &amp;quot;:&amp;quot;) end&lt;br /&gt;
    &lt;br /&gt;
    if isnotempty(timeSnippet) then timeLength = #timeSnippet end&lt;br /&gt;
    &lt;br /&gt;
    -- adding time to standard (&amp;quot;long&amp;quot;) YouTube URLs&lt;br /&gt;
    if isnotempty(timeSnippet) and longURL and timeLength == 3 then timedURL = &amp;quot;[&amp;quot; .. url .. &amp;quot;&amp;amp;amp;t=0&amp;quot; .. timeSnippet[1] .. &amp;quot;h0&amp;quot; .. timeSnippet[2] .. &amp;quot;m0&amp;quot; .. timeSnippet[3] .. &amp;quot;s &amp;quot; .. startTime .. &amp;quot;]&amp;quot;&lt;br /&gt;
    elseif isnotempty(timeSnippet) and longURL and timeLength == 2 then timedURL = &amp;quot;[&amp;quot; .. url .. &amp;quot;&amp;amp;amp;t=0&amp;quot; .. timeSnippet[1] .. &amp;quot;m0&amp;quot; .. timeSnippet[2] .. &amp;quot;s &amp;quot; .. startTime .. &amp;quot;]&amp;quot;&lt;br /&gt;
    elseif isnotempty(timeSnippet) and longURL and timeLength == 1 then timedURL = &amp;quot;[&amp;quot; .. url .. &amp;quot;&amp;amp;amp;t=0&amp;quot; .. timeSnippet[1] .. &amp;quot;s &amp;quot; .. startTime .. &amp;quot;]&amp;quot; end&lt;br /&gt;
        &lt;br /&gt;
    -- adding time to shortened URLS&lt;br /&gt;
    if isnotempty(url) and isnotempty(timeSnippet) and not longURL and timeLength == 3 then timedURL = &amp;quot;[&amp;quot; .. url .. &amp;quot;?t=0&amp;quot; .. timeSnippet[1] .. &amp;quot;h0&amp;quot; .. timeSnippet[2] .. &amp;quot;m0&amp;quot; .. timeSnippet[3] .. &amp;quot;s &amp;quot; .. startTime .. &amp;quot;]&amp;quot;&lt;br /&gt;
    elseif isnotempty(url) and isnotempty(timeSnippet) and not longURL and timeLength == 2 then timedURL = &amp;quot;[&amp;quot; .. url .. &amp;quot;?t=0&amp;quot; .. timeSnippet[1] .. &amp;quot;m0&amp;quot; .. timeSnippet[2] .. &amp;quot;s &amp;quot; .. startTime .. &amp;quot;]&amp;quot;&lt;br /&gt;
    elseif isnotempty(url) and isnotempty(timeSnippet) and not longURL and timeLength == 1 then timedURL = &amp;quot;[&amp;quot; .. url .. &amp;quot;?t=0&amp;quot; .. timeSnippet[1] .. &amp;quot;s &amp;quot; .. startTime .. &amp;quot;]&amp;quot; end&lt;br /&gt;
 &lt;br /&gt;
    if isnotempty(timedURL) then startTime = timedURL end&lt;br /&gt;
 &lt;br /&gt;
    local refText = &amp;#039;See &amp;#039; .. fullEpName&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    if isnotempty(part) then refText = refText .. &amp;quot;, part &amp;quot; .. part end&lt;br /&gt;
 &lt;br /&gt;
    if isnotempty(part) and isnotempty(startTime) then refText = refText .. &amp;quot;,&amp;quot; end&lt;br /&gt;
 &lt;br /&gt;
    if isnotempty(startTime) and isnotempty(endTime) then refText = refText .. &amp;quot; from &amp;quot; .. startTime .. &amp;quot; through &amp;quot; .. endTime .. &amp;quot;.&amp;quot;&lt;br /&gt;
    elseif isnotempty(startTime) then refText = refText .. &amp;quot; at &amp;quot; .. startTime .. &amp;quot;.&amp;quot;&lt;br /&gt;
    else refText = refText .. &amp;quot;.&amp;quot; end&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    -- citation format&lt;br /&gt;
    local supCite = mw.html.create(&amp;#039;sup&amp;#039;)&lt;br /&gt;
    supCite&lt;br /&gt;
        :wikitext(&amp;quot;[&amp;#039;&amp;#039;citation needed&amp;#039;&amp;#039;]&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
    local citeCategory&lt;br /&gt;
    if isnotempty(cite) then citeCategory = &amp;quot;[[Category:Articles needing citations/&amp;quot; .. CxEE .. &amp;quot;]]&amp;quot; end&lt;br /&gt;
 &lt;br /&gt;
    if isnotempty(intro) then refText = intro .. &amp;quot;&amp;amp;nbsp; &amp;quot; .. refText end&lt;br /&gt;
    if isnotempty(cite) then refText = refText .. tostring(supCite) .. citeCategory end&lt;br /&gt;
    if isnotempty(more) then refText = refText .. &amp;quot;&amp;amp;nbsp; &amp;quot; .. more end&lt;br /&gt;
    if isnotempty(nsfw) then nsfw = &amp;quot;&amp;amp;nbsp; &amp;lt;span style=\&amp;quot;color: red;\&amp;quot;&amp;gt;&amp;lt;abbr style=\&amp;quot;cursor:help;border-bottom:1px dotted red;\&amp;quot; title=\&amp;quot;Not Safe For Work:&amp;amp;nbsp; May include inappropriate content.\&amp;quot;&amp;gt;NSFW&amp;lt;/abbr&amp;gt;&amp;lt;/span&amp;gt;.&amp;quot; end&lt;br /&gt;
    if isnotempty(nsfw) then refText = refText .. nsfw end&lt;br /&gt;
 &lt;br /&gt;
    -- create wikitext reference&lt;br /&gt;
    local reference = &amp;quot;&amp;lt;ref&amp;quot;&lt;br /&gt;
    if isnotempty(group) then reference = reference .. &amp;quot; group=&amp;quot; .. group end&lt;br /&gt;
    if isnotempty(name) then reference = reference .. &amp;quot; name=&amp;quot; .. name end&lt;br /&gt;
    reference = reference .. &amp;quot;&amp;gt;&amp;quot; .. refText .. &amp;quot;&amp;lt;/ref&amp;gt;&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    -- Temporary category for the purposes of transitioning the timecodes from Campaign 1, Episode 1 up to and including Campaign 2, Episode 50. Episodes were moved (only 2x20 to, including, 2x50 at the time of writing, other episodes presumably will be moved too) from the G&amp;amp;S channel to the CR channel. We needed a list of all articles referencing these episodes to update timestamps because the breaks were removed.&lt;br /&gt;
    -- reference = reference .. &amp;quot;[[Category:Articles referencing an episode/&amp;quot; .. CxEE .. &amp;quot;]]&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
    return frame:preprocess(reference)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
-- function to split a string at a specified character&lt;br /&gt;
function split(s, delimiter)&lt;br /&gt;
    result = {};&lt;br /&gt;
    for match in (s..delimiter):gmatch(&amp;quot;(.-)&amp;quot;..delimiter) do&lt;br /&gt;
        table.insert(result, match);&lt;br /&gt;
    end&lt;br /&gt;
    return result;&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
-- function to determine that a string is not empty&lt;br /&gt;
function isnotempty(s)&lt;br /&gt;
    return s ~= nil and s~= &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>criticalrole&gt;Dexcuracy</name></author>
	</entry>
</feed>