Module:User

local p = {}

local utilsError = require('Module:UtilsError')

function p.Main(frame) return p.main(frame.args) end

function p.main(args) local template = args[1] --The Template that is being used. This parameter does not take user input. local data = args[2] --User input local data2 = args[3] --Extra user input if (template == "Archive List") then local archives = {} local archiveList = "" if (data ~= "") then --Error checks if ((tonumber(data) <= 0) == false) then for i=1,data do archives[i] = ("\n* Archive ".. i .. "") end for i=1,data do archiveList = (archiveList .. archives[i]) end return string.format("{|class=\"messagebox\" style=\"display: flex; border: 4px solid #426787; background-color: #1d578b; float: right; border-radius:10px;\"\n|\n|-\n| Archives of %s \n|-\n| %s \n|}", data2, archiveList) else utilsError.warn("The first parameter must be a number greater than 0.") end else utilsError.warn("You must enter the number of archives in the first parameter.") end end if (template == "Legacy User") then if (data == "User" or data == "") then return string.format("  Legacy User Page This is a user page for a legacy account, which is a very old wiki account that has long been abandoned. This page is locked from editing as it's here to preserve history. If there are any problems with this page, please notify a Staff member. ")		end		if (data == "Talk") then			return string.format("  Legacy User Talk Page This is a talk page for a legacy account, which is a very old wiki account that has long been abandoned. This page is locked from editing as it's here to preserve history. If you came here to send this user a message, you may instead notify a Staff member as this user will most-likely not respond. ")		end		if (data == "Sandbox") then			return string.format("  Legacy User Sandbox ''This is a user sandbox for a legacy account, which is a very old wiki account that has long been abandoned. This page is locked from editing as it's here to preserve history. If there are any problems with this page, please notify a Staff member. ")		end	end end

return p