Changes
Jump to navigation
Jump to search
no edit summary
end
return '[http://id.loc.gov/authorities/names/' .. cleanedId .. ' ' .. cleanedId .. ']'
end
function orcidLink( id )
return '[http://orcid.org/' .. id .. ' ' .. id .. ']'
end
function gndLink( id )
if not string.match( id, '^%d+$' ) then
return false
end
return '[http://d-nb.info/gnd/' .. id .. ' ' .. id .. ']'
end
local conf = {
{ 'VIAF', '[[Virtual International Authority File|VIAF]]', 0, viafLink },
{ 'LCCN', '[[Library of Congress Control Number|LCCN]]', 0, lccnLink }, { 'ORCID', '[[ORCID]]', 0, orcidLink }, { 'GND', '[[Universal Authority File|GND]]', 0, gndLink }
}
local link = params[4]( val )
if link then
table.insert( elements, '* ' .. params[2] .. ': <span class="uid">' .. link .. '</span>' .. getCatForId( params[1] ) .. '\n' )
else
table.insert( elements, '* <span class="error">The ' .. params[1] .. ' id ' .. val .. ' is not valid.</span>[[Category:Wikipedia articles with faulty authority control identifiers (' .. params[1] .. ')]]\n' )
end
bodyclass = 'hlist',
group1 = '[[Authority control]]',
list1 = table.concat( elements, ' * ' )
} )
end
return p