ผลต่างระหว่างรุ่นของ "มอดูล:Dashboard entry"

เนื้อหาที่ลบ เนื้อหาที่เพิ่ม
Patsagorn Y. (คุย | ส่วนร่วม)
ไม่มีความย่อการแก้ไข
ป้ายระบุ: แก้ไขจากอุปกรณ์เคลื่อนที่ แก้ไขจากเว็บสำหรับอุปกรณ์เคลื่อนที่ แก้ไขขั้นสูงด้วยอุปกรณ์เคลื่อนที่
Patsagorn Y. (คุย | ส่วนร่วม)
ไม่มีความย่อการแก้ไข
ป้ายระบุ: แก้ไขจากอุปกรณ์เคลื่อนที่ แก้ไขจากเว็บสำหรับอุปกรณ์เคลื่อนที่ แก้ไขขั้นสูงด้วยอุปกรณ์เคลื่อนที่
บรรทัด 39:
return frame:preprocess(output)
end
 
 
 
 
function p.village_pump(frame)
เส้น 113 ⟶ 110:
end
else
output = output .. "\n* ''ยังไม่มีการเสนอชื่อในขณะนี้''"
end
if count < 3 then
output = output .. "</div>}} {{end}}"
else
output = output .. "</div>\n{{end}}"
end
return frame:preprocess(output)
end
 
function p.rfp(frame)
local perm = frame.args[1]
local display = frame.args[2] or perm
local page = "วิกิพีเดีย:แจ้งขอสิทธิ/" .. perm
local content = mw.title.new(page):getContent() -- here we go again and again...
local sections = content:gmatch("\n==== *([^=]+) *====")
local count = 0
local sect
-- copy array to table so it can be iterated in reverse
local secttable = {}
for sect in sections do
secttable[#secttable + 1] = sect
end
local declutter
if #secttable < 3 then
declutter = "|class="
else
declutter = ""
end
local output = string.format("{{วิกิพีเดีย:แดชบอร์ด/กลุ่ม%s|1='''[[%s|%s]]''' (%s ผู้ใช้กำลังคอย)'''<div style='font-size:85%%; padding-left:1.5em;'>''ใหม่สุด:''",
declutter, page, display, #secttable)
local count = 0
for i = #secttable, 1, -1 do
sect = secttable[i]
output = output .. string.format("\n* [[%s#%s|%s]]", page, mw.uri.anchorEncode(sect), plain(sect))
count = count + 1
if count == 3 then
output = output .. "\n</div>}}\n<div style=\"padding-left:3em;\">"
end
end
if count < 3 then