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 14:07, 25 May 2016 (Create Module). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local p = {}
function p.cagematch(frame)
    local id = frame.args[1] or ""; if id == "" then id = frame.args["id"] or "" end
    if id == "" then
    	local entity = mw.wikibase.getEntityObject;
    	id = entity:getBestStatements('P2728')[1]
    end	
    local name = frame.args[2] or ""; if name == "" then name = frame.args["name"] or "" end
    if name == "" then
    name = frame:callParserFunction('PAGENAMEBASE');
	end
	link = "http://www.cagematch.net/?id=2&nr=" .. id;
	code = "[" .. link .. " " ..	name .. "]";
    return code
end
return p