وحدة:أرشيف النقاش

من ويكي مصدر، المكتبة الحرة
p= {}

p.listPages = function(frame)
	if frame.args[1] == nil then
		return ""
	end
	local archive = ""
	local page = frame.args[1]
	local start = 1
	if frame.args[2] ~= nil and type(tonumber(frame.args[2])) == 'number' then
		if tonumber(frame.args[2]) > 1 then
		start = tonumber(frame.args[2])
		end
	end	
	for i = start,start+250 
	do 
		if mw.title.new( page.."/أرشيف "..i, '0' ).exists == true then
			archive = archive.."[["..page.."/أرشيف "..i.."|"..i.."]] • "
		end
	end
	return archive
	end
return p