Module:Credits: Difference between revisions
From Videogame Morgue File
MorgueFile (talk | contribs) mNo edit summary |
MorgueFile (talk | contribs) mNo edit summary |
||
Line 19: | Line 19: | ||
local split = mw.text.split( sValue, "#") | local split = mw.text.split( sValue, "#") | ||
for | for k, v in pairs(split) do | ||
sOutputText = sOutputText .. | sOutputText = sOutputText .. v .. '<br />' | ||
end | end | ||
Revision as of 12:00, 14 Mayıs 2021
Documentation for this module may be created at Module:Credits/doc
local p = {}; p.hello = function( frame ) local str = "Hello World!" return str end function p.credits( frame ) local tArgs = frame:getParent() if not( tArgs.args[1] ) then tArgs = frame end local sOutputText = '<div class="container-fluid"><dl class="row">' for iKey,sValue in pairs(tArgs.args) do sOutputText = sOutputText .. '<dt class="col-sm-3">' .. iKey .. '</dt><dd class="col-sm-7">' local split = mw.text.split( sValue, "#") for k, v in pairs(split) do sOutputText = sOutputText .. v .. '<br />' end sOutputText = sOutputText .. '</dd>' end sOutputText = sOutputText .. "</dl></div>" return sOutputText end return p