.mw-parser-output .documentation,.mw-parser-output .documentation-metadata{border:1px solid var(--border-color-base,#a2a9b1);background-color:#ecfcf4;color:inhe
-----------------------------------------------------
-- Archive navigator for Wikipedia:Editor reflections
-- Because of the archive title layout,
-- Module:Archive can't be used here
-----------------------------------------------------
local p = {}
function p.archiveExists( n )
archivePage = "Wikipedia:Editor reflections/" .. (n+1) .. "–" .. (n+100)
return mw.title.new(archivePage).exists
end
function p.archiveNumber()
title = mw.title.getCurrentTitle().text
mw.log(title)
number = tonumber(string.match(title, "/(.*)–")) - 1
return number
end
function p.archiveCount()
count = 0
while p.archiveExists(count) do
count = count + 100
end
return count
end
function p.archiveNavLinks()
number = p.archiveNumber()
total = p.archiveCount()
links = "| "
if number > 0 then
links = links .. "[[Wikipedia:Editor reflections/1–100]] || ← || "
end
if number > 200 then
links = links .. "[[Wikipedia:Editor reflections/" .. number-199 .. "–" .. number-100 .. "]] || "
end
if number > 100 then
links = links .. "[[Wikipedia:Editor reflections/" .. number-99 .. "–" .. number .. "]] ||"
end
links = links .. " [[Wikipedia:Editor reflections/" .. number+1 .. "–" .. number+100 .. "]]"
if number < total - 200 then
links = links .. " || [[Wikipedia:Editor reflections/" .. number+101 .. "–" .. number+200 .. "]]"
end
if number < total - 300 then
links = links .. " || [[Wikipedia:Editor reflections/" .. number+201 .. "–" .. number+300 .. "]]"
end
if number < total - 100 then
links = links .. " || → || [[Wikipedia:Editor reflections/" .. total-99 .. "–" .. total .. "]]"
end
return links
end
function p.archiveListRecursive( n )
if p.archiveExists(n) then
return "* [[Wikipedia:Editor reflections/" .. (n+1) .. "–" .. (n+100) .. "]]\n" .. p.archiveListRecursive(n+100)
else
return ""
end
end
function p.archiveList( frame )
return p.archiveListRecursive( frame.args[1] )
end
return p
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.