test
← Previous revision | Revision as of 06:03, 5 July 2025 | ||
Line 1: | Line 1: | ||
-- This is an user sandbox, other editor are mostly not welcome |
|||
-- If any error exist or any inconsistency exist |
|||
-- Do not edit in such case, contact at talk page: [[User talk:KEmel49]] |
|||
-- any edit or nomination for deletion is not welcome, it is a Sandbox |
|||
-- This module may be moved to new module name after leaving a redirect |
|||
-- Then again testing will continue to this module Sandbox |
|||
-- Sometime more than one editor will continue editing this sandbox |
|||
-- In that case, add all code below notify function. |
|||
-- Thank you for your understanding |
|||
local p = {} |
local p = {} |
||
function p.greet(frame) |
|||
local name = frame.args.name or frame.args[1] or "" |
|||
if name == "" then |
|||
return '<strong class="error">Unable to fetch any username</strong>' |
|||
end |
|||
local title = mw.title.new('User:'.. name) |
|||
if title and title.exists then |
|||
return 'Hello [[User:'..name..'|'..name..']]' |
|||
else |
|||
return '<strong class="error">Userpage does not exist or user is not registered</strong>' |
|||
end |
|||
end |
|||
function p.hello(frame) |
function p.hello(frame) |
||
Line 21: | Line 16: | ||
return '[[Module:'..frame.args[1]..']]' |
return '[[Module:'..frame.args[1]..']]' |
||
end |
end |
||
end |
|||
function p.sign(frame) |
|||
if frame.arg[1] == 'sign' then |
|||
return '~~~~' |
|||
elseif frame.arg[1] == 's' then |
|||
return '[[User:KEmel49|KEmel49]]•<sup>([[User talk:KEmel49|talk]]•[[Special:Contributions/KEmel49|contributions]])</sup>' |
|||
elseif frame.arg[1] ~= 's' or frame.arg[1] ~= 'sign' then |
|||
return 'Either fill "s" or "sign"' |
|||
end |
|||
end |
end |
||
Line 68: | Line 53: | ||
return table.concat(out) |
return table.concat(out) |
||
end |
end |
||
-- Edit your testing below this comment |
|||
return p |
return p |