If you want an account, contact Ziggy via Discord: link={{{3}}} @ziggymoncher_. Read BonziPEDIA:Requesting accounts for more details.

Module:Videoframe: Difference between revisions

From BonziPEDIA, the Official BonziWORLD Encyclopedia of varied quality.
Jump to navigationJump to search
No edit summary
constant order
Tag: Reverted
Line 6: Line 6:
local videos = ""
local videos = ""
local args = frame:getParent().args
local args = frame:getParent().args
local paramsSorted = {}


for key, value in pairs(args) do
for key, value in pairs(args) do
if type(key) == "number" and key >= 4 then
table.insert(paramsSorted, key)
end
end
table.sort(paramsSorted)
for i in paramsSorted do
if key == 4 then
if key == 4 then
videos = videos .. "<div class='cyclesequenceitem' align='center'>" .. value .. "</div>"
videos = videos .. "<div class='cyclesequenceitem' align='center'>" .. args[i] .. "</div>"
elseif key > 4 then
else
videos = videos .. "<div class='cyclesequenceitem hiddentext' align='center'>" .. value .. "</div>"
videos = videos .. "<div class='cyclesequenceitem hiddentext' align='center'>" .. args[i] .. "</div>"
end
end
end
end

Revision as of 22:32, 26 February 2024

Documentation for this module may be created at Module:Videoframe/doc

--[[ A Lua rewrite of Encyclopedia Dramatica's videoframe template.
     Made by SeamusIsANigger. ]]
local videoframe = {}

function videoframe.videoframe(frame)
	local videos = ""
	local args = frame:getParent().args
	local paramsSorted = {}

	for key, value in pairs(args) do
		if type(key) == "number" and key >= 4 then
			table.insert(paramsSorted, key)
		end
	end

	table.sort(paramsSorted)

	for i in paramsSorted do
		if key == 4 then
			videos = videos .. "<div class='cyclesequenceitem' align='center'>" .. args[i] .. "</div>"
		else
			videos = videos .. "<div class='cyclesequenceitem hiddentext' align='center'>" .. args[i] .. "</div>"
		end
	end

	return "<div class='cyclesequence' style='max-width:640px; margin-left:auto; margin-right:auto; text-align:center; " .. args[2] .. "'>".. videos .. "<div class='cyclesequencelinks'><span class='cyclesequencelinkprev showhidetext' style='" .. args[3] .. "'>Previous Video</span> &#124; <span class='cyclesequencelinknext showhidetext' style='" .. args[3] .. "'>Next Video</span></div></div>"
end

return videoframe