Anonymous user
Module:UserLinks: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
add block log link
(add some different user link functions) |
(add block log link) |
||
Line 13:
-- u.username The plain username --
-- u.usernameHtml The username html-encoded. Spaces are encoded with plus signs. --
-- u.usernameHtmlWiki The username html-encoded. Spaces are encoded with underscores. --
-- --
-- u.project The plain project name. --
Line 43 ⟶ 44:
local function makeLogsLink()
return '[[' .. u.projectColon .. 'Special:Log/' .. u.username .. '|logs]]'
end
local function makeBlockLogLink()
local url = mw.uri.fullUrl('Special:Log/block', 'page=User:' .. u.usernameHtmlWiki)
return '[' .. tostring(url) .. ' block log]'
end
Line 85 ⟶ 91:
u.username = args.user or args.User
end
u.usernameHtml = mw.uri.encode(u.username) -- Html-encoded username. Spaces are encoded as pluses.
u.usernameHtmlWiki = mw.uri.encode(u.username, 'WIKI') -- Html-encodeed username. Spaces are encoded as underscores.
-------------------------------------------------
|