fbpx
วิกิพีเดีย

มอดูล:Fb overview

คู่มือการใช้งานมอดูล[สร้าง]
-- This implements {{fb overview}} local p = {}  -- Internationalisation local trackingcat = 'หมวดหมู่:หน้าที่ใช้ภาพรวมกีฬาที่มีพารามิเตอร์ที่ไม่รู้จัก' local labels = {  competition = 'การแข่งขัน',  firstmatch = 'นัดแรก',  lastmatch = 'นัดสุดท้าย',  startinground = 'เริ่มต้นที่รอบ',  finalposition = 'ตำแหน่งสุดท้าย',  record = 'บันทึก',  total = 'ทั้งหมด',  source = 'แหล่งข้อมูล: ',  lastupdated = 'ปรับปรุงข้อมูลครั้งสุดท้าย: ',  sourcedefault = '[[#การแข่งขัน|การแข่งขัน]]',  unknownparameter = 'ไม่ทราบพารามิเตอร์: ',  pld = '<abbr title="ลงแข่ง">แข่ง</abbr>',  w = '<abbr title="เกมที่ชนะ">ชนะ</abbr>',  d = '<abbr title="เกมที่เสมอ">เสมอ</abbr>',  l = '<abbr title="เกมที่แพ้">แพ้</abbr>',  pf = '<abbr title="คะแนนที่ได้">คะแนนได้</abbr>',  pa = '<abbr title="คะแนนที่เสีย">คะแนนเสีย</abbr>',  pd = '<abbr title="ผลต่างคะแนน">คะแนนต่าง</abbr>',  gf = '<abbr title="ประตูที่ได้">ได้</abbr>',  ga = '<abbr title="ประตูที่เสีย">เสีย</abbr>',  gd = '<abbr title="ผลต่างประตู">ต่าง</abbr>',  wp = '<abbr title="เปอร์เซ็นต์ในการชนะ">% ชนะ</abbr>',  winner = 'ชนะเลิศ',  runnerup = 'รองชนะเลิศ',  runnersup = 'รองชนะเลิศ' }  -- Main function function p.main(frame)  local getArgs = require('Module:Arguments').getArgs  local args = getArgs(frame)   -- Get the row numbers and check for invalid input  local rownumbers = {}  local unknown = {}  local showdates, showrounds, showpos = false, false, false  local maxrow = -1  local rowlimit = 99   local function addrownumber(num, flag)  if num <= rowlimit then  table.insert(rownumbers, num)  maxrow = (num > maxrow) and num or maxrow  return true  end  return flag  end   for k, v in pairs(args) do  k = tostring(k)  local n = tonumber(k:match('^[a-z]+(%d+)$') or '-1')  if k == 'u' or k == 'c' or k == 's' or k == 'pts' then  -- These are valid  elseif k:match('^[cwdlfa]%d+$') then  local added = addrownumber(n, false)  elseif k:match('[dfl]m%d%d*$') then  showdates = addrownumber(n, showdates)  elseif k:match('sr%d%d*$') then  showrounds = addrownumber(n, showrounds)  elseif k:match('fp%d%d*$') then  showpos = addrownumber(n, showpos)  else  table.insert(unknown, k)  end  end  -- Sort the row numbers  table.sort(rownumbers)   -- Remove duplicates  for i=#rownumbers,2,-1 do  if rownumbers[i-1] == rownumbers[i] then  table.remove(rownumbers,i)  end  end   local root = {}  if maxrow > -1 then  local WDL = require('Module:WDL').main  -- Make the table  table.insert(root,'{| class="wikitable" style="text-align:center"')  -- Add the headers  table.insert(root,'|-')  table.insert(root,'! rowspan=2 | ' .. labels['competition'])  local totspan = 1  if showdates then  table.insert(root,'! rowspan=2 | ' .. labels['firstmatch'])  table.insert(root,'! rowspan=2 | ' .. labels['lastmatch'])  totspan = totspan + 2  end  if showrounds then  table.insert(root,'! rowspan=2 | ' .. labels['startinground'])  totspan = totspan + 1  end  if showpos then  table.insert(root,'! rowspan=2 | ' .. labels['finalposition'])  totspan = totspan + 1  end  table.insert(root,'! colspan=8 | ' .. labels['record'])  table.insert(root,'|-')  table.insert(root,'! ' .. labels['pld'])  table.insert(root,'! ' .. labels['w'])  table.insert(root,'! ' .. labels['d'])  table.insert(root,'! ' .. labels['l'])  local pg = args.pts and args.pts == 'y' and 'p' or 'g'  table.insert(root,'! ' .. labels[pg .. 'f'])  table.insert(root,'! ' .. labels[pg .. 'a'])  table.insert(root,'! ' .. labels[pg .. 'd'])  table.insert(root,'! ' .. labels['wp'])  local evenodd = 'odd'   -- Now add the rows  local wtot, dtot, ltot, ftot, atot = 0, 0, 0, 0, 0  for i=1,#rownumbers do  local r = rownumbers[i]  if evenodd == 'even' then  table.insert(root,'|- style="background-color:#EEE"')  evenodd = 'odd'  else  table.insert(root,'|-')  evenodd = 'even'  end  table.insert(root,'| ' .. (args['c' .. r] or ''))  if showdates then  if args['dm' .. r] then  table.insert(root,'| colspan=2 | ' .. args['dm' .. r])  else  table.insert(root,'| ' .. (args['fm' .. r] or ''))  table.insert(root,'| ' .. (args['lm' .. r] or ''))  end  end  if showrounds then  table.insert(root,'| ' .. (args['sr' .. r] or ''))  end  if showpos then  local fp = args['fp' .. r] or ''  local bg =  (fp:match('^' .. labels['winner']) and 'gold') or  (fp:match('^' .. labels['runnersup']) and 'silver') or  (fp:match('^' .. labels['runnerup']) and 'silver') or nil  if bg then  table.insert(root,'| style="background-color:' .. bg .. '" | ' .. fp)  else  table.insert(root,'| ' .. fp)  end  end  wtot = wtot + (tonumber(args['w' .. r]) or 0)  dtot = dtot + (tonumber(args['d' .. r]) or 0)  ltot = ltot + (tonumber(args['l' .. r]) or 0)  ftot = ftot + (tonumber(args['f' .. r]) or 0)  atot = atot + (tonumber(args['a' .. r]) or 0)  table.insert(root, WDL(frame,  {nil, args['w' .. r], args['d' .. r], args['l' .. r],  ['for'] = args['f' .. r], ['against'] = args['a' .. r], ['diff'] = 'yes'})  )  end  table.insert(root,'|-')  if totspan > 1 then  table.insert(root,'! colspan=' .. totspan .. ' | ' .. labels['total'])  else  table.insert(root,'! ' .. labels['total'])  end  table.insert(root, WDL(frame,  {wtot+dtot+ltot, wtot, dtot, ltot, ['total'] = 'y',  ['for'] = ftot, ['against'] = atot, ['diff'] = 'yes'})  )  table.insert(root, '|} \n<div style="font-size: 90%; margin-bottom: 0.5em;">\n')  if args.u then  table.insert(root, labels['lastupdated'] .. args.u .. '<br>')  end  table.insert(root, labels['source'] .. (args.s or labels['sourcedefault']) .. '\n</div>')  end   if #unknown > 0 then   local unknown_params = require('Module:If preview')._warning({  labels['unknownparameter'] ..  '<code>' ..  table.concat(unknown, '</code>, <code>') ..  '</code>.'  }) .. '[[' .. trackingcat .. '|' .. unknown[1] .. ' ]]'   table.insert(root, unknown_params)  end   return table.concat(root, '\n') end  return p 

มอด, overview, อการใช, งานมอด, สร, าง, ณอาจจะต, องการสร, างค, อการใช, งานของมอด, ลน, เข, ยนสามารถทำการทดลองได, กระบะทราย, สร, าง, ดลอก, และช, ดทดสอบ, สร, าง, ของมอด, ลน, โปรดเพ, มหมวดหม, ไปท, หน, าย, อย, หน, าย, อยของมอด, ลน, this, implements, overview, local,. khumuxkarichnganmxdul srang khunxaccatxngkarsrangkhumuxkarichngankhxngmxdulniphuekhiynsamarththakarthdlxngidthikrabathray srang khdlxk aelachudthdsxb srang khxngmxdulnioprdephimhmwdhmuipthihnayxy doc hnayxykhxngmxdulni This implements fb overview local p Internationalisation local trackingcat hmwdhmu hnathiichphaphrwmkilathimipharamietxrthiimruck local labels competition karaekhngkhn firstmatch ndaerk lastmatch ndsudthay startinground erimtnthirxb finalposition taaehnngsudthay record bnthuk total thnghmd source aehlngkhxmul lastupdated prbprungkhxmulkhrngsudthay sourcedefault karaekhngkhn karaekhngkhn unknownparameter imthrabpharamietxr pld lt abbr title lngaekhng gt aekhng lt abbr gt w lt abbr title ekmthichna gt chna lt abbr gt d lt abbr title ekmthiesmx gt esmx lt abbr gt l lt abbr title ekmthiaeph gt aeph lt abbr gt pf lt abbr title khaaennthiid gt khaaennid lt abbr gt pa lt abbr title khaaennthiesiy gt khaaennesiy lt abbr gt pd lt abbr title phltangkhaaenn gt khaaenntang lt abbr gt gf lt abbr title pratuthiid gt id lt abbr gt ga lt abbr title pratuthiesiy gt esiy lt abbr gt gd lt abbr title phltangpratu gt tang lt abbr gt wp lt abbr title epxresntinkarchna gt chna lt abbr gt winner chnaelis runnerup rxngchnaelis runnersup rxngchnaelis Main function function p main frame local getArgs require Module Arguments getArgs local args getArgs frame Get the row numbers and check for invalid input local rownumbers local unknown local showdates showrounds showpos false false false local maxrow 1 local rowlimit 99 local function addrownumber num flag if num lt rowlimit then table insert rownumbers num maxrow num gt maxrow and num or maxrow return true end return flag end for k v in pairs args do k tostring k local n tonumber k match a z d or 1 if k u or k c or k s or k pts then These are valid elseif k match cwdlfa d then local added addrownumber n false elseif k match dfl m d d then showdates addrownumber n showdates elseif k match sr d d then showrounds addrownumber n showrounds elseif k match fp d d then showpos addrownumber n showpos else table insert unknown k end end Sort the row numbers table sort rownumbers Remove duplicates for i rownumbers 2 1 do if rownumbers i 1 rownumbers i then table remove rownumbers i end end local root if maxrow gt 1 then local WDL require Module WDL main Make the table table insert root class wikitable style text align center Add the headers table insert root table insert root rowspan 2 labels competition local totspan 1 if showdates then table insert root rowspan 2 labels firstmatch table insert root rowspan 2 labels lastmatch totspan totspan 2 end if showrounds then table insert root rowspan 2 labels startinground totspan totspan 1 end if showpos then table insert root rowspan 2 labels finalposition totspan totspan 1 end table insert root colspan 8 labels record table insert root table insert root labels pld table insert root labels w table insert root labels d table insert root labels l local pg args pts and args pts y and p or g table insert root labels pg f table insert root labels pg a table insert root labels pg d table insert root labels wp local evenodd odd Now add the rows local wtot dtot ltot ftot atot 0 0 0 0 0 for i 1 rownumbers do local r rownumbers i if evenodd even then table insert root style background color EEE evenodd odd else table insert root evenodd even end table insert root args c r or if showdates then if args dm r then table insert root colspan 2 args dm r else table insert root args fm r or table insert root args lm r or end end if showrounds then table insert root args sr r or end if showpos then local fp args fp r or local bg fp match labels winner and gold or fp match labels runnersup and silver or fp match labels runnerup and silver or nil if bg then table insert root style background color bg fp else table insert root fp end end wtot wtot tonumber args w r or 0 dtot dtot tonumber args d r or 0 ltot ltot tonumber args l r or 0 ftot ftot tonumber args f r or 0 atot atot tonumber args a r or 0 table insert root WDL frame nil args w r args d r args l r for args f r against args a r diff yes end table insert root if totspan gt 1 then table insert root colspan totspan labels total else table insert root labels total end table insert root WDL frame wtot dtot ltot wtot dtot ltot total y for ftot against atot diff yes table insert root n lt div style font size 90 margin bottom 0 5em gt n if args u then table insert root labels lastupdated args u lt br gt end table insert root labels source args s or labels sourcedefault n lt div gt end if unknown gt 0 then local unknown params require Module If preview warning labels unknownparameter lt code gt table concat unknown lt code gt lt code gt lt code gt trackingcat unknown 1 table insert root unknown params end return table concat root n end return p ekhathungcak https th wikipedia org w index php title mxdul Fb overview amp oldid 9643450, wikipedia, วิกิ หนังสือ, หนังสือ, ห้องสมุด,

บทความ

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