Module:Delete

-- local p = {} local yn = require( 'Module:Yesno' ) local err = require( 'Module:Error' ) local reason = mw.loadData( 'Module:Delete/reason' )

function p.delete(frame) local args = frame:getParent.args local rs = " Reason for deletion: " local ns = frame:preprocess('') local disc = yn(args.discussion, true) and args.discussion or frame:preprocess('') ns = yn(ns, true) and mw.ustring.lower(ns) or 'article'

--Categorize the page local cat = "" if args.categories ~= 'false' then cat = "" if yn(args.quick) then cat = cat .. "" end end -- Deciede reason for deletion if yn(args.reason, true) then reason = frame:preprocess(args.reason) elseif yn(args.pre, true) then if reason[args.pre] == nil then return err('Invalid Preformatted reason') end reason = frame:preprocess(reason[args.pre]) else reason = '' rs = '' end rs = rs .. reason

-- Create the container local box = mw.html.create('div') :addClass(yn(args.quick) and 'boilerplate metadata tophat-delete' or 'boilerplate metadata tophat-qdelete') :attr('id', 'delete')

--Fill it   local text if yn(args.quick) then text = "'''This " .. ns .. " is a candidate for speedy deletion.'''".. " A user believes that this page makes a clear violation under the Narutopedia's Deletion policy. ".. "If you disagree with this, then replace this notice area with " .. " and discussion on whether it should be deleted may commence." else text = "'''This " .. ns .. " is being considered for deletion''' in accordance with the Narutopedia's".. " Deletion policy. Please share your thoughts on the matter on the discussion page" end

-- Hardcoded footer in template as it always remains same text = text .. rs .. frame:preprocess(frame.args.footer).. cat return box:wikitext(text) end return p -- --