fbpx
วิกิพีเดีย

มอดูล:Cat main

คู่มือการใช้งานมอดูล[สร้าง]
-- This module implements {{cat main}}.  local mHatnote = require('Module:Hatnote') local yesno = require('Module:Yesno') local mTableTools -- lazily initialise local mArguments -- lazily initialise  local p = {}  function p.catMain(frame)  mTableTools = require('Module:TableTools')  mArguments = require('Module:Arguments')  local args = mArguments.getArgs(frame, {wrappers = 'แม่แบบ:ดูเพิ่ม'})  local pages = mTableTools.compressSparseArray(args)  local options = {  article = args.article,  selfref = args.selfref  }  return p._catMain(options, unpack(pages)) end  function p._catMain(options, ...)  options = options or {}   -- Get the links table.  local links = mHatnote.formatPages(...)  if not links[1] then  local page = mw.title.getCurrentTitle().text  links[1] = mHatnote._formatLink(page)  end  for i, link in ipairs(links) do  links[i] = string.format("'''%s'''", link)  end   -- Get the pagetype.  local pagetype  if yesno(options.article) ~= false then  pagetype = 'บทความ'  else  pagetype = 'หน้า'  end   -- Work out whether we need to be singular or plural.  local stringToFormat  if #links > 1 then  stringToFormat = 'สำหรับ%sหลักใน[[วิธีใช้:การจัดหมวดหมู่|หมวดหมู่]]นี้ ดูที่ %s'  else  stringToFormat = 'สำหรับ%sหลักใน[[วิธีใช้:การจัดหมวดหมู่|หมวดหมู่]]นี้ ดูที่ %s'  end   -- Get the text.  local text = string.format(  stringToFormat,  pagetype,  mw.text.listToText(links)  )   -- Pass it through to Module:Hatnote.  local hnOptions = {}  hnOptions.selfref = options.selfref  hnOptions.extraclasses = 'relarticle mainarticle'   return mHatnote._hatnote(text, hnOptions) end  return p 

มอด, main, อการใช, งานมอด, สร, าง, ณอาจจะต, องการสร, างค, อการใช, งานของมอด, ลน, เข, ยนสามารถทำการทดลองได, กระบะทราย, สร, าง, ดลอก, และช, ดทดสอบ, สร, าง, ของมอด, ลน, โปรดเพ, มหมวดหม, ไปท, หน, าย, อย, หน, าย, อยของมอด, ลน, this, module, implements, main, local,. khumuxkarichnganmxdul srang khunxaccatxngkarsrangkhumuxkarichngankhxngmxdulniphuekhiynsamarththakarthdlxngidthikrabathray srang khdlxk aelachudthdsxb srang khxngmxdulnioprdephimhmwdhmuipthihnayxy doc hnayxykhxngmxdulni This module implements cat main local mHatnote require Module Hatnote local yesno require Module Yesno local mTableTools lazily initialise local mArguments lazily initialise local p function p catMain frame mTableTools require Module TableTools mArguments require Module Arguments local args mArguments getArgs frame wrappers aemaebb duephim local pages mTableTools compressSparseArray args local options article args article selfref args selfref return p catMain options unpack pages end function p catMain options options options or Get the links table local links mHatnote formatPages if not links 1 then local page mw title getCurrentTitle text links 1 mHatnote formatLink page end for i link in ipairs links do links i string format s link end Get the pagetype local pagetype if yesno options article false then pagetype bthkhwam else pagetype hna end Work out whether we need to be singular or plural local stringToFormat if links gt 1 then stringToFormat sahrb shlkin withiich karcdhmwdhmu hmwdhmu ni duthi s else stringToFormat sahrb shlkin withiich karcdhmwdhmu hmwdhmu ni duthi s end Get the text local text string format stringToFormat pagetype mw text listToText links Pass it through to Module Hatnote local hnOptions hnOptions selfref options selfref hnOptions extraclasses relarticle mainarticle return mHatnote hatnote text hnOptions end return p ekhathungcak https th wikipedia org w index php title mxdul Cat main amp oldid 9782662, wikipedia, วิกิ หนังสือ, หนังสือ, ห้องสมุด,

บทความ

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