Module:UserLinks: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
update links to XTools, add link to autoedits tool; rm misleading comment; convert spaces to tabs
m (Changed protection level of Module:UserLinks: Allow template editors ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)))
(update links to XTools, add link to autoedits tool; rm misleading comment; convert spaces to tabs)
Line 48:
-- data snippets. New link functions should be added below the existing
-- functions.
--
-- For documentation on how to add new link functions, please see
-- [[Module:UserLinks#Adding new links]].
----------------------------------------------------------------------------
 
Line 87 ⟶ 84:
return makeUrlLink(
{
host = 'toolsxtools.wmflabs.org',
path = '/xtools-ec/',
query = {
userusername = snippets.username,
project = snippets.toolLang .. '.' .. snippets.projectLong .. '.org'
}
Line 115 ⟶ 112:
'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 = {
wikiusername = snippets.projectLongusername,
project = snippets.toolLang .. '.' .. snippets.projectLong .. '.org'
}
},
message('display-autoedits')
)
end
Line 183 ⟶ 195:
return makeUrlLink(
{
host = 'toolsxtools.wmflabs.org',
path = '/xtools/editsummary/index.php',
query = {
nameusername = snippets.username,
langproject = snippets.toolLang, .. '.' .. snippets.projectLong .. '.org'
wiki = snippets.projectLong
}
},
Line 615 ⟶ 626:
 
return snippets
end
 
function p.validateProjectCode(s)
Line 623 ⟶ 634:
-- returns nil for both.
interwikiTable = interwikiTable or mw.loadData('Module:InterwikiTable')
for key, t in pairs(interwikiTable) do
for i, prefix in ipairs(t.iw_prefix) do
if s == prefix then
return s, key
end
end
end
end
return nil, nil
end
 
Line 813 ⟶ 824:
ret[#ret + 1] = '|}'
return table.concat(ret, '\n')
end
 
return p
0

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu