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 | 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 | return makeFileLink{ | ||
file = filename, | |||
size = (self._imageWidth or 20) .. 'px', | |||
alt = self._imageAlt, | |||
link = self._imageLink, | |||
caption = self._imageCaption | |||
} | |||
end | end | ||