Zum Inhalt springen

Modul:Protection banner: Unterschied zwischen den Versionen

transitioning to new version of Module:File link - will switch from the sandbox to the main module in a short while
(add support for the "demolevel" parameter; code by myself and User:Jackmcbarn)
(transitioning to new version of Module:File link - will switch from the sandbox to the main module in a short while)
Zeile 4: Zeile 4:
-- Initialise necessary modules.
-- Initialise necessary modules.
require('Module:No globals')
require('Module:No globals')
local newFileLink = require('Module:File link').new
local makeFileLink = require('Module:File link/sandbox')._main
local effectiveProtectionLevel = require('Module:Effective protection level')._main
local effectiveProtectionLevel = require('Module:Effective protection level')._main
local yesno = require('Module:Yesno')
local yesno = require('Module:Yesno')
Zeile 772: Zeile 772:
or self._cfg.msg['image-filename-default']
or self._cfg.msg['image-filename-default']
or 'Transparent.gif'
or 'Transparent.gif'
return newFileLink(filename)
return makeFileLink{
:width(self._imageWidth or 20)
file = filename,
:alt(self._imageAlt)
size = (self._imageWidth or 20) .. 'px',
:link(self._imageLink)
alt = self._imageAlt,
:caption(self._imageCaption)
link = self._imageLink,
:render()
caption = self._imageCaption
}
end
end


Anonymer Benutzer