Page MenuHomePhabricator

Allow per-article and per-namespace messages above edit form
Closed, ResolvedPublic

Description

To avoid things like http://en.wikipedia.org/w/index.php?oldid=230829925&action=edit it would be great if it were possible to have customizable messages appear above the edit form for certain namespaces or articles.

Using a standardized format like MediaWiki:Notice-edit-<page_title> or something similar, notices about article restrictions or particular concerns with a given page (or namespace) could be displayed regardless of whether someone uses the edit tab or section edits. The Template: namespace could have a message that explains the purpose and function of templates and their syntax, etc.

Apologies if this is already filed elsewhere. I couldn't find anything similar.


Version: 1.13.x
Severity: enhancement

Details

Reference
bz15102

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:23 PM
bzimport set Reference to bz15102.

fran wrote:

Added in r39055. The edit page will now check for messages called MediaWiki:Editnotice-ns-# and MediaWiki:Editnotice-page-PAGENAME, where # and PAGENAME are the namespace and page name respectively, formatted in the same way the per-namespace/per-page CSS classes are, and display them above the edit form.

Reverted for now in r39081; the use of CSS class name formatting for message names doesn't really seem appropriate, as it's difficult to predict.

fran wrote:

Ah, OK, good point. I've taken another whack at it in r39121 - now it uses DBkeys, which the user should be more familiar with, given they're used in URLs. :) (I've also fixed the inconsistency regarding wfMsgForContent() vs. $wgOut->addWikiMsg().)

  • Bug 7739 has been marked as a duplicate of this bug. ***
  • Bug 8260 has been marked as a duplicate of this bug. ***

Per-article editnotices were reverted in r48276. Re-opening this bug for now.

Could we have dismissible editnotices, with cookie IDs like for the watchlist notice (working for anons too) ? This would allow to dismiss per-namespace editnotices, and pending resolution of bug 18596, dismiss per-category editnotices, so supersede the common.js hack (which adds an editintro).

r97686 restores per-article editnotices, seems to be unaware that it was previously removed. :)

Unclear whether this will stay.

a.d.bergi wrote:

At the German Wikipedia this is already done with the parser function #ifexist, see http://de.wikipedia.org/w/index.php?title=MediaWiki:Editnotice-0&action=edit. Of course it would be much cleaner if it was a mediawiki feature.

At this moment it looks like it is going to stay - the previous behavior was very inconsistent.