Module:Edit count table

local p = {}

function p.geteditcount(params) local user if params ~= nil and params.args ~= nil and params.args.user ~= nil then user = params.args.user else user = "Xbony2" end local namespaces = { {"Main", 0}, {"Talk", 1}, {"User", 2}, {"User talk", 3}, {"Feed The Beast Wiki", 4}, {"Feed The Beast Wiki talk", 5}, {"File", 6}, {"File talk", 7}, {"MediaWiki", 8}, {"MediaWiki talk", 9}, {"Template", 10}, {"Template talk", 11}, {"Help", 12}, {"Help talk", 13}, {"Category", 14}, {"Category talk", 15}, {"Widget", 274}, {"Widget talk", 275}, {"Module", 828}, {"Module talk", 829}, {"Module", 1198}, {"Module talk", 1199}, {"Gadget", 2300}, {"Gadget talk", 2301}, {"Gadget definition", 2302}, {"Gadget definition talk", 2303} }	local topoftable = "{| class=\"wikitable\" style=\"margin: 0 auto 1em; text-align: center\"" .. "\n" .. "|+ style=\"caption-side: bottom; font-size: x-small; font-weight: normal\" | Last update: " .. os.date("%B %d, %Y at %I:%M UTC") .. "" .. "\n" .. "|-"	local bottomoftable = "|- class=\"plainlinks\" " local frame = mw.getCurrentFrame for _, data in ipairs(namespaces) do		local editcount = frame:preprocess("") if editcount ~= "" then topoftable = topoftable .. "! " .. data[1] .. "\n" bottomoftable = bottomoftable .. "| [https://ftb.gamepedia.com/index.php?title=Special%3AContributions&target=" .. user .. "&namespace=" .. data[2] .. "]\n" end end

bottomoftable = bottomoftable .. "| " .. frame:preprocess("") .. "\n|}" return topoftable .. bottomoftable end

return p