dev

This module is an advanced editnotice loader. WIP

Installation

After installation, add the following to each of the following pages:


Configuration

See Module:Editnotice load/config:

--[=[===========================================================================
- WARNING: THIS IS THE CONFIGURATION FILE FOR [[Module:Editnotice load]]
- DO NOT EDIT THIS FILE UNLESS IF YOU KNOW WHAT YOU ARE DOING!
- THIS FILE PROVIDES CONFIGURATION SETTINGS FOR HOW [[Module:Editnotice load]]
- SHOULD RUN. MODIFYING THIS FILE HAS THE POTENTIAL TO BREAK EDITNOTICES ON
- DOZENS OF PAGES.
-
- I18N SETTINGS SHOULD BE ADDED TO THE APPROPRIATE FILE ON
- https://dev.fandom.com/wiki/Module:Editnotice_load/i18n
=============================================================================]=]

return {
	pseudo_ns_name = "Template:Editnotices", --the name of the pseudo-namespace for the editnotice loader
	editnotice_classes = "", --Additional classes to add to the editnotice loader; for example, it can be used to hide editnotices from those that are not admins or content-moderators
	editnotice_types = {
		protection = "Protection",
		protection_id = "ProtectionID",
		title = "Title",
		page = "Page",
		group = "Group",
		category = "Category",
		namespace = "Namespace"
	},
	user_editnotice = nil, -- Set this to the name of the user and user talk subpage the loader should treat as an editnotice (talk page editnotices does not work with Message Walls)
	links = "Editnotice links",
	editnotice_names = {
		protection = "Title protection notice",
		protection_id = "Page protection notice",
		title = "Title notice",
		page = "Page notice",
		group = "Group notice",
		category = "Category notice",
		namespace = "Namespace notice",
		user = "User page notice"
	},
	noEditnoticePage = "Warning: $1 does not exist. Creating this will help improve performance for loading editnotices in this namespace. Use the following syntax: $2",
	mainspace = "Main"
}

Editnotice types

Restricting editnotice creation

To restrict the creation of editnotices to specific users, you can use the Abuse filter or the MediaWiki:Titleblacklist. You can define a custom message to show to users who attempt to edit editnotices. Note, by using the titleblacklist, only those with the (tb-override) (administrators) will be able to edit, unless if the "autoconfirmed" flag is set.

The following on the titleblacklist will restrict editnotices to just autoconfirmed users: Template:Editnotice load/.* <noedit|autoconfirmed|errmsg=custom-titleblacklist-editnotice>

If you then want to allow user notices for all user pages, you can then add the following to MediaWiki:Titlewhitelist: Template:Editnotice load/Page/User( talk):.* .

Documentation

Package items

Editnotice_load.showEditnotice(builder, links, editnoticeData, editnoticeName, editnoticeClass, builder, links, editnoticeData, editnoticeName, editnoticeClass, frame) (function)
return a table of values with the editnotice
Parameters:
  • builder the builder for the editnotice (table)
  • links a container for all the links (table)
  • editnoticeData a table with editnotice data from p.getEditnotice (table)
  • editnoticeName the name of the editnotice (string)
  • editnoticeClass the class to add to the editnotice (string)
  • builder the builder for the editnotice (table)
  • links a container for all the links (table)
  • editnoticeData a table with editnotice data from p.getEditnotice (table)
  • editnoticeName the name of the editnotice (string)
  • editnoticeClass the class to add to the editnotice (string)
  • frame the preprocessing frame (table)
Returns: builder the editnotice contents (string)
Editnotice_load.editnotice(frame) (function)
Gets the editnotice type
Parameter: frame the preprocessing frame (table)
Returns: type the string corresponding to the type (string)
Editnotice_load.main(frame) (function)
The main entry point for the editnotice loader
Parameter: frame the preprocessing frame (table)
Returns: output the output of the module (string)