Utente anonimo
Modulo:Citazione: differenze tra le versioni
mostra i curatori anche se autore-capitolo è compilato, vedi discussioni 1 e 2
m (una versione importata) |
|||
Riga 26: | Riga 26: | ||
--[[ =============================================================================== | --[[ =============================================================================== | ||
Caricamento delle tabelle di configurazione del modulo. | |||
===============================================================================]] | ===============================================================================]] | ||
local cfg = mw.loadData('Module:Citazione/Configurazione') | local cfg = mw.loadData('Module:Citazione/Configurazione') | ||
Riga 1 182: | Riga 1 182: | ||
------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||
local auto_Periodical = false | local auto_Periodical = false | ||
if in_array(config.CitationClass, {'web'}) and not is_set(Periodical | if in_array(config.CitationClass, {'web'}) and not is_set(Periodical) and is_set(URL) then | ||
Periodical = mw.ustring.match(URL, "//([^/#%?]*)") or '' | Periodical = mw.ustring.match(URL, "//([^/#%?]*)") or '' | ||
-- tolgo anche eventuale www. | -- tolgo anche eventuale www. | ||
Riga 1 191: | Riga 1 191: | ||
if Periodical and mw.ustring.lower(Title or '') == mw.ustring.lower(Periodical) then | if Periodical and mw.ustring.lower(Title or '') == mw.ustring.lower(Periodical) then | ||
Periodical = nil | Periodical = nil | ||
end | |||
if Periodical and mw.ustring.lower(PublisherName or '') == mw.ustring.lower(Periodical) then | |||
PublisherName = nil | |||
end | end | ||
auto_Periodical = true | auto_Periodical = true | ||
Riga 1 655: | Riga 1 658: | ||
Authors = wrap(msg_editors, Authors) | Authors = wrap(msg_editors, Authors) | ||
end | end | ||
end | |||
Authors, Editors = Contributors, Authors | if is_set(Contributors) and is_set(Title) then | ||
Authors, Editors = Contributors, is_set(Editors) and Editors or Authors | |||
end | end | ||
fragment_citation = Fragment.new({Authors, Chapter}, sepc) | fragment_citation = Fragment.new({Authors, Chapter}, sepc) | ||
if Chapter ~= "" or Editors ~= "" then | if Chapter ~= "" or Editors ~= "" then | ||
if A:ORIGIN('Periodical') == 'sito' or auto_Periodical then | -- antepone "su" anzichè "in" per i siti web | ||
if A:ORIGIN('Periodical') == 'sito' or auto_Periodical then | |||
fragment_citation:last("su") | fragment_citation:last("su") | ||
else | else |