fbpx
วิกิพีเดีย

มอดูล:Album ratings

คู่มือการใช้งานมอดูล[สร้าง]
-- This module implements [[Template:Album ratings]].  local mTableTools = require('Module:TableTools') local yesno = require('Module:Yesno') local p = {}  local function makeCell(html, s)  html  :tag('td')  :css('text-align', 'center')  :css('vertical-align', 'middle')  :wikitext(s) end  local function makeRow(review, score)  local row = mw.html.create('tr')  makeCell(row, review)  makeCell(row, score)  return row end  local function makeHeaderRow(header, background, scope)  local row = mw.html.create('tr')  row  :tag('th')  :attr('scope', scope ~= false and 'col' or nil)  :attr('colspan', 2)  :css('text-align', 'center')  :css('background', background ~= false and '#d1dbdf' or nil)  :css('font-size', '120%')  :wikitext(header)  return row end  local function makeRatingHeaderRow()  local row = mw.html.create('tr')  row  :tag('th')  :attr('scope', 'col')  :wikitext('ที่มา')  :done()  :tag('th')  :attr('scope', 'col')  :wikitext('ค่าประเมิน')  return row end  function p._main(args)  local reviewNums = mTableTools.affixNums(args, 'rev')  local root = mw.html.create()  local tableRoot = root:tag('table')  local duplicatescores = 0   -- Table base  tableRoot  :addClass('wikitable infobox')  :css('float', args.align or 'right')  :css('width', args.width or '24.2em')  :css('font-size', '80%')  :css('text-align', 'center')  :css('margin', '0.5em 0 0.5em 1em')  :css('padding', 0)  :css('border-spacing', 0)  :tag('tr')  :tag('th')  :attr('scope', 'col')  :attr('colspan', 2)  :css('font-size', '120%')  :wikitext(args.title or 'ค่าประเมินโดยนักวิจารณ์')   -- Subtitle  if args.subtitle then  tableRoot:node(makeHeaderRow(args.subtitle, false, false))  end   -- Metacritic  if args.MC then  tableRoot:node(makeHeaderRow('ผลคะแนน', true, true))  tableRoot:node(makeRatingHeaderRow())  tableRoot:node(makeRow('[[เมทาคริติก]]', args.MC))  end   -- Review rows  tableRoot:node(makeHeaderRow('คะแนนคำวิจารณ์', true, true))  tableRoot:node(makeRatingHeaderRow())  for i, num in ipairs(reviewNums) do  tableRoot:node(makeRow(  args['rev' .. num],  args['rev' .. num .. 'Score'] or  args['Rev' .. num .. 'Score'] or  args['rev' .. num .. 'score'] or  args['Rev' .. num .. 'score']  ))  local scorecount = 0  scorecount = scorecount + (args['rev' .. num .. 'Score'] and 1 or 0)  scorecount = scorecount + (args['Rev' .. num .. 'Score'] and 1 or 0)  scorecount = scorecount + (args['rev' .. num .. 'score'] and 1 or 0)  scorecount = scorecount + (args['Rev' .. num .. 'score'] and 1 or 0)  if scorecount > 1 then duplicatescores = duplicatescores + 1 end  end   -- Tracking category  if mw.title.getCurrentTitle().namespace == 0 and yesno(args.noprose) then  root:wikitext('[[Category:Articles with album ratings that need to be turned into prose]]')  end  if duplicatescores > 0 then  root:wikitext('[[Category:Pages using album ratings with duplicate score parameters]]')  end   return tostring(root) end  function p.main(frame)  local args = require('Module:Arguments').getArgs(frame, {  wrappers = 'แม่แบบ:Album ratings'  })  return p._main(args) end  return p 

มอด, album, ratings, อการใช, งานมอด, สร, าง, ณอาจจะต, องการสร, างค, อการใช, งานของมอด, ลน, เข, ยนสามารถทำการทดลองได, กระบะทราย, สร, าง, ดลอก, และช, ดทดสอบ, สร, าง, ของมอด, ลน, โปรดเพ, มหมวดหม, ไปท, หน, าย, อย, หน, าย, อยของมอด, ลน, this, module, implements, te. khumuxkarichnganmxdul srang khunxaccatxngkarsrangkhumuxkarichngankhxngmxdulniphuekhiynsamarththakarthdlxngidthikrabathray srang khdlxk aelachudthdsxb srang khxngmxdulnioprdephimhmwdhmuipthihnayxy doc hnayxykhxngmxdulni This module implements Template Album ratings local mTableTools require Module TableTools local yesno require Module Yesno local p local function makeCell html s html tag td css text align center css vertical align middle wikitext s end local function makeRow review score local row mw html create tr makeCell row review makeCell row score return row end local function makeHeaderRow header background scope local row mw html create tr row tag th attr scope scope false and col or nil attr colspan 2 css text align center css background background false and d1dbdf or nil css font size 120 wikitext header return row end local function makeRatingHeaderRow local row mw html create tr row tag th attr scope col wikitext thima done tag th attr scope col wikitext khapraemin return row end function p main args local reviewNums mTableTools affixNums args rev local root mw html create local tableRoot root tag table local duplicatescores 0 Table base tableRoot addClass wikitable infobox css float args align or right css width args width or 24 2em css font size 80 css text align center css margin 0 5em 0 0 5em 1em css padding 0 css border spacing 0 tag tr tag th attr scope col attr colspan 2 css font size 120 wikitext args title or khapraeminodynkwicarn Subtitle if args subtitle then tableRoot node makeHeaderRow args subtitle false false end Metacritic if args MC then tableRoot node makeHeaderRow phlkhaaenn true true tableRoot node makeRatingHeaderRow tableRoot node makeRow emthakhritik args MC end Review rows tableRoot node makeHeaderRow khaaennkhawicarn true true tableRoot node makeRatingHeaderRow for i num in ipairs reviewNums do tableRoot node makeRow args rev num args rev num Score or args Rev num Score or args rev num score or args Rev num score local scorecount 0 scorecount scorecount args rev num Score and 1 or 0 scorecount scorecount args Rev num Score and 1 or 0 scorecount scorecount args rev num score and 1 or 0 scorecount scorecount args Rev num score and 1 or 0 if scorecount gt 1 then duplicatescores duplicatescores 1 end end Tracking category if mw title getCurrentTitle namespace 0 and yesno args noprose then root wikitext Category Articles with album ratings that need to be turned into prose end if duplicatescores gt 0 then root wikitext Category Pages using album ratings with duplicate score parameters end return tostring root end function p main frame local args require Module Arguments getArgs frame wrappers aemaebb Album ratings return p main args end return p ekhathungcak https th wikipedia org w index php title mxdul Album ratings amp oldid 6433950, wikipedia, วิกิ หนังสือ, หนังสือ, ห้องสมุด,

บทความ

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