Module:Sandbox/ChaoticShadow/Song

local getArgs = require('Module:Arguments').getArgs local p = {}

local builder = require('Module:Sandbox/ChaoticShadow/InfoboxBuilder')

local function youtube(arg) return mw.getCurrentFrame:callParserFunction({		name = '#tag',		args = { 'youtube', arg }	}) end

local tbl = { ['q'] = 'b', ['w'] = 'n', ['e'] = 'm', }

local function tbl2(arg) return tbl[arg] end

local function imageimage(arg) return string.format("", arg) end

function p.main(frame) -- local args = getArgs(frame) local args = frame:getParent.args local infobox = builder.new; infobox:setName('bob') infobox:setParams{ { name = 'test1', func = '' }, { name = 'test2', func = '', default = 'not ok' }, { name = 'test3', func = youtube }, { name = 'test4', func = tbl2 }, { name = 'test5', func = tbl }, { name = 'image1', func = imageimage, default = 'NewLogo.png' }, { name = 'swimage1', func = imageimage }, { name = 'swimage2', func = imageimage }, { name = 'swimage3', func = imageimage }, { name = 'hideme1' }, { name = 'hideme2' } }	infobox:setArgs(args) -- return infobox:getContent({ content = 'test1' }) infobox :setHeaderBackgroundColor('#ff70a8') :setWidth('300px') :addRow(false,			{				{ tag = 'th', content = 'Test' },				{ tag = 'argtd', content = 'test1' }			}		) :addRow(false,			{				{ tag = 'th', content = 'Test2' },				{ tag = 'argtd', content = 'test2' }			}		) :addRow{ cols = { { tag = 'th', content = 'Hide pLEase' }, { tag = 'argtd', content = 'hideme1' } },			options = { hideIfEmpty = { 'hideme1' }			}		}		:addRow{ cols = { { tag = 'th', content = 'Dont Hide ' }, { tag = 'argtd', content = 'hideme2' } }		}		-- :addRow{ -- 	{ tag = 'argtd', content = 'test3' } -- }		-- :addHeader{ -- 	tag = 'th', -- 	content = 'This is a Header' -- }		-- :addHeader{ -- 	tag = 'th', -- 	content = 'This is also a header', -- 	css = { -- 		['background-color'] = "lightblue" -- 	}		-- }		-- :addRow{ -- 	{ tag = 'th', content = 'Test4' }, -- 	{ tag = 'argtd', content = 'test4', css = { -- 		['font-weight'] = 'bold', -- 		['font-style'] = 'italic' -- 	}},		-- 	{ tag = 'th', content = 'Test5' }, -- 	{ tag = 'argtd', content = 'test5' } -- }		-- :addImage{ -- 	{ content = 'image1' } -- }		-- :addImage{ -- 	{ tag = 'argtd', content = 'swimage1', title = 'ONe' }, -- 	{ content = 'swimage2', title = 'Two' } -- }		-- :addImage{ -- 	{ tag = 'argtd', content = 'swimage1', title = 'ONe' }, -- 	{ tag = 'argtd', content = 'swimage2', title = 'Two' } -- }		-- :addImage{ -- 	{ tag = 'argtd', content = 'swimage1', title = 'ONe' }, -- 	{ tag = 'argtd', content = 'swimage3', title = 'THREE' } -- }		-- :setHeaderColorsByParam('test1', {		-- 	ok = { bg = '#fff', text = '#000' }		-- }) -- :addHeader{ -- 	tag = 'th', -- 	content = 'This is a Header' -- }		-- :addLinks return ' ' .. mw.dumpObject(frame.args) .. ' '		..		' '.. mw.dumpObject(infobox) .. ' ' 		..		infobox:tostring -- local t = frame:callParserFunction{ name = 'ns', args = -2 } -- local t2 = frame:callParserFunction{ name = 'ns', args = 2 } -- local root = mw.html.create('div') -- root:wikitext(frame:callParserFunction({ -- 	name = '#tag', -- 	args = { 'youtube', 'dy90tA3TT1c' } -- }))	-- return frame:callParserFunction({	-- 	name = '#tag',	-- 	args = { 'youtube', 'dy90tA3TT1c' }	-- }) -- return frame:callParserFunction({	-- 	name = '#tag',	-- 	args = {'tabber', 'A=Test|-|B=Test2' }	-- }) -- return tostring(root) --return t .. t2 end

return p