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



Polcompball Wiki

Module:TableUtils: Difference between revisions

imported>TheGhostOfInky
No edit summary
imported>TheGhostOfInky
No edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:


function genCel(url,icon)
function genCel(url,icon)
     local cellStr = "|-\n|"
     local cellStr = "|- align=\"left\"\n|"
     if icon == nil then
     if icon == nil then
         cellStr = cellStr .."[[File:"..url.."-template.png]] "
         cellStr = cellStr .."[[File:"..url.."-template.png]] "
Line 10: Line 10:
     cellStr = cellStr..url.." template\n"
     cellStr = cellStr..url.." template\n"


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

Latest revision as of 23:11, 16 April 2023

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

local utils = {}

function genCel(url,icon)
    local cellStr = "|- align=\"left\"\n|"
    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",".ora"}
    for i=1,#ext 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

Recent changes

  • -Regnaissance- • 16 minutes ago
  • SocialistWorldRepublic • Yesterday at 22:30
  • SocialistWorldRepublic • Yesterday at 21:36
  • NewMaritimeVistula • Yesterday at 17:50