Commons:Editnotice: Difference between revisions

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Content deleted Content added
4nn1l2 (talk | contribs)
m Reverted edits by 2404:160:A41A:23FC:88FA:E5C7:1A54:8F3A (talk) to last revision by EthanGaming7640
Tag: Rollback
Mrschico (talk | contribs)
Line 11: Line 11:


=== User and user discussion ===
=== User and user discussion ===
This adhesive and blue whatever

Insert as an [[Template:Editnotice userpage|edit notice for a user page]] as <code><nowiki>{{Editnotice userpage}}</nowiki></code>.
Insert as an [[Template:Editnotice userpage|edit notice for a user page]] as <code><nowiki>{{Editnotice userpage}}</nowiki></code>.



Revision as of 06:19, 21 June 2023

Shortcut: COM:EDN Editnotices are message boxes shown automatically by the MediaWiki software above the edit zone when a user edits a page. They are distinct from "editintro"s which serve a similar purpose; editintros are loaded differently.[1] All users can create editnotices for their user and talk pages, but editnotices for other namespaces can be created and edited only by administrators.

To use editnotices, you should have a basic understanding of the concept of Commons namespaces; that is: a set of Commons pages whose names begin with a prefix recognized by the MediaWiki software, followed by a colon, or, in the case of the main namespace, with no prefix.

Some of the message boxes you see when editing a page (or viewing the source of a protected page) are not editnotices; instead, they are MediaWiki interface messages.

Editnotices

When creating editnotices, the template {{Editnotice}} can be used for formatting; see its template page for how to use it. See Category:Editnotice templates for specialized editnotices.

User and user discussion

This adhesive and blue whatever Insert as an edit notice for a user page as {{Editnotice userpage}}.

For example:

This appears on top of the editing box screen when people would like to edit your page. The ExampleUser part will automatically change to your username.

Anyone can create an editnotice for a user or user talk page. (But editnotices for user subpages can only be created by administrator.) User page editnotice names take one of these forms:

User:Example/Editnotice
User talk:Example/Editnotice

You can create an editnotice for your own user or talk page with a preloaded {{Editnotice}} template by using these links:

Create your user page notice
Create your user talk page notice

Other namespaces

Editnotices for other namespaces and for user subpages can be created and edited only by administrators. There are three main types of editnotices:

Namespace notices – Displays on all pages within a namespace.
Group notices – Displays on a page and all its subpages. Useful for having a notice for an entire book.
Page notices – Displays only on the page it belongs to.

Editnotice names take one of these forms:

Namespace notices – See below.
Group notices – Template:Editnotices/Group/<Full page name of the root page or book name>
Page notices – Template:Editnotices/Page/<Full page name>

Creating editnotices

To edit a namespace-wide editnotice, click on the respective link below. To create an editnotice for a page, enter the page name after the slash or colon and click "Create". For your own User: and User talk: pages, you don't need to type anything, just click "Create".

Page names are case sensitive—if the page shows the first character as capitalized, then it must be capitalized when entered here.

Number Namespace Namespace editnotice Create page editnotice
0 Gallery Template:Editnotices/Namespace/Main
1 Talk: Template:Editnotices/Namespace/Talk
2 User: Template:Editnotices/Namespace/User
3 User talk: Template:Editnotices/Namespace/User talk
4 Commons: Template:Editnotices/Namespace/Commons
5 Commons talk: Template:Editnotices/Namespace/Commons talk
6 File: Template:Editnotices/Namespace/File
7 File talk: Template:Editnotices/Namespace/File talk
8 MediaWiki: Template:Editnotices/Namespace/MediaWiki
9 MediaWiki talk: Template:Editnotices/Namespace/MediaWiki talk
10 Template: Template:Editnotices/Namespace/Template
11 Template talk: Template:Editnotices/Namespace/Template talk
12 Help: Template:Editnotices/Namespace/Help
13 Help talk: Template:Editnotices/Namespace/Help talk
14 Category: Template:Editnotices/Namespace/Category
15 Category talk: Template:Editnotices/Namespace/Category talk
100 Creator: Template:Editnotices/Namespace/Creator
101 Creator talk: Template:Editnotices/Namespace/Creator talk
102 TimedText: Template:Editnotices/Namespace/TimedText
103 TimedText talk: Template:Editnotices/Namespace/TimedText talk
104 Sequence: Template:Editnotices/Namespace/Sequence
105 Sequence talk: Template:Editnotices/Namespace/Sequence talk
106 Institution: Template:Editnotices/Namespace/Institution
107 Institution talk: Template:Editnotices/Namespace/Institution talk
460 Campaign : Template:Editnotices/Namespace/Campaign
486 Data: Template:Editnotices/Namespace/Data
487 Data talk: Template:Editnotices/Namespace/Data talk
828 Module: Template:Editnotices/Namespace/Module
829 Module talk: Template:Editnotices/Namespace/Module talk

To request the creation of an editnotice if you are not an admin:

  • Open the edit window of the page where you want to create an editnotice
  • Place this request on the page: {{Editnotice talkpagename}}
  • Preview the page and follow the link to the editnotice's talkpage.
  • On the editnotice's talkpage write up the exact markup you want for the editnotice, then place an {{Editprotected}} request above it

Another way to find the link for an editnotice is to:

  • Open the edit window of the page where you want to create an editnotice
  • Place this code on the page: [[{{editnotice pagename}}]]
  • Preview the page and follow the link to the editnotice

Batch of identical editnotices

If you need to display a batch of identical editnotices, please create a single template which you then transclude in each editnotice, to allow easier modification and maintenance. You can place such templates in Category:Editnotice templates.

When displayed

Editnotices are displayed when editing a page, but their content can also be useful when just viewing a page so they are also displayed in these cases:

  • Page notices are displayed on top of .css and .js pages in MediaWiki space. See for instance the notice at the top of MediaWiki:Common.css that begins "This is the CSS for all skins". The namespace notice is not displayed and MediaWiki space doesn't have group notices.
  • In any namespace, when a non-admin "views the source" of a protected page, or an IP-user views the source of a semi-protected page. The group and page notices are displayed, but not the namespace notices.

When the editnotices are shown in "view mode" the loading system feeds them "notice action = view". This can be used inside the editnotices like this:

{{#ifeq: {{{notice action|}}} | view
| <!--A non-admin is "viewing the source" of a protected page-->
| <!--A user with sufficient rights is editing the page-->
}}

Listing editnotices

Technical details

Commons namespaces
Basic namespaces Talk namespaces
0 Gallery Talk 1
2 User User talk 3
4 Commons Commons talk 5
6 File File talk 7
8 MediaWiki MediaWiki talk 9
10 Template Template talk 11
12 Help Help talk 13
14 Category Category talk 15
100 Creator Creator talk 101
102 TimedText TimedText talk 103
104 Sequence Sequence talk 105
106 Institution Institution talk 107
Virtual namespaces
-1 Special
-2 Media

Anything put on the pages MediaWiki:Editnotice-0 through MediaWiki:Editnotice-15 and MediaWiki:Editnotice-100 through MediaWiki:Editnotice-107 will appear as an editnotice for every page in an entire namespace. Editnotice-0 is for mainspace pages, Editnotice-1 for the talk space pages, Editnotice-2 for user space pages, etcetera.

The template {{Editnotice load}} has been put on each of those MediaWiki namespace pages. The template causes each article to use a subpage specific to it as its editnotice rather than using a namespace-wide editnotice.

The editnotice load system uses two methods of storing the editnotices:

  • For User and User talk space the editnotice is stored as a subpage of the user or talk page named /Editnotice. This method allows users to edit these notices.
  • For all other namespaces and for user sub-pages the editnotice is stored as a subpage of Template:Editnotices. Template:Editnotices and its subpages are protected by the MediaWiki:Titleblacklist so that only administrators can create and edit them.

Although all of the namespaces could initially store editnotices directly as MediaWiki messages, this was found to cause performance issues as the MediaWiki namespace grew. The display of MediaWiki editnotices for namespaces that have the MediaWiki subpage feature has been disabled; even though an editnotice can be created as a MediaWiki message for these namespaces, it will not show. For consistency, and to keep the MediaWiki namespace clean, all editnotices are now stored as subpages of Template:Editnotices. This means we again can create editnotices for all namespaces.

Group notices stored as Template:Editnotices/Group/... can be created for pages in any namespace with subpages enabled. Group notices would not be meaningful in the other namespaces. The talk spaces of those other namespaces understand subpages and can use group notices, although group notices are usually not meaningful there either.

Emailnotice

Emailnotices allow registered users with a confirmed email to display a custom message at Special:EmailUser for their username. Emailnotices are located at Special:MyPage/Emailnotice (uses). The system was implemented in MediaWiki:Emailpagetext.

Notes

  1. An editintro is a page loaded as a message box above the edit zone by getting &editintro=EDITINTROPAGENAME into the address (URL). One way to do this is demonstrated in the wikitext of Template:Editnotices/Namespace/Category; another is the <inputbox> approach demonstrated in the wikitext of this page.