Module:Protection banner/config: Difference between revisions
Content added Content deleted
Enwikipedia>Mr. Stradivarius (use PAGETYPE variable with the reset reason) |
Enwikipedia>Mr. Stradivarius (add an INTROFRAGMENT parameter to solve the problem of what punctuation to use in run-on sentences using INTROBLURB) |
||
Line 31: | Line 31: | ||
-- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry |
-- ${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 |
-- is set. E.g. "Editing of this page by new or unregistered users is currently |
||
-- disabled until dd Month YYYY" |
-- 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". |
-- ${PAGETYPE} - the type of the page, e.g. "article" or "template". |
||
Line 70: | Line 73: | ||
masterBanner = { |
masterBanner = { |
||
text = '${INTROBLURB} |
text = '${INTROBLURB}', |
||
explanation = '${EXPLANATIONBLURB}', |
explanation = '${EXPLANATIONBLURB}', |
||
tooltip = '${TOOLTIPBLURB}.', |
tooltip = '${TOOLTIPBLURB}.', |
||
Line 104: | Line 107: | ||
.. ' [[Wikipedia:Biographies of living persons' |
.. ' [[Wikipedia:Biographies of living persons' |
||
.. '|biographies of living persons]] policy.', |
.. '|biographies of living persons]] policy.', |
||
text = '${ |
text = '${INTROFRAGMENT} to promote compliance with' |
||
.. ' [[Wikipedia:Biographies of living persons' |
.. ' [[Wikipedia:Biographies of living persons' |
||
.. "|Wikipedia's policy on the biographies" |
.. "|Wikipedia's policy on the biographies" |
||
Line 154: | Line 157: | ||
local msg |
local msg |
||
if type(protectionObj.expiry) == 'number' then |
if type(protectionObj.expiry) == 'number' then |
||
msg = '${ |
msg = '${INTROFRAGMENT} or until editing %s have been resolved.' |
||
else |
else |
||
msg = '${ |
msg = '${INTROFRAGMENT} until editing %s have been resolved.' |
||
end |
end |
||
return string.format(msg, disputes) |
return string.format(msg, disputes) |
||
Line 235: | Line 238: | ||
description = 'For pages protected due to' |
description = 'For pages protected due to' |
||
.. ' [[Wikipedia:Sock puppetry|sock puppetry]].', |
.. ' [[Wikipedia:Sock puppetry|sock puppetry]].', |
||
text = '${ |
text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' |
||
.. ' [[Wikipedia:Blocking policy|blocked]] or' |
.. ' [[Wikipedia:Blocking policy|blocked]] or' |
||
.. ' [[Wikipedia:List of banned users|banned users]]' |
.. ' [[Wikipedia:List of banned users|banned users]]' |
||
Line 263: | Line 266: | ||
description = 'For pages protected against disruptive edits by a' |
description = 'For pages protected against disruptive edits by a' |
||
.. ' particular user.', |
.. ' particular user.', |
||
text = '${ |
text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' |
||
.. ' such as abusing the' |
.. ' such as abusing the' |
||
.. ' {{[[Template:unblock|unblock]]}} template.', |
.. ' {{[[Template:unblock|unblock]]}} template.', |
||
Line 280: | Line 283: | ||
description = 'For pages protected against' |
description = 'For pages protected against' |
||
.. ' [[Wikipedia:Vandalism|vandalism]].', |
.. ' [[Wikipedia:Vandalism|vandalism]].', |
||
text = '${ |
text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', |
||
explanation = function (protectionObj, args) |
explanation = function (protectionObj, args) |
||
local ret = '' |
local ret = '' |
||
Line 709: | Line 712: | ||
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
||
-- Intro blurb |
-- Intro blurb and intro fragment |
||
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
||
['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}', |
['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', |
||
['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}', |
['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', |
||
['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', |
|||
['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', |
|||
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |