Jump to content

Module:InfoboxTools

From Archono Database
Revision as of 14:53, 9 July 2026 by NonaSoft (talk | contribs) (Created page with "local p = {} p.builder = function(frame) local data = frame.args[1] --[[ == EXAMPLE SYNTAX == name,image,heading["General Information"],param["This", "that"] heavily tba ]] local out = "{{Infobox|" local current = "" local i = 0 while i <= data.len() do i = i + 1 if data[i] == ","then -- SYNTAX RUN if current == "name" then out = out + "{{InfoboxTitle|{{{name|}}}|{{{namecaption|}}}}}" end else current = current + data[i] end end...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

local p = {}

p.builder = function(frame)
	local data = frame.args[1]
	--[[
	== EXAMPLE SYNTAX ==
	name,image,heading["General Information"],param["This", "that"]
	
	heavily tba
	]]
	local out = "{{Infobox|"
	local current = ""
	local i = 0
	while i <= data.len() do
		i = i + 1
		if data[i] == ","then
			-- SYNTAX RUN
			if current == "name" then
				out = out + "{{InfoboxTitle|{{{name|}}}|{{{namecaption|}}}}}"
			end
		else
			current = current + data[i]
		end
			
	end
	
	return "TBA"
end

return p