Module:TextC
From Exiled Kingdoms Wiki
--[[ Replacement for textc template ]] p = {}
Arg1 = mw.getCurrentFrame().args[1] Arg2 = mw.getCurrentFrame().args[2] Arg3 = mw.getCurrentFrame().args[3]
function p.SList()
if (Arg1 == or Arg1 == nil) then return end if (Arg2 == or Arg2 == nil) then Arg2 = ';' end itemlist = mw.text.split(Arg1,Arg2,true) mainlist = mw.html.create( 'ul' ) for k, item in pairs(itemlist) do ctag = mainlist:tag('li') ctag:wikitext(item) end mainlist = tostring(mainlist:allDone()) return mainlist
end
function p.SListCol()
if (Arg1 == or Arg1 == nil) then return 1 end if (Arg2 == or Arg2 == nil) then Arg2 = ';' end itemlist = mw.text.split(Arg1,Arg2,true) if (#itemlist >= 3) then return 2 else return 1 end
end
function p.DelimRepl()
if (Arg1 == or Arg1 == nil) then return end if (Arg2 == or Arg2 == nil) then Arg2 = ';' end if (Arg3 == or Arg3 == nil) then Arg3 = ' ♦' end delistr, x = string.gsub(Arg1, Arg2, Arg3) return delistr
end
function p.Transp()
if (Arg1 == or Arg1 == nil) then return end if (Arg2 == or Arg2 == nil) then Arg2 = ';' end
end
return p
--[==[
=
- [[{{{1}}}]]{{:{{{1}}}|npcAct}}
}}}}
]==]