Namespace Manager
This is an old revision of this page, as edited August 4, 2008, 1:34 PM by pegasus(contribs). It may differ significantly from the current revision.
A namespace is the largest article container in VaultWiki apart from VaultWiki itself. The namespace functionality was added in the first release, then called CES NuWiki Special Pages, and is the basic component on which the rest of the modification builds. A namespace is generally equivalent to any top-level forum with a Vault Type, usually sharing its title and forum ID.
In each namespace, more than one article cannot have the same article title, with the exception of an Island. Every namespace has a unique BB-Code for linking from any article to an article in the BB-Code's namespace.
Basic Namespaces
By default, the VaultWiki will expect at least four (4) namespaces in order to for all of its features to work correctly. This includes 1 main article namespace, 1 Special namespace, 1 Template namespace, and 1 Help namespace. If the optional Forum Headers feature is used, then a fifth Header namespace is also required.
Main Namespace
The main namespace is the default namespace, specified by the following values:
PHP Code:$vbulletin->options['ces_default_forumid']
Articles in the main namespace can be accessed without prefixing the namespace title in the URL. However, the main namespace is variable in Multidomain Wikis, allowing different domains to use different default settings.
Special Namespace
The Special namespace contains dynamic articles with statistical information about the rest of VaultWiki, called Special pages. In general, the Special namespace is for administrative and statistical use only.
Template Namespace
The Template namespace contains standardized text selections which can be included and modified in many articles at once quickly and easily by their authors. Editing a template will update the content of each other article that makes use of the template.
Help Namespace
The Help namespace contains articles describing the technical features of VaultWiki and its modifications and how to properly use those features. A complete list of Help topics can be accessed in Help:Contents (once documentation is completed).
Managing Namespaces
Namespaces can be added manually or by installing further modifications to VaultWiki. To manually add a namespace, simply set a forum's Vault Type to Wiki-type and make sure it does not have a Parent Forum. A namespace should ideally be open for posting, and Act as a Forum (i.e. not a vBulletin Category). When saving the namespace Forum, all child threads are automatically updated with the Namespace ID information. Although the Namespace ID should be available via the thread's namespaceid key, it can also be retrieved by backtracing the forum's Parent List using this function:
PHP Code:$thread['namespaceid'] = $vault->fetch_namespaceid($thread['forumid']);
If a namespace is ever corrupted, some statistics may not be calculated properly and articles may become completely inaccessible. If this occurs you should rebuild the Wiki Article List to fix the access problems, as well as the Link Cache to fix statistics.
In order to facilitate proper article linking among namespaces, or if the default namespace would be modified by a multi-domain setup, the Tag Map correlates namespaces to their respective BB-Code tags.
As of VaultWiki 2.x, the namespace array is automatically built on instantiation of the vB_CES_Vault class by searching vBulletin's forum cache for compatible forums:
PHP Code:$vault->namespaces = array();
$vault->fetch_namespace_array();