Module:Test3: Difference between revisions

From ProleWiki, the proletarian encyclopedia
(Finalizing module, final testing)
m (Testing)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
local p = {}
local p = {}
function wikilink(name)
if name:sub(1,2) == '[[' and name:sub(-2) == ']]' then
name = name:sub(3,-3)
end
return '[[' .. name .. ']]'
end


function p.main(frame)
function p.main(frame)
local args = frame:getParent().args
return frame:callParserFunction("REVISIONUSER")
local String = ''
local counter = 1
for k,v in pairs(args) do
if k == 1 then
String = String .. wikilink(v)
else
counter = counter+1
String = String .. ', ' .. wikilink(v)
end
end
if counter>1 then
return 'See main articles: ' .. String
else
return 'See main article: ' .. String
end
end
end
return p
return p

Latest revision as of 12:14, 27 April 2024

local p = {}

function p.main(frame)
	return frame:callParserFunction("REVISIONUSER")
end
return p