Jump to content

Module:Sandbox/KEmel49

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by KEmel49 (talk | contribs) at 20:13, 26 June 2025 (Minor edit). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}

function p.notify(frame)
	local args = frame.args
	local article = args.article or ""
	local diff = args.diff or ""
	local cite_format = args["cite_format"] or ""
	local ogurl = args.ogurl or ""
	local username = mw.title.getCurrentTitle().text

	local out = {}

	table.insert(out, "== Re: " .. article .. " ==\n\n")

	table.insert(out, '[[File:Information.svg|20px]] Hello ' .. username .. ', This is to let you know that ')
	if diff ~= "" then
		table.insert(out, '[[Special:Diff/' .. diff .. '|one of your recent edits]]')
	else
		table.insert(out, 'one of your recent edits')
	end

	table.insert(out, ' at \'\'[[' .. article .. ']]\'\' caused a citation error. ')

	if cite_format ~= "" then
		table.insert(out, 'you have added invalid url at {{Tl|' .. cite_format .. '}} template. ')
	end

	if ogurl ~= "" then
		table.insert(out, 'Your url input was <code>' .. mw.text.nowiki(ogurl) .. '</code>. ')
	end

	table.insert(out, 'Do not add invalid URLs and use preview before saving your edit. Happy editing.')

	table.insert(out, ' <!-- User:KEmel49/sandbox 5 -->')

	return table.concat(out)
end

return p