Module:Mbox

local p = {} local a = require( 'Module:Abb' ) local util = require( 'Module:Util' )

function namespace local namespaceAccess = { [0] = 'true', [1] = 'false', [2]	= 'true', [3] = 'false', [4] = 'false', [5] = 'false' }	id = mw.title.getCurrentTitle.namespace id = namespaceAccess[id] if id == nil then return false else return id	end end

function namespaceOld(pagename) local namespaceAccess = { ['MAIN']     = 'true', ['TALK']     = 'false', ['FILE']     = 'true', ['FILE_TALK'] = 'false', ['USER']     = 'false', ['USER_TALK'] = 'false' }   local namespace = nil

if string.len(pagename) ~= 0 then namespace = pagename else namespace = 'MAIN' end local access = namespaceAccess[namespace] if access == nil then access = 'false' end

return access end

function p._namespace return namespace end

function p.header(frame) header = frame.args['header'] details = frame.args['details'] games = frame.args['games'] cat = frame.args['category'] mode = frame.args['mode'] prepend = frame.args['prepend'] sortkey = frame.args['sort key'] append = frame.args['append'] pagename = frame.args['pagename'] result = '' catResult = '' if util.exists(header) then result = header if util.exists(games) and a.valid(games) > 0 then result = result .. ' ('			if util.exists(details) then				result = result .. details				else				result = result .. games			end			result = result .. ')' if namespaceOld then catResult = a._category(games, cat, prepend, append, mode, sortKey) end end end return result .. catResult end

return p