Modul:Citation/CS1/Identifiers: razlika između inačica
Prijeđi na navigaciju
Prijeđi na pretraživanje
m Zamijenjen sadržaj stranice s »-- Modul:Citation/CS1/Identifiers -- Minimalna verzija local p = {} function p.format(id, value) if not value or value == "" then return nil end if id == "ISBN" then return string.format("ISBN: [%s %s]", "https://www.worldcat.org/isbn/" .. value, value) elseif id == "DOI" then return string.format("DOI: [%s %s]", "https://doi.org/" .. value, value) elseif id == "PMID" then return string.format("PMID: [%s %s]", "ht...« Oznaka: zamijenjeno preko 90 % teksta |
mNema sažetka uređivanja |
||
| Redak 1: | Redak 1: | ||
-- Modul:Citation/CS1/Identifiers | -- Modul:Citation/CS1/Identifiers | ||
-- Minimalna verzija | -- Minimalna verzija kompatibilna s tvojim CS1 modulom | ||
local p = {} | local p = {} | ||
| Redak 7: | Redak 7: | ||
if not value or value == "" then return nil end | if not value or value == "" then return nil end | ||
if | local id_lower = string.lower(id) | ||
if id_lower == "isbn" then | |||
return string.format("ISBN: [%s %s]", "https://www.worldcat.org/isbn/" .. value, value) | return string.format("ISBN: [%s %s]", "https://www.worldcat.org/isbn/" .. value, value) | ||
elseif | |||
elseif id_lower == "doi" then | |||
return string.format("DOI: [%s %s]", "https://doi.org/" .. value, value) | return string.format("DOI: [%s %s]", "https://doi.org/" .. value, value) | ||
elseif | |||
elseif id_lower == "pmid" then | |||
return string.format("PMID: [%s %s]", "https://pubmed.ncbi.nlm.nih.gov/" .. value, value) | return string.format("PMID: [%s %s]", "https://pubmed.ncbi.nlm.nih.gov/" .. value, value) | ||
end | end | ||
Posljednja izmjena od 18. siječanj 2026. u 11:34
Script error: The function "nonexistent" does not exist.
-- Modul:Citation/CS1/Identifiers
-- Minimalna verzija kompatibilna s tvojim CS1 modulom
local p = {}
function p.format(id, value)
if not value or value == "" then return nil end
local id_lower = string.lower(id)
if id_lower == "isbn" then
return string.format("ISBN: [%s %s]", "https://www.worldcat.org/isbn/" .. value, value)
elseif id_lower == "doi" then
return string.format("DOI: [%s %s]", "https://doi.org/" .. value, value)
elseif id_lower == "pmid" then
return string.format("PMID: [%s %s]", "https://pubmed.ncbi.nlm.nih.gov/" .. value, value)
end
return id .. ": " .. value
end
return p