local p = local getArgs = require('Module:Arguments').getArgs
function p.links(permission, parenthetical, username, userURL) local l = ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -- To add a new link, find an empty line in the section below -- and add either a link or a wikilink, like so: -- -- l[#l+1] = '[URL external link]' -- l[#l+1] = 'wikilink' -- -- However, replace any instance of a username with: -- -- '..userURL..' -- For a [] URL/external link -- '..username..' -- For a wikilink -- -- Each new "l" (link string) will automatically have a spaced dot in -- the final output. To skip the spaced dot, add a line before with: -- -- before() -- -- See the existing links below for examples. ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- local Before = -- Skip dots before 1, 2, 3. function before(replacement) Before[#l+1] = replacement end -- First links: 1. Userpage, 2. parenthetical (defined below in p.main) -- 3. User talk page, 4. User talk page history, 5. User contributions. l[1] = ''..username..'' l[2] = parenthetical l[3] = '(t' l[4] = 'th' l[5] = 'c' -- Permission-specific contributions links if permission
'Page mover' then before(' (') l[#l+1] = 'RM/TR' l[#l+1] = 'RMs)' elseif permission
if permission
'Template editor' then l[#l+1] = 'templates created' else l[#l+1] = 'pages created (xtools' l[#l+1] = 'sigma)' end
l[#l+1] = 'non-automated edits' l[#l+1] = 'BLP edits' l[#l+1] = 'undos' l[#l+1] = 'manual reverts' l[#l+1] = 'rollbacks' l[#l+1] = 'logs' before(' (') l[#l+1] = 'blocks' l[#l+1] = 'rights' l[#l+1] = 'moves)' if permission
'Page mover' then l[#l+1] = 'CSD log' end
l[#l+1] = 'rfar' l[#l+1] = 'spi' l[#l+1] = 'cci)' ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -- New links should be somewhere above this line. -- Next, links for assigning permissions and notifying the user. ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- before('
(') if permission