Modulo:Citazione: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
riconoscimento archivi inseriti come url, vedi disc.
compatibilità con modulo:Collegamenti esterni, vedi discussione
Riga 453:
end
return table.concat({ "[", URL, " ", safe_for_url( label ), "]", error_str });
end
 
--[[ ===============================================================================
Formatta e appende altri collegamenti ottenuti dal modulo Collegamenti esterni
===============================================================================]]
local function append_links(value, links)
for _, t in ipairs(links) do
t[2] = is_latin( t[2] ) and wrap( 'italic-title', t[2] ) or t[2]
value = value .. ' / ' .. external_link( t[1], t[2] )
end
return value
end
 
Riga 1 134 ⟶ 1 145:
------------------------------------------------------------------------------
local auto_Periodical = false
if in_array(config.CitationClass, == "{'web"', 'collegamenti'}) and not is_set(Periodical) and not is_set(PublisherName) and is_set(URL) then
Periodical = mw.ustring.match(URL, "//([^/#%?]*)") or ''
-- tolgo anche eventuale www.
Riga 1 257 ⟶ 1 268:
not is_set(ConferenceURL) then
-- Test if cite web is called without giving a URL
if in_array( config.CitationClass, == "{'web"', 'collegamenti'}) then
table.insert( z.message_tail, { set_error( 'cite_web_url', {}, true ) } );
end
Riga 1 348 ⟶ 1 359:
end
elseif is_set(URL) then
Chapter = external_link( URL, Chapter ) .. TransError .. Format;
if config.CitationClass == "collegamenti" and args.altrilink then
Chapter = append_links(Chapter, args.altrilink)
end
Chapter = Chapter .. Format;
URL = "";
Format = "";
Riga 1 377 ⟶ 1 392:
Title = "[[" .. TitleLink .. "|" .. Title .. "]]"
elseif is_set(URL) then
Title = external_link( URL, Title ) .. TransError .. Format
if config.CitationClass == "collegamenti" and args.altrilink then
Title = append_links(Title, args.altrilink)
end
Title = Title .. Format
URL = "";
Format = "";
Riga 1 740 ⟶ 1 759:
end
 
-- Funzione per generare direttamente una citazione webchiamata da unmodulo altroCollegamenti moduloesterni
function z.collegamenti(args)
return citation0( {CitationClass = 'collegamenti'}, args )
end
 
-- Funzione per generare direttamente una citazione web da un altro modulo (obsoleta, da rimuovere)
function z.citaweb(args)
return citation0( {CitationClass = 'web'}, args )