⚓ T6469 Provide per-namespace site notices
- ️Tue Jan 03 2006
Provide per-namespace site notices
Open, In Progress, LowPublicFeature
Provide per-namespace site notices
Open, In Progress, LowPublicFeature
Author: sy1234
MediaWiki:<namespace>:Sitenotice
e.g. MediaWiki:Help:Sitenotice
Implement per-namespace sitenotice functionality. For example, a sitenotice on
"Help:" would allow for a specific notification for readers of the documentation
which may not apply to the entire site.
This is much easier than inserting a template to every page in a potentially
large namespace.
Event Timeline
• bzimport added a subscriber: Unknown Object (MLST).
robchur wrote: Would be more inclined to use MediaWiki:Sitenotice/<namespace> syntax, falling
back to MediaWiki:Sitenotice if it doesn't exist.
avarab wrote: (In reply to comment #1) Would be more inclined to use MediaWiki:Sitenotice/<namespace> syntax, falling That would potentially conflict with the message/language syntax
back to MediaWiki:Sitenotice if it doesn't exist.
robchur wrote: (In reply to comment #3) That would potentially conflict with the message/language syntax Then let's use a new message altogether - "MediaWiki:Namespacebanner/<NS>".
gangleri wrote: Hallo! The "/" character is used already for user interface language variants. Would it "MediaWiki:Namespacebanner-<NS>" questions: best regards reinhardt [[user:gangleri]] P.S. I emulated such a "per namespace help" using templates at "WikiPage". The
be more appropriate to use the "-" character?
a) In page titles namespaces are *not* casesensitive, see
[[en:mEDIawIKi:Sitenotice]]. However they will / can be in a syntax as
"MediaWiki:Namespacebanner-<NS>".
b) Should <NS> be
b1) a value (negative or positive)
b2) a "generic" namespace? "Category" or "category"?
b3) a localized namespace? Including all backward compatibility hacks?
c) Would there be a support for custom namespaces also?
work was lost.
Fixed in CVS:
MediaWiki:Namespacebanner contains the "base name", to which the name of the
namespace is appended, like "basename-namespace". By default the base name is
also "Namespacebanner" to add confusion. In namespace names, spaces are replaced
by "-" (due to some weird message handling bug).
So the namespace-specific notice messages loke like:
"Namespacebanner-" (main namespace)
"Namespacebanner-Talk" (Talk namespace)
"Namespacebanner-MediaWiki-talk" (for MediaWiki_talk)
stanley wrote: The feature has not been activated until now. Why?
robchur wrote: As far as I am aware, it's not present in the code at this time. I believe the There isn't a clean implementation for this at the present time.
first implementation was considered to be an absolute mess, and the second was
discovered to cause some bizarre items within the cache.
stanley wrote: (In reply to comment #8) As far as I am aware, it's not present in the code at this time. I believe the There isn't a clean implementation for this at the present time. Bug reopened.
first implementation was considered to be an absolute mess, and the second was
discovered to cause some bizarre items within the cache.
wiki.bugzilla wrote: Just a note on importance: public domain; primarily for a free (and easy to copy) manual/handbook, that is
We *really* need such a feature for mediawiki.org, where specific namespace(s)
intended to be shipped with the package/distribution in the future, at least as a
download option (perhaps a specific dump).
robchur wrote: Couple of points:
gangleri wrote: (In reply to comment #6) "Namespacebanner-" (main namespace) (In reply to comment #11) There is also another point: Custom namspaces do not have "generic names". "Namespacebanner-0" (for '' main namespace)
"Namespacebanner-Talk" (Talk namespace)
"Namespacebanner-MediaWiki-talk" (for MediaWiki_talk)
What about using "Namespacebanner-<namespace_value>"?
"Namespacebanner-1" (for 'Talk' namespace)
"Namespacebanner-9" (for 'MediaWiki_talk' namespace)
also
"Namespacebanner--1" (for 'Special' namespace)
"Namespacebanner-101" (for custom namespace 'Portal_talk') at
[[en:template:wikivar#ns_101]].
gangleri wrote: Sorry! Please read above:
(In reply to comment #11)
Wiki.Melancholie wrote: Isn't the method used at [[de:MediaWiki:Noarticletext]]
working for [[MediaWiki:Sitenotice]], too?
Wiki.Melancholie wrote: OK, have a look on [[b:als:MediaWiki:Anonnotice]] to see how my suggestion works See [[b:als:MediaWiki Diskussion:Anonnotice]] for an overview of the namespace Because it is possible to devide MediaWiki:Sitenotice into different sub
(it's the same for "MediaWiki:Sitenotice", of course)!
messages, to see what has to be done before every namespace have its *own* (or
shared) message. Have a close look on the given comments and on the structure of
the sub pages.
notices, I close this bug now.
stanley wrote: (In reply to comment #16) OK, have a look on [[b:als:MediaWiki:Anonnotice]] to see how my suggestion works See [[b:als:MediaWiki Diskussion:Anonnotice]] for an overview of the namespace Because it is possible to devide MediaWiki:Sitenotice into different sub Not working for me. (see
(it's the same for "MediaWiki:Sitenotice", of course)!
messages, to see what has to be done before every namespace have its *own* (or
shared) message. Have a close look on the given comments and on the structure of
the sub pages.
notices, I close this bug now.
http://id.wikipedia.org/wiki/Mediawiki:Anonnotice/Mediawiki)
I put message in MediaWiki:Anonnotice/MediaWiki , the default anonnotice for
MediaWiki still MediaWiki:Anonnotice
Wiki.Melancholie wrote: Yes, of course you have to change [[id:MediaWiki:Anonnotice]]
before; see [[b:als:MediaWiki:Anonnotice]]. --- Best regards,
Melancholie
Wiki.Melancholie wrote: Oh, and go over [[b:als:MediaWiki_Diskussion:Anonnotice]] again to
avoid red links, etc.
stanley wrote: Oh, and go over [[b:als:MediaWiki_Diskussion:Anonnotice]] again to (In reply to comment #19)
avoid red links, etc.
Ah.. I understand.. You use tricky {{NAMESPACE}}. It's a workaround for this
bug. Nice. Thanks
Wiki.Melancholie wrote: BTW: If you should think this feature should be implemented to the software, time); see comment #1 "intricate"
consider reopening this bug. The advantages of a software solution would be:
stanley wrote: Using ParserFunctions: {{#ifexist:MediaWiki:Sitenotice/{{NAMESPACE}}|{{MediaWiki:Sitenotice/{{NAMESPACE}}}}}}
robchur wrote: This wasn't implemented in code, and wasn't WONTFIXED. Going to reopen.
Wiki.Melancholie wrote: Another parser function as workaround: {{#ifeq:{{NAMESPACE}}|User talk|then text|else text}} (BTW: {{#ifeq:{{NAMESPACEE}}|User_talk|then text|else text}})
(BTW: {{#ifeq:{{FULLPAGENAME}}|Special:Recentchanges|then text|else text}})
Wiki.Melancholie wrote: Usage with no "else text": {{#ifeq:{{NAMESPACE}}|User talk|then text|}}
robchur wrote: The site notices are cached once for all views; parser functions which depend
upon {{PAGENAME}} and {{NAMESPACE}} and so on won't work properly in these.
robchur wrote: *** Bug 6391 has been marked as a duplicate of this bug. ***
(In reply to comment #5) questions: They won't. The MediaWiki code internally resolves 'mEDIawIKi' to 'MediaWiki'.
a) In page titles namespaces are *not* casesensitive, see
[[en:mEDIawIKi:Sitenotice]]. However they will / can be in a syntax as
"MediaWiki:Namespacebanner-<NS>".
Wiki.Melancholie wrote: Not sure, but r41655 should be pretty the same when live!
Wiki.Melancholie wrote: ... has been reverted with r41994 (cache issues)
(In reply to comment #35) ... has been reverted with r41994 (cache issues) Copying comment from r41655 here: "ES" refers to [[mw:Manual:External Storage]].
Causes a text load on parser cache hit. Reduces parser cache hit performance especially for ES clusters. Please implement this like every other double-underscore magic word and cooperate with the parser cache. Reverting.
Gerrit change 105434 attempts to re-introduce this feature. The previous implementations have never lasted long without being reverted, so to respond to previous reasons for reversion:
the site notice code needs a lot of love, but it doesn't seem to be on anyone's roadmap, so would likely need to be led by volunteer engineers. I can be assistance in review if needed.
Unless someone has a strong use case for this and wants to act as a shepherd to make that happen this is not going to happen. Note namespace only site notices are possible with the current codebase by using one using styles. You can always output the HTML in the page, hide it via CSS and make use of the ns- classes to show it where needed.
Re-opening as I could try to file a patch and there are strong use cases for it – on enwiki there have been multiple discussions about showing a banner on top of draft pages. See latest discussion at https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(idea_lab)#Universal_notice_for_draftspace In my understanding of the linked discussion, enwiki wants 'persistent' notice in draft namespace. It'd be good to note this will not be possible even if the above patch is merged. The ns notice would not be persistent and may not even be seen at all (depending on whether there's any other notice which is dismissed by the user).
I don't think anyone requested any sort of dismiss capability here?
@Ammarpad I forgot that sitenotices on enwiki were dismissable. In testing on my localhost wiki, they were persistent – as MW core doesn't have a dismiss capability. Which is the extension that makes them dismissable? I think the usecases are for persistent namespace notices, so maybe we could change the extension to not work on ns notices.
... Which is the extension that makes them dismissable? I think the usecases are for persistent namespace notices, so maybe we could change the extension to not work on ns notices. It's https://www.mediawiki.org/wiki/Extension:DismissableSiteNotice I don't think anyone requested any sort of dismiss capability here? The existing notice mechanism is tied to that, and the above patch didn't change that. That's what I wanted to make note of, so as to make things clear.
@SD0001, just circling back to check in on this, as we were previously discussing notices for draftspace. Is what's currently needed someone to review the patch?
@Sdkb It doesn't look like the patch is going to be accepted as it breaks MW core's contract with DismissableSiteNotice. The earlier merged patch does introduce namespace notices in MW core - but the feature is rendered unusable (for the draftspace usecase at least) because DSN makes them dismissable. It looks like the appropriate resolution would come after T259903 is resolved.
Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL · Credits