Jump to content

Module:Protection banner: Difference between revisions

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)
Line 4: Line 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')
Line 772: Line 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


Cookies help us deliver our services. By using our services, you agree to our use of cookies.