Module:UserLinks: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
add support for a demo parameter
m (caps fix)
(add support for a demo parameter)
Line 1:
local ToolbarBuilder = require('Module:Toolbar')
local u = {} -- Table for user-data helper strings.
local demo
 
-- Define a custom error message for this module.
local function err(msg, cat)
catif = (cat and ('[[Category:' .. cat .. ']]'))not ordemo ''then
cat = '[[Category:' .. cat .. ']]'
else
cat = ''
end
return '<span class="error">[[Module:UserLinks]] error: ' .. msg .. '.</span>' .. cat
end
Line 225 ⟶ 230:
end
end
 
demo = args.demo -- Set the demo variable.
-- If the username is absent or blank, return an error and a tracking category.
if args.user == '' or (not args.user and (not args.User or args.User == '')) then
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu