Module:Protection banner

    From Nonbinary Wiki
    Revision as of 02:58, 25 February 2014 by wikipedia>Mr. Stradivarius (make a start on the data structure)
    (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

    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 = {}
    -- The naming scheme is: protection type - protection level - namespace - reason
    categories['edit-semi-user-all'] = 'Wikipedia semi-protected user and user talk pages'
    categories['edit-semi-project-all'] = 'Semi-protected project pages'
    categories['edit-semi-file-all'] = 'Semi-protected images'
    categories['edit-semi-template-all'] = 'Wikipedia semi-protected templates'
    categories['edit-semi-portal-all'] = 'Semi-protected portals'
    categories['edit-semi-talk-all'] = 'Semi-protected talk pages'
    categories['edit-semi-other-vandalism'] 'Wikipedia pages semi-protected against vandalism'
    categories['edit-full-user-all'] = 'Wikipedia protected user and user talk pages'
    categories['edit-full-file-all'] = 'Protected images'
    categories['edit-full-project-all'] = 'Protected project pages'
    categories['edit-full-template-all'] = 'Wikipedia protected templates'
    categories['edit-full-talk-all'] = 'Protected talk pages'
    categories['edit-full-all-vandalism'] = 'Wikipedia pages protected against vandalism'
    
    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',
    	}
    }