Fandom Developers Wiki
Advertisement

This module is an advanced editnotice loader. WIP

Installation

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

  • MediaWiki:Editnotice-notext: {{#invoke:editnotice load|main|notext=1}}
  • For each namespace number:{{#invoke:editnotice load|main}}
  • For notices on protected pages, add the following (may require assistance from Fandom staff): {{#invoke:editnotice load|protectionNotice}}


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

  • Title: Editnotice bound to a specific title. This also works for pages that do not exist, but requires moving around if the page the notice is bound to is moved.
  • Page: Editnotice bound to a specific page, regardless of page name. If the page is moved the editnotice remains, but if the page is later deleted the editnotice becomes invalid.
  • Group: Editnotice bound to a group of subpages, regardless of page name. This also works for pages that do not exist.
  • Protection: Editnotice for a protected title. This also works for pages that do not exist, but requires moving around if the page the notice is bound to is moved.
  • ProtectionID: Same as "protection", but now bound to a specific page.
  • Category: Editnotice for all pages in a category. Only works on MW 1.43 or later.
  • Namespace: Editnotice for all pages in a specific namespace.

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.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)

Advertisement