Page MenuHomePhabricator

Add configuration option to ArticleFeedback to define namespaces where it is enabled
Closed, ResolvedPublic

Description

Some wikis have its content in other namespaces besides the main namespace. E.g. English Wikibooks has a "[[b:Cookbook]]" namespace (for recipes) and Portuguese Wikipedia has an "[[pt:Anexo]]" namespace (for lists and other stuff).

As of r83924, ext.articleFeedback.startup.js has the following test:
mw.config.get( 'wgNamespaceNumber', false ) === 0

Instead of this, the extension should check if the the current wgNamespaceNumber is in a predefined list of namespaces (configurable per wiki).


Version: unspecified
Severity: enhancement

Details

Reference
bz28080

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:35 PM
bzimport added a project: ArticleFeedback.
bzimport set Reference to bz28080.

(In reply to comment #0)

Instead of this, the extension should check if the the current
wgNamespaceNumber is in a predefined list of namespaces (configurable per
wiki).

"$wgContentNamespaces" might be a good fit, unless you want it to be configurable and be able to choose the namespaces yourself when its setup.

(In reply to comment #1)

"$wgContentNamespaces" might be a good fit, unless you want it to be
configurable and be able to choose the namespaces yourself when its setup.

I think it should use $wgContentNamespaces as default value but still be configurable. This way, if some wiki wants to have feedback about its internal documentation or project pages, they could just add the necessary namespaces (as currently happens on [[wikibooks:pt:]], with ReaderFeedback - bug 26451).

Using a global variable for this and defaulting to wgContentNamespaces sounds like a sane idea.

I'll implement this soon.