Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Protection banner: Difference between revisions

Content added Content deleted
(Fixing content model)
m (Changed protection level of Module:Protection banner: High-risk Lua module: RFPP request ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
Line 825: Line 825:
obj._imageAlt = blurbObj:makeBannerText('alt')
obj._imageAlt = blurbObj:makeBannerText('alt')
obj._imageLink = blurbObj:makeBannerText('link')
obj._imageLink = blurbObj:makeBannerText('link')
obj._right = cfg.padlockPositions[protectionObj.action]
obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action]
or cfg.padlockPositions.default
or cfg.padlockIndicatorNames.default
or '55px'
or 'pp-default'
return setmetatable(obj, Padlock)
return setmetatable(obj, Padlock)
end
end


function Padlock:__tostring()
function Padlock:__tostring()
local root = mw.html.create('div')
local frame = mw.getCurrentFrame()
-- The nowiki tag helps prevent whitespace at the top of articles.
root
local nowiki = frame:extensionTag{name = 'nowiki'}
:addClass('metadata topicon nopopups')
local indicator = frame:extensionTag{
:attr('id', 'protected-icon')
name = 'indicator',
:css{display = 'none', right = self._right}
args = {name = self._indicatorName},
:wikitext(self:renderImage())
content = self:renderImage()
return tostring(root)
}
return nowiki .. indicator
end
end


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