"ഘടകം:No ping" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം
mlwiki>Jacob.jose (ചെ.) (en:Module:No_ping എന്നതിൽ നിന്ന് 5 പതിപ്പുകൾ ഇറക്കുമതി ചെയ്തു) |
(ചെ.) (ഒരു പതിപ്പ് ഇറക്കുമതി ചെയ്തു: import user link template) |
||
(വ്യത്യാസം ഇല്ല)
| |||
12:47, 2 ജനുവരി 2021-നു നിലവിലുള്ള രൂപം
ഈ ഘടകത്തിന്റെ വിവരണം ഘടകം:No ping/വിവരണം എന്ന താളിൽ നിർമ്മിക്കാവുന്നതാണ്
-- This module implements {{noping}}.
local p = {}
function p.main(frame)
local args = frame:getParent().args
return p._main(args)
end
function p._main(args)
local ret = {}
local fullUrl = mw.uri.fullUrl
local format = string.format
for i, username in ipairs(args) do
local url = fullUrl(mw.site.namespaces.User.name .. ':' .. username)
url = tostring(url)
local label = args['label' .. tostring(i)]
url = format('[%s %s]', url, label or username)
ret[#ret + 1] = url
end
ret = mw.text.listToText(ret)
ret = '<span class="plainlinks">' .. ret .. '</span>'
return ret
end
return p