Modul:File link: Unterschied zwischen den Versionen

K
24 Versionen von wpen:Module:File_link importiert
(make this a lot simpler - the original module was overkill for what it was trying to do)
K (24 Versionen von wpen:Module:File_link importiert)
 
(5 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
-- This module provides a library for formatting file wikilinks.
-- This module provides a library for formatting file wikilinks.


local yesno = require('Module:Yesno')
local checkType = require('libraryUtil').checkType
local checkType = require('libraryUtil').checkType


Zeile 57: Zeile 58:
end
end


addPositional('border')
-- Border
if yesno(args.border) then
ret[#ret + 1] = 'border'
end
 
addPositional('location')
addPositional('location')
addPositional('alignment')
addPositional('alignment')
Zeile 79: Zeile 84:
wrappers = 'Template:File link'
wrappers = 'Template:File link'
})
})
if not origArgs.file then
error("'file' parameter missing from [[Template:File link]]", 0)
end
-- Copy the arguments that were passed to a new table to avoid looking up
-- Copy the arguments that were passed to a new table to avoid looking up
-- every possible parameter in the frame object.
-- every possible parameter in the frame object.