-- This module implements .
local p =
function p.main(frame) local args = frame:getParent.args local pageTitle = frame:getParent:getTitle local styles = frame:extensionTag('templatestyles', ,); return p._main(args, pageTitle, styles)end
function p._main(args, pageTitle, styles) local ret = local fullUrl = mw.uri.fullUrl local format = string.format for i, username in ipairs(args) do local url = fullUrl(mw.site.namespaces.User.name .. ':' .. username) url = tostring(url) local label = args['label' .. tostring(i)] local template = label or username if pageTitle.subpageText ~= 'Archive' or yesno(args['force_ifexist'], 'no') then if mw.title.makeTitle(2, username).exists then template = '
' .. template .. '' else template = '' .. template .. '' end end url = format('[%s %s]', url, template) ret[#ret + 1] = url end ret = mw.text.listToText(ret) ret = styles .. '' .. ret .. '' return retendreturn p