User:Skizzerz/Namespaces

Preliminary notes
Notes to myself for the upcoming Special:Namespaces (see MediaWiki roadmap). An experimental (disabled by default) special page should be available by the 1.17 release of MediaWiki. The page should then be enabled by default pending bug fixes and feature additions by 1.18 or 1.19.


 * Will meet all of the specifications set out in Extension:Namespace manager (page detailing the special page as it exists in the outdated wikidata branch)
 * Support all current namespace configuration variables
 * Manual:Configuration settings
 * Use a table in the database to hold these namespaces and their configuration, then parse them out on startup (before LocalSettings)
 * Start numbering custom namespaces at 300 so it doesn't conflict with extension-added namespaces
 * Register constants NS_* to correspond with the numbers
 * Improved UI
 * Allow deletion of namespaces with pages in it for those with the merge_pseudonamespaces right
 * This will automatically reassign all pages in that namespace to the main namespace, then delete that namespace
 * System namespaces still cannot be deleted
 * This will re-add the prefix to the page name and reassign the namespace to the main namespace
 * Reversible by re-creating the namespace (all the pages will be merged back in)
 * Allow adding new namespaces which conflict with existing pseudonamespaces for those with the merge_pseudonamespaces right
 * This will automatically strip the prefix from the page name and add in the correct namespace number
 * Reversible by deleting the new namespace (all the pages will be merged into the mainspace with proper prefix)
 * Pseudonamespace converter will automatically convert discussion pages into the appropriate talk namespace -- no checkbox option
 * Default link prefix detection should only detect actual namespaces, interwiki prefixes, or interlanguage prefixes. Pseudonamespace prefixes will still be prepended by the default link prefix
 * Related, but not really part of this feature per se: parser function to set a default link prefix on a per-page basis to override the namespace setting.
 * Talk namespace detection, either:
 * Hide discussion tab if respective talk namespace does not exist, or
 * Force creation of talk namespace

New database schema

 * New namespaces table needed to hold namespace relational data
 * Cannot guarantee that a talk namespace number will directly follow the namespace it is tied to, so this change needs to be reflected in code.


 * Schema still needs:
 * place to store boolean options
 * way to store normal<->talk namespace relational data in future-compatibile manner
 * support having multiple talk namespaces for one normal space and one talk namespace for multiple normal spaces in schema, even if this isn't used in MediaWiki proper so that future integration of this is much easier


 * Hold namespace names in a namespace_l10n table