Anonymous user
Module:UserLinks: Difference between revisions
m
Changed protection level for "Module:UserLinks": no longer in interface ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
m (1 revision imported) |
m (Changed protection level for "Module:UserLinks": no longer in interface ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))) |
||
Line 3:
-- This module creates a list of links about a given user. It can be used on --
-- its own or from a template. See the /doc page for more documentation. --
--------------------------------------------------------------------------------
Line 49 ⟶ 48:
-- data snippets. New link functions should be added below the existing
-- functions.
----------------------------------------------------------------------------
Line 82 ⟶ 78:
message('display-contributions')
)
end
function linkFunctions.c64(snippets)
-- Contributions
local first64 = snippets.username:match('^%x+:%x+:%x+:%x+:')
or snippets.username:match('^%x+:%x+:%x+:')
or snippets.username:match('^%x+:%x+:')
or snippets.username:match('^%x+:')
return first64 and makeWikilink(
snippets.interwiki,
-1,
'Contribs/' .. first64 .. ':/64',
'(/64)'
) or ''
end
Line 88 ⟶ 98:
return makeUrlLink(
{
host = '
path = '/
query = {
project = snippets.toolLang .. '.' .. snippets.projectLong .. '.org'
}
Line 116 ⟶ 126:
'Log/' .. snippets.username,
message('display-logs')
)
end
function linkFunctions.ae(snippets)
-- Automated edits (and non-automated contributions).
return makeUrlLink(
{
host = 'xtools.wmflabs.org',
path = '/autoedits/',
query = {
project = snippets.toolLang .. '.' .. snippets.projectLong .. '.org'
}
},
message('display-autoedits')
)
end
Line 184 ⟶ 209:
return makeUrlLink(
{
host = '
path = '
query = {
▲ wiki = snippets.projectLong
}
},
Line 616 ⟶ 640:
return snippets
end
function p.validateProjectCode(s)
Line 624 ⟶ 648:
-- returns nil for both.
interwikiTable = interwikiTable or mw.loadData('Module:InterwikiTable')
end
end
Line 814 ⟶ 838:
ret[#ret + 1] = '|}'
return table.concat(ret, '\n')
end
return p
|