fbpx
วิกิพีเดีย

มอดูล:Dashboard entry

คู่มือการใช้งานมอดูล[สร้าง]
local p = {} local plain = require("Module:Plain text")._main function p.main(frame)  local page = frame.args[1]  local pipe = frame.args[2]  local content = mw.title.new(page):getContent()  -- Unfortunately, the bot that this is replacing uses "prop=sections", which isn't accessible to Lua.  -- Therefore, we have to parse the page manuallly  local sections = content:gmatch("%{%{สภากาแฟ/อภิปรายเรื่อง| *([^=]+) *)%}%}")  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  if #secttable == 0 then  declutter = declutter .. "| fade = yes"  end  local output = string.format("{{วิกิพีเดีย:แดชบอร์ด/กลุ่ม%s|1='''[[%s|%s]]''' (%s การอภิปราย)'''<div style='font-size:85%%; padding-left:1.5em;'>''ใหม่สุด:''",  declutter, page, pipe, #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  output = output .. "</div>}} {{end}}"  else  output = output .. "</div>\n{{end}}"  end  return frame:preprocess(output) end  function p.sectionlevel2(frame)  local page = frame.args[1]  local pipe = frame.args[2]  local content = mw.title.new(page):getContent()  -- Unfortunately, the bot that this is replacing uses "prop=sections", which isn't accessible to Lua.  -- Therefore, we have to parse the page manuallly  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  if #secttable == 0 then  declutter = declutter .. "| fade = yes"  end  local output = string.format("{{วิกิพีเดีย:แดชบอร์ด/กลุ่ม%s|1='''[[%s|%s]]''' (%s การอภิปราย)'''<div style='font-size:85%%; padding-left:1.5em;'>''ใหม่สุด:''",  declutter, page, pipe, #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  output = output .. "</div>}} {{end}}"  else  output = output .. "</div>\n{{end}}"  end  return frame:preprocess(output) end  function p.village_pump(frame)  local page = frame.args[1]  local pipe = frame.args[2]  local content = mw.title.new(page):getContent()  -- Unfortunately, the bot that this is replacing uses "prop=sections", which isn't accessible to Lua.  -- Therefore, we have to parse the page manuallly  local sections = content:gmatch("%{%{สภากาแฟ/อภิปรายเรื่อง%|([^%}]+)%}%}")  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  if #secttable == 0 then  declutter = declutter .. "| fade = yes"  end  local output = string.format("{{วิกิพีเดีย:แดชบอร์ด/กลุ่ม%s|1='''[[%s|%s]]''' '''<div style='font-size:85%%; padding-left:1.5em;'>''ใหม่สุด:''",  declutter, page, pipe)  local count = 0  for i = #secttable, 1, -1 do  sect = secttable[i]  output = output .. string.format("\n* [[วิกิพีเดีย:สภากาแฟ/อภิปราย/%s|%s]]", sect, sect)  count = count + 1  if count == 3 then  output = output .. "\n</div>}}\n<div style=\"padding-left:3em;\">"  end  end  if count < 3 then  output = output .. "</div>}} {{end}}"  else  output = output .. "</div>\n{{end}}"  end  return frame:preprocess(output) end  function p.rfa_nom(frame)  local template = frame.args[1] or "รายชื่อเสนอ" -- เช่น "รายชื่อเสนอ"  local display = frame.args[2] or "เสนอผู้ดูแลระบบ" -- เช่น "เสนอผู้ดูแลระบบ"  local prefix = frame.args['prefix'] or "วิกิพีเดีย:เสนอชื่อเพื่อเป็นผู้ดูแล/"  local page = "วิกิพีเดีย:เสนอชื่อเพื่อเป็นผู้ดูแล"  local content = mw.title.new(page):getContent() -- here we go again!  local users = content:gmatch("\n%* *%{%{" .. template .. "%|([^%}]+)%}%}") -- "* {{template|Example}}"  local user  local usertable = {}  for user in users do  usertable[#usertable + 1] = user  end  local declutter  if #usertable < 3 then -- this mean 'if less than 3 then no collapsible'  declutter = "|class="  else  declutter = ""  end  if #usertable == 0 then  declutter = declutter .. "| fade = yes"  end  local output = string.format("{{วิกิพีเดีย:แดชบอร์ด/กลุ่ม%s|1='''[[%s|%s]]''' '''<div style='font-size:85%%; padding-left:1.5em;'>''ใหม่สุด:''",  declutter, page, display)  local count = 0  if #usertable ~= 0 then  for i = #usertable, 1, -1 do  user = usertable[i]  output = output .. string.format("\n* [[" .. prefix .. "%s|%s]]", user, user)  count = count + 1  if count == 3 then  output = output .. "\n</div>}}\n<div style=\"padding-left:3em;\">"  end  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  if #secttable == 0 then  declutter = declutter .. "|fade=yes"  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  output = output .. "</div>}} {{end}}"  else  output = output .. "</div>\n{{end}}"  end  return frame:preprocess(output) end  return p 

มอด, dashboard, entry, อการใช, งานมอด, สร, าง, ณอาจจะต, องการสร, างค, อการใช, งานของมอด, ลน, เข, ยนสามารถทำการทดลองได, กระบะทราย, สร, าง, ดลอก, และช, ดทดสอบ, สร, าง, ของมอด, ลน, โปรดเพ, มหมวดหม, ไปท, หน, าย, อย, หน, าย, อยของมอด, ลน, local, local, plain, requi. khumuxkarichnganmxdul srang khunxaccatxngkarsrangkhumuxkarichngankhxngmxdulniphuekhiynsamarththakarthdlxngidthikrabathray srang khdlxk aelachudthdsxb srang khxngmxdulnioprdephimhmwdhmuipthihnayxy doc hnayxykhxngmxdulnilocal p local plain require Module Plain text main function p main frame local page frame args 1 local pipe frame args 2 local content mw title new page getContent Unfortunately the bot that this is replacing uses prop sections which isn t accessible to Lua Therefore we have to parse the page manuallly local sections content gmatch sphakaaef xphiprayeruxng 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 lt 3 then declutter class else declutter end if secttable 0 then declutter declutter fade yes end local output string format wikiphiediy aedchbxrd klum s 1 s s s karxphipray lt div style font size 85 padding left 1 5em gt ihmsud declutter page pipe 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 lt div gt n lt div style padding left 3em gt end end if count lt 3 then output output lt div gt end else output output lt div gt n end end return frame preprocess output end function p sectionlevel2 frame local page frame args 1 local pipe frame args 2 local content mw title new page getContent Unfortunately the bot that this is replacing uses prop sections which isn t accessible to Lua Therefore we have to parse the page manuallly 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 lt 3 then declutter class else declutter end if secttable 0 then declutter declutter fade yes end local output string format wikiphiediy aedchbxrd klum s 1 s s s karxphipray lt div style font size 85 padding left 1 5em gt ihmsud declutter page pipe 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 lt div gt n lt div style padding left 3em gt end end if count lt 3 then output output lt div gt end else output output lt div gt n end end return frame preprocess output end function p village pump frame local page frame args 1 local pipe frame args 2 local content mw title new page getContent Unfortunately the bot that this is replacing uses prop sections which isn t accessible to Lua Therefore we have to parse the page manuallly local sections content gmatch sphakaaef xphiprayeruxng 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 lt 3 then declutter class else declutter end if secttable 0 then declutter declutter fade yes end local output string format wikiphiediy aedchbxrd klum s 1 s s lt div style font size 85 padding left 1 5em gt ihmsud declutter page pipe local count 0 for i secttable 1 1 do sect secttable i output output string format n wikiphiediy sphakaaef xphipray s s sect sect count count 1 if count 3 then output output n lt div gt n lt div style padding left 3em gt end end if count lt 3 then output output lt div gt end else output output lt div gt n end end return frame preprocess output end function p rfa nom frame local template frame args 1 or raychuxesnx echn raychuxesnx local display frame args 2 or esnxphuduaelrabb echn esnxphuduaelrabb local prefix frame args prefix or wikiphiediy esnxchuxephuxepnphuduael local page wikiphiediy esnxchuxephuxepnphuduael local content mw title new page getContent here we go again local users content gmatch n template template Example local user local usertable for user in users do usertable usertable 1 user end local declutter if usertable lt 3 then this mean if less than 3 then no collapsible declutter class else declutter end if usertable 0 then declutter declutter fade yes end local output string format wikiphiediy aedchbxrd klum s 1 s s lt div style font size 85 padding left 1 5em gt ihmsud declutter page display local count 0 if usertable 0 then for i usertable 1 1 do user usertable i output output string format n prefix s s user user count count 1 if count 3 then output output n lt div gt n lt div style padding left 3em gt end end else output output n yngimmikaresnxchuxinkhnani end if count lt 3 then output output lt div gt end else output output lt div gt 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 wikiphiediy aecngkhxsiththi 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 lt 3 then declutter class else declutter end if secttable 0 then declutter declutter fade yes end local output string format wikiphiediy aedchbxrd klum s 1 s s s phuichkalngkhxy lt div style font size 85 padding left 1 5em gt ihmsud 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 lt div gt n lt div style padding left 3em gt end end if count lt 3 then output output lt div gt end else output output lt div gt n end end return frame preprocess output end return p ekhathungcak https th wikipedia org w index php title mxdul Dashboard entry amp oldid 9467203, wikipedia, วิกิ หนังสือ, หนังสือ, ห้องสมุด,

บทความ

, อ่าน, ดาวน์โหลด, ฟรี, ดาวน์โหลดฟรี, mp3, วิดีโอ, mp4, 3gp, jpg, jpeg, gif, png, รูปภาพ, เพลง, เพลง, หนัง, หนังสือ, เกม, เกม