fbpx
วิกิพีเดีย

มอดูล:Jcttop/core

คู่มือการใช้งานมอดูล[สร้าง]
local p = {}  local format = string.format -- Local version of string formatting function  local function hatnote(args)  local insert = table.insert  local text = {args.region_note}  local tense   local hatnoteArg = args.hatnote  if hatnoteArg == 'off' then  insert(text, '')  elseif hatnoteArg then  insert(text, hatnoteArg .. " ")  else  local indep_city = args.indep_city  local sub1 = args.sub1  local sub2 = args.sub2  if indep_city or sub1 or sub2 then  local region = args.region  tense = args.former == 'yes'  local verb = tense and 'was' or 'is'  insert(text, format("The entire %s %s in ", args.type or 'route', verb))  if indep_city then  insert(text, format("[[%s, %s|%s]]", indep_city, region, indep_city))  else  local sub1name = args.sub1name  if sub2 then  insert(text, "[[" .. sub2)  local area = args.area  if area then  insert(text, format(" (%s)", area))  end  if args.sub1dab == 'yes' then  insert(text, format(", %s %s", sub1, sub1name))  end  insert(text, format(", %s|%s]]", region, sub2))  end  if sub1 then  if sub2 then  insert(text, ', ')  end  insert(text, format("[[%s %s, %s|%s %s]]", sub1, sub1name, region, sub1, sub1name))  end  end  insert(text, '. ')  insert(text, args.sub1_ref)  insert(text, args.sub2_ref)  end  end   if args.unnum == 'yes' then  insert(text, format("All exits %s unnumbered.", tense and 'were' or 'are'))  end   return mw.text.trim(table.concat(text)) end  local function header(args)  local row = mw.html.create('tr')  local region_col = args.region_col  if region_col then  row:tag('th'):attr('scope', 'col'):wikitext(mw.language.getContentLanguage():ucfirst(region_col))  end   local indep_city = args.indep_city  if not(args.nosub1 == 'yes' or args.sub1 or indep_city) then  local tag = row:tag('th'):attr('scope', 'col')  local sub1disp = args.sub1disp  if sub1disp then  tag:wikitext(sub1disp)  else  tag:wikitext(args.sub1name):wikitext(args.sub1_ref)  end  end   if not(args.sub2 or indep_city) then  row:tag('th'):attr('scope', 'col')  :wikitext(args.location_def or 'ตำแหน่งที่ตั้ง'):wikitext(args.sub2_ref)  end   local altunit = args.altunit  if altunit then  row:tag('th'):attr('scope', 'col'):wikitext(altunit):wikitext(args.altunit_ref)  else  local unit = args.length or args.unit  if unit ~= 'off' then  row:tag('th'):attr('scope', 'col'):wikitext(unit):wikitext(args.length_ref):done():tag('th'):attr('scope', 'col'):wikitext(args.unit2)  end  end   local exit = args[1]  if exit == 'old' then  row:tag('th'):attr('scope', 'col'):wikitext(args.old_def or 'ทางออกเดิม'):wikitext(args.old_ref)  row:tag('th'):attr('scope', 'col'):wikitext(args.exit_def or 'ทางออกใหม่'):wikitext(args.exit_ref)  elseif exit == 'exit' then  row:tag('th'):attr('scope', 'col'):wikitext(args.exit_def or 'ทางออก'):wikitext(args.exit_ref)  end   if args[2] == 'name' then  row:tag('th'):attr('scope', 'col'):wikitext(args.name_def or 'ชื่อ'):wikitext(args.name_ref)  end   row:tag('th'):attr('scope', 'col'):wikitext(args.dest_def or 'จุดหมายปลายทาง'):wikitext(args.dest_ref)   row:tag('th'):attr('scope', 'col'):wikitext(args.notes_def or 'หมายเหตุ'):wikitext(args.notes_ref)   return '\n{| class="plainrowheaders wikitable hlist"\n' .. tostring(row) end  function p._jcttop(args)  -- This function calls two other functions to generate a hatnote and header row.  -- This function is accessible from other Lua modules.  return hatnote(args) .. header(args) end  function p.jcttop(frame)  -- Entry function for {{jcttop/core}}  return p._jcttop(require('Module:Arguments').getArgs(frame)) -- Simply call another function with those arguments to actually create the header. end  return p 

มอด, jcttop, core, อการใช, งานมอด, สร, าง, ณอาจจะต, องการสร, างค, อการใช, งานของมอด, ลน, เข, ยนสามารถทำการทดลองได, กระบะทราย, สร, าง, ดลอก, และช, ดทดสอบ, สร, าง, ของมอด, ลน, โปรดเพ, มหมวดหม, ไปท, หน, าย, อย, หน, าย, อยของมอด, ลน, local, local, format, string, . khumuxkarichnganmxdul srang khunxaccatxngkarsrangkhumuxkarichngankhxngmxdulniphuekhiynsamarththakarthdlxngidthikrabathray srang khdlxk aelachudthdsxb srang khxngmxdulnioprdephimhmwdhmuipthihnayxy doc hnayxykhxngmxdulnilocal p local format string format Local version of string formatting function local function hatnote args local insert table insert local text args region note local tense local hatnoteArg args hatnote if hatnoteArg off then insert text elseif hatnoteArg then insert text hatnoteArg amp nbsp else local indep city args indep city local sub1 args sub1 local sub2 args sub2 if indep city or sub1 or sub2 then local region args region tense args former yes local verb tense and was or is insert text format The entire s s in args type or route verb if indep city then insert text format s s s indep city region indep city else local sub1name args sub1name if sub2 then insert text sub2 local area args area if area then insert text format s area end if args sub1dab yes then insert text format s s sub1 sub1name end insert text format s s region sub2 end if sub1 then if sub2 then insert text end insert text format s s s s s sub1 sub1name region sub1 sub1name end end insert text insert text args sub1 ref insert text args sub2 ref end end if args unnum yes then insert text format All exits s unnumbered tense and were or are end return mw text trim table concat text end local function header args local row mw html create tr local region col args region col if region col then row tag th attr scope col wikitext mw language getContentLanguage ucfirst region col end local indep city args indep city if not args nosub1 yes or args sub1 or indep city then local tag row tag th attr scope col local sub1disp args sub1disp if sub1disp then tag wikitext sub1disp else tag wikitext args sub1name wikitext args sub1 ref end end if not args sub2 or indep city then row tag th attr scope col wikitext args location def or taaehnngthitng wikitext args sub2 ref end local altunit args altunit if altunit then row tag th attr scope col wikitext altunit wikitext args altunit ref else local unit args length or args unit if unit off then row tag th attr scope col wikitext unit wikitext args length ref done tag th attr scope col wikitext args unit2 end end local exit args 1 if exit old then row tag th attr scope col wikitext args old def or thangxxkedim wikitext args old ref row tag th attr scope col wikitext args exit def or thangxxkihm wikitext args exit ref elseif exit exit then row tag th attr scope col wikitext args exit def or thangxxk wikitext args exit ref end if args 2 name then row tag th attr scope col wikitext args name def or chux wikitext args name ref end row tag th attr scope col wikitext args dest def or cudhmayplaythang wikitext args dest ref row tag th attr scope col wikitext args notes def or hmayehtu wikitext args notes ref return n class plainrowheaders wikitable hlist n tostring row end function p jcttop args This function calls two other functions to generate a hatnote and header row This function is accessible from other Lua modules return hatnote args header args end function p jcttop frame Entry function for jcttop core return p jcttop require Module Arguments getArgs frame Simply call another function with those arguments to actually create the header end return p ekhathungcak https th wikipedia org w index php title mxdul Jcttop core amp oldid 6424622, wikipedia, วิกิ หนังสือ, หนังสือ, ห้องสมุด,

บทความ

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