×
Create a new article
Write your page title here:
We currently have 2,479 articles on Polcompball Wiki. Type your article name above or click on one of the titles below and start writing!



Polcompball Wiki
Revision as of 20:52, 5 January 2023 by imported>TheGhostOfInky (Created page with "local utils = {} function genCel(url,icon) local cellStr = "|-\n{{!}} align=\"left\" {{!}} " if icon == nil then cellStr = cellStr .."File:"..url.."-template.png " else cellStr = cellStr .. "File:"..icon.." " end cellStr = cellStr..url.." template\n" local ext = {".png",".psd",".pdn",".xcf"} for i=1,4 do local link = "{{!}} [https://archive.org/download/polcompball/{"..url..ext[i].." Link]\n" cellStr =...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:TableUtils/doc

local utils = {}

function genCel(url,icon)
    local cellStr = "|-\n{{!}} align=\"left\" {{!}} "
    if icon == nil then
        cellStr = cellStr .."[[File:"..url.."-template.png]] "
    else
        cellStr = cellStr .. "[[File:"..icon.."]] "
    end
    cellStr = cellStr..url.." template\n"

    local ext = {".png",".psd",".pdn",".xcf"}
    for i=1,4 do
        local link = "{{!}} [https://archive.org/download/polcompball/{"..url..ext[i].." Link]\n"
        cellStr = cellStr ..link
    end
    return cellStr
end

function utils.createTable(frame)
    local args = frame:getParent().args
    --local args = frame
    local i = 1
    local renTable = ""
    while args["url"..i] ~= nil do
        renTable = renTable .. genCel(args["url"..i],args["icon"..i])
        i = i +1
    end
    return renTable
end


return utils