Editing Module:T 0 You do not have permission to edit this page, for the following reasons: The action you have requested is limited to users in one of the groups: Autoconfirmed users, Administrators, FANDOM Staff, FANDOM Helpers, VSTF, Wiki Managers, Content Team Members. Please log in to edit this wiki.Joining Old School RuneScape Wiki is free, and it only takes a minute.We hope that you sign in, and become a member of the community!Click here to log in or create an account You must confirm your e-mail address before editing pages. Please set and validate your e-mail address through your user preferences. more + You can view and copy the source of this page: -- <nowiki> -- [[Template:T]] -- local p = {} function p.main(frame) local args = frame:getParent().args local link = args[1] local uri local targs = {} local ns local i = 1 -- strip transclusion modifiers ([[mw:Help:Magic words#Transclusion modifiers]]) link = link :gsub('safesubst:', '') :gsub('subst:', '') :gsub('int:', '') :gsub('msg:', '') :gsub('msgnw:', '') :gsub('raw:', '') ns = mw.text.split(link, ':')[1] -- check for valid namespace else prepend Template: if not (ns == '' or mw.site.namespaces[ns]) then link = 'Template:' .. link end -- use fullUrl so it doesn't cause any wanted pages uri = mw.uri.fullUrl(link) -- generate a list of args and params for k, v in pairs(args) do -- because lua has no continue statement if k ~= 1 then if type(k) == 'string' then v = k .. '=' .. v end targs[i] = v i = i + 1 end end targs = table.concat(targs, '|') if targs ~= '' then targs = '|' .. targs end return '<code>{{[' .. tostring(uri) .. ' ' .. args[1] .. ']' .. targs .. '}}</code>' end return p Return to Module:T. Edit summary Show changes