Jump to content

Module:Professional wrestling profiles

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Silverfish (talk | contribs) at 15:42, 25 May 2016. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}
function p.getcagematchid(frame)
ent = mw.wikibase.getEntityObject();
return ent:formatPropertyValues('P2728').value;
end	

function p.cagematch(frame)
    id = frame.args[1] or ""; if id == "" then id = frame.args["id"] or "" end
    if id == "" then id = p.getcatchmatchid(frame) end	
    local name = frame.args[2] or ""; if name == "" then name = frame.args["name"] or "" end
    if name == "" then
    name = frame:expandTemplate{title = 'PAGENAMEBASE'}
	end
	link = "http://www.cagematch.net/?id=2&nr=" .. id;
	code = "[" .. link .. " " ..	name .. "]";
    return code
end
return p