Jump to content

Module:Sandbox/Pasixxxx/tst

Unchecked
From Wikipedia

Documentation for this module may be created at Module:Sandbox/Pasixxxx/tst/doc

local xx = {}
 -- this is a comment
  
function xx.hello( frame )
	v =
	{
		 ins=function (item) table.insert(v,item)	end,
		 "\{\| class=\"wikitable\""
		 
	}
	--mw:log("Testing the logging, I don't know where this whole string gets logged, by User:Pasixxxx ")	
	
	local function ins(a) v.ins(a ) end
	local function rs() ins"|" end
	
	ins("\|" .. frame:getParent():getTitle() ) 
	ins("\|".."Page count" .."||"..mw.site.stats.pages) 
	ins("\|".."Edits count" .."||"..mw.site.stats.edits) 
	ins("\| [[Module:Sandbox/Pasixxxx/tst]]")
	ins("\| this is nice" )
	ins("\|\}")
	
	local function header() return "This is a very very very very very long header of a column" end
	local function wikitable(luatable) 
		return 
		"{| class=\"wikitable\"\n" .. 
    		table.concat(luatable,"\n|-\n") .. 
    		"\n|}\n" 
		end
		--local function manywikitables
	t3 ={
		"!" .. header() .."1" .. 
		"!!" .. header().."2" .. 
		"!!" .. header().."3".. 
		"!!" .. header().."4",  
		"| seven || eight ||nine||elven" ,
		"|  test||test2||lorem||ipsum",
		"| one || two||lazy||fox",
		"| three ||four||tst|| jumped, cell with a looooooooo­ooooooooooooo­oooooooooooooooo­oooooooooooooooooooooong contents"
		}
    	return  (
    		function (numberOfTables) 
    		local i=""
    		for j=1,numberOfTables do 
    			i=i .. wikitable(t3) 
			end 
			return i end
		) (10)
end

function xx.insTitle(frame)
	mw.title.makeTitle("User","Pasixxxx/tst3","Wow can I create a page??? No...")	
	
end

function xx.f2(frame)
	
	return("second function response")
	end
 
return xx