Modulo:Webarchive/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
refactoring in corso d'opera |
fix vari |
||
Riga 10:
local p = {}
local track = {} -- Associative array to hold tracking categories
local maxurls = 10 -- Max number of URLs allowed.
Line 372 ⟶ 371:
]]
local function parseExtraArgs(args, maxurls
local i, indx, argurl, argurl2, argdate, argtitle
local ulx = {}
indx =
for i = 2, maxurls do
argurl = "url" .. i
Line 390 ⟶ 389:
end
end
return ulx
end
Riga 438:
]]
local function createRendering(url_main, ulx)
local sand, displayheader, displayfield
Riga 445:
local period2 = "."
--local url_main = ulx[1]
local indexstr = "archiviato"
if url_main.date == "index" then
Riga 468:
return nil
end
if #ulx >
sand = sand .. period2 .. " Archivi aggiuntivi: "
local archives_output = {}
for indx,urlx
archives_output[#archives_output+1] = mw.ustring.format("[%s %s]",
end
sand = sand ..
end
return sand
Riga 487:
local sand = displayheader
local archives_output = {}
for indx
displayfield =
if url_main.format == "addlarchives" then
if not displayfield then displayfield =
else
if not displayfield then displayfield = "Pagina " .. indx+1 end
end
archive_ouptut[#archives_output+1] = mw.ustring.format("[%s %s]",
end
sand = sand ..
return sand
end
Riga 598:
-- Title argument
url_main.title = args.title or args.title1 or args.titolo or args.titolo1
▲ parseExtraArgs(args, maxurls, ulx)
--if true then return mw.text.jsonEncode(ulx, mw.text.JSON_PRETTY) end
local rend = createRendering(url_main, ulx)
if not rend then
rend = '<span style="font-size:100%" class="error citation-comment">Errori in [[:Template:' .. tname .. ']]: Problema sconosciuto. Si prega di segnalarlo nella [[Discussioni_template:' .. tname .. '|pagina di discussione]] del template.</span>'
|