Modulo:Citazione: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
compatibilità con modulo:Collegamenti esterni, vedi discussione
m per prossimi miglioramenti al Collegamenti_esterni
Riga 456:
 
--[[ ===============================================================================
FormattaAggiunta ecollegamenti appendemultipli, altriper collegamentiora usati ottenutisolo dal modulo Collegamenti esterni
===============================================================================]]
local function append_links(value, links)
forif _, t in ipairstype(links) do== 'table' then
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
end
return value
Riga 1 145 ⟶ 1 147:
------------------------------------------------------------------------------
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 267 ⟶ 1 269:
not is_set(ArchiveURL) and
not is_set(ConferenceURL) then
-- TestControlla ifse citeCita web isviene calledchiamato without giving asenza URL
if in_array(config.CitationClass, {'web', 'collegamenti'}) then
table.insert( z.message_tail, { set_error( 'cite_web_url', {}, true ) } );
end
Riga 1 360 ⟶ 1 362:
elseif is_set(URL) then
Chapter = external_link( URL, Chapter ) .. TransError;
if config.CitationClassChapter == "collegamenti" andappend_links(Chapter, args.altrilink then)
Chapter = append_links(Chapter, args.altrilink)
end
Chapter = Chapter .. Format;
URL = "";
Riga 1 393:
elseif is_set(URL) then
Title = external_link( URL, Title ) .. TransError
if config.CitationClassTitle == "collegamenti" andappend_links(Title, args.altrilink then)
Title = append_links(Title, args.altrilink)
end
Title = Title .. Format
URL = "";
Riga 1 759 ⟶ 1 757:
end
 
-- Temporanea per retrocompatibilità
-- Funzione per chiamata da modulo Collegamenti esterni
function z.collegamenti(args)
return citation0( {CitationClass = 'collegamentiweb'}, args )
end
 
-- Funzione per generare direttamente una citazione web da un altro modulo (obsoleta, da rimuovere)
function z.citawebcita_da_modulo(classe, args)
return citation0( {CitationClass = 'web'classe}, args )
end