Modul:Citation/COinS: Unterschied zwischen den Versionen
rftUrl
(page numbers = letters+numbers) |
(rftUrl) |
||
| Zeile 3: | Zeile 3: | ||
suite = 'Citation', | suite = 'Citation', | ||
sub = 'COinS', | sub = 'COinS', | ||
serial = '2022-08- | serial = '2022-08-15' | ||
} | } | ||
| Zeile 136: | Zeile 136: | ||
if #rft > 2 then | if #rft > 2 then | ||
local prefix | local prefix | ||
local rftUrl = cu.isSet( args.url ) and args.url or '' | |||
for key, value in pairs( ci.params ) do | for key, value in pairs( ci.params ) do | ||
if cu.isSet( args[ key ] ) and value.COinS then | if cu.isSet( args[ key ] ) and value.COinS then | ||
| Zeile 147: | Zeile 148: | ||
table.insert( rft, 'rft_id=' .. | table.insert( rft, 'rft_id=' .. | ||
mw.uri.encode( value.COinS .. '/' .. args[ key ], 'PATH' ) ) | mw.uri.encode( value.COinS .. '/' .. args[ key ], 'PATH' ) ) | ||
elseif prefix == 'url' then | elseif prefix == 'url' and rftUrl == '' then | ||
rftUrl = value.url:format( args[ key ] ) | |||
elseif prefix == 'jst' then | elseif prefix == 'jst' then | ||
if not cu.isSet( args.doi ) then | if not cu.isSet( args.doi ) then | ||
| Zeile 155: | Zeile 155: | ||
mw.uri.encode( 'info:doi/' .. value.doi:format( args[ key ] ), 'PATH' ) ) | mw.uri.encode( 'info:doi/' .. value.doi:format( args[ key ] ), 'PATH' ) ) | ||
end | end | ||
if | if rftUrl == '' then | ||
rftUrl = value.url:format( args[ key ] ) | |||
end | end | ||
end | end | ||
end | end | ||
end | end | ||
end | |||
if rftUrl ~= '' then | |||
table.insert( rft, 'rft_id=' .. mw.uri.encode( rftUrl, 'PATH' ) ) | |||
end | end | ||