Difference between revisions of "Module:Protection banner"
Jump to navigation
Jump to search
imported>Mr. Stradivarius (add some more categories) |
imported>Mr. Stradivarius (change category table scheme) |
||
Line 2: | Line 2: | ||
-- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. | -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. | ||
− | local categories = { | + | local categories = { |
− | + | { | |
− | + | name = 'Wikipedia semi-protected user and user talk pages', | |
− | + | type = 'edit', | |
− | + | level = 'semi', | |
− | + | ns = {[2] = true, [3] = true}, -- User and user talk | |
− | + | reason - 'all' | |
− | + | }, | |
− | + | { | |
− | + | name = 'Semi-protected project pages', | |
− | + | type = 'edit', | |
− | + | level = 'semi', | |
− | + | ns = {[4] = true}, -- Project | |
− | + | reason = 'all' | |
− | + | }, | |
− | + | { | |
− | + | name = 'Semi-protected images', | |
− | + | type = 'edit', | |
− | + | level = 'semi', | |
− | + | ns = {[6] = true}, -- File | |
− | + | reason = 'all' | |
− | + | }, | |
+ | { | ||
+ | name = 'Wikipedia semi-protected templates', | ||
+ | type = 'edit', | ||
+ | level = 'semi', | ||
+ | ns = {[10] = true}, -- Template | ||
+ | reason = 'all' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Semi-protected portals', | ||
+ | type = 'edit', | ||
+ | level = 'semi', | ||
+ | ns = {[100] = true}, -- Portal | ||
+ | reason = 'all' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Semi-protected talk pages', | ||
+ | type = 'edit', | ||
+ | level = 'semi', | ||
+ | ns = 'talk', | ||
+ | reason = 'all' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Wikipedia pages semi-protected against vandalism', | ||
+ | type = 'edit', | ||
+ | level = 'semi', | ||
+ | ns = 'all', | ||
+ | reason = 'vandalism' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Wikipedia protected user and user talk pages', | ||
+ | type = 'edit', | ||
+ | level = 'full', | ||
+ | ns = {[2] = true, [3] = true}, -- User and user talk | ||
+ | reason = 'all' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Protected images', | ||
+ | type = 'edit', | ||
+ | level = 'full', | ||
+ | ns = 'file', | ||
+ | reason = 'all' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Protected project pages', | ||
+ | type = 'edit', | ||
+ | level = 'full', | ||
+ | ns = {[6] = true}, -- File | ||
+ | reason = 'all' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Wikipedia protected templates', | ||
+ | type = 'edit', | ||
+ | level = 'full', | ||
+ | ns = {[10] = true}, -- Template | ||
+ | reason = 'all' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Protected talk pages', | ||
+ | type = 'edit', | ||
+ | level = 'full', | ||
+ | ns = 'talk', | ||
+ | reason = 'all' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Wikipedia pages protected against vandalism', | ||
+ | type = 'edit', | ||
+ | level = 'full', | ||
+ | ns = 'all', | ||
+ | reason = 'vandalism' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Wikipedia pages semi-protected due to dispute', | ||
+ | type = 'edit', | ||
+ | level = 'semi', | ||
+ | ns = 'all', | ||
+ | reason = 'dispute' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Wikipedia pages protected due to dispute', | ||
+ | type = 'edit', | ||
+ | level = 'full', | ||
+ | ns = 'all', | ||
+ | reason = 'dispute' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Wikipedia pages move-protected due to dispute', | ||
+ | type = 'move', | ||
+ | level = 'full', | ||
+ | ns = 'all', | ||
+ | reason = 'dispute' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Wikipedia move-protected user and user talk pages', | ||
+ | type = 'move', | ||
+ | level = 'full', | ||
+ | ns = {[2] = true, [3] = true}, -- User and user talk | ||
+ | reason = 'all' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Wikipedia move-protected project pages', | ||
+ | type = 'move', | ||
+ | level = 'full', | ||
+ | ns = {[4] = true}, -- Project | ||
+ | reason = 'all' | ||
+ | }, | ||
+ | { | ||
+ | name = 'Wikipedia move-protected portals', | ||
+ | type = 'move', | ||
+ | level = 'full', | ||
+ | ns = {[100] = true}, -- Portal | ||
+ | reason = 'all' | ||
+ | }, | ||
+ | } | ||
+ | |||
local error_categories = { | local error_categories = { | ||
incorrect = 'Wikipedia pages with incorrect protection templates', | incorrect = 'Wikipedia pages with incorrect protection templates', |
Revision as of 13:00, 2 March 2014
Documentation for this module may be created at Module:Protection banner/doc
-- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. local categories = { { name = 'Wikipedia semi-protected user and user talk pages', type = 'edit', level = 'semi', ns = {[2] = true, [3] = true}, -- User and user talk reason - 'all' }, { name = 'Semi-protected project pages', type = 'edit', level = 'semi', ns = {[4] = true}, -- Project reason = 'all' }, { name = 'Semi-protected images', type = 'edit', level = 'semi', ns = {[6] = true}, -- File reason = 'all' }, { name = 'Wikipedia semi-protected templates', type = 'edit', level = 'semi', ns = {[10] = true}, -- Template reason = 'all' }, { name = 'Semi-protected portals', type = 'edit', level = 'semi', ns = {[100] = true}, -- Portal reason = 'all' }, { name = 'Semi-protected talk pages', type = 'edit', level = 'semi', ns = 'talk', reason = 'all' }, { name = 'Wikipedia pages semi-protected against vandalism', type = 'edit', level = 'semi', ns = 'all', reason = 'vandalism' }, { name = 'Wikipedia protected user and user talk pages', type = 'edit', level = 'full', ns = {[2] = true, [3] = true}, -- User and user talk reason = 'all' }, { name = 'Protected images', type = 'edit', level = 'full', ns = 'file', reason = 'all' }, { name = 'Protected project pages', type = 'edit', level = 'full', ns = {[6] = true}, -- File reason = 'all' }, { name = 'Wikipedia protected templates', type = 'edit', level = 'full', ns = {[10] = true}, -- Template reason = 'all' }, { name = 'Protected talk pages', type = 'edit', level = 'full', ns = 'talk', reason = 'all' }, { name = 'Wikipedia pages protected against vandalism', type = 'edit', level = 'full', ns = 'all', reason = 'vandalism' }, { name = 'Wikipedia pages semi-protected due to dispute', type = 'edit', level = 'semi', ns = 'all', reason = 'dispute' }, { name = 'Wikipedia pages protected due to dispute', type = 'edit', level = 'full', ns = 'all', reason = 'dispute' }, { name = 'Wikipedia pages move-protected due to dispute', type = 'move', level = 'full', ns = 'all', reason = 'dispute' }, { name = 'Wikipedia move-protected user and user talk pages', type = 'move', level = 'full', ns = {[2] = true, [3] = true}, -- User and user talk reason = 'all' }, { name = 'Wikipedia move-protected project pages', type = 'move', level = 'full', ns = {[4] = true}, -- Project reason = 'all' }, { name = 'Wikipedia move-protected portals', type = 'move', level = 'full', ns = {[100] = true}, -- Portal reason = 'all' }, } local error_categories = { incorrect = 'Wikipedia pages with incorrect protection templates', no_expiry = 'Wikipedia protected pages without expiry' } local template_types = { vandalism = { namespaces = false, -- defaults to all namespaces editLevels = false, -- all edit protection levels moveLevels = false, -- all move protection levels createLevels = false, -- all create protection levels header = false, reason = 'due to [[Wikipedia:Vandalism|vandalism]]', icon_reason = 'due to vandalism', } }