Changes

Jump to: navigation, search

Module:Protection banner/config

286 bytes added, 01:09, 22 July 2014
add an INTROFRAGMENT parameter to solve the problem of what punctuation to use in run-on sentences using INTROBLURB
-- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry
-- is set. E.g. "Editing of this page by new or unregistered users is currently
-- disabled until dd Month YYYY."---- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation-- so that it can be used in run-on sentences.
--
-- ${PAGETYPE} - the type of the page, e.g. "article" or "template".
masterBanner = {
text = '${INTROBLURB}.',
explanation = '${EXPLANATIONBLURB}',
tooltip = '${TOOLTIPBLURB}.',
.. ' [[Wikipedia:Biographies of living persons'
.. '|biographies of living persons]] policy.',
text = '${INTROBLURBINTROFRAGMENT} to promote compliance with'
.. ' [[Wikipedia:Biographies of living persons'
.. "|Wikipedia's policy on the biographies"
local msg
if type(protectionObj.expiry) == 'number' then
msg = '${INTROBLURBINTROFRAGMENT}, or until editing %s have been resolved.'
else
msg = '${INTROBLURBINTROFRAGMENT} until editing %s have been resolved.'
end
return string.format(msg, disputes)
description = 'For pages protected due to'
.. ' [[Wikipedia:Sock puppetry|sock puppetry]].',
text = '${INTROBLURBINTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of'
.. ' [[Wikipedia:Blocking policy|blocked]] or'
.. ' [[Wikipedia:List of banned users|banned users]]'
description = 'For pages protected against disruptive edits by a'
.. ' particular user.',
text = '${INTROBLURBINTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,'
.. ' such as abusing the'
.. ' {{[[Template:unblock|unblock]]}} template.',
description = 'For pages protected against'
.. ' [[Wikipedia:Vandalism|vandalism]].',
text = '${INTROBLURBINTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].',
explanation = function (protectionObj, args)
local ret = ''
--------------------------------------------------------------------------------
-- Intro blurband intro fragment
--------------------------------------------------------------------------------
['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.',['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.',['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},',['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}',
--------------------------------------------------------------------------------
Anonymous user

Navigation menu