Namespace Manager
This is an old revision of this page, as edited February 13, 2008, 1:34 AM by pegasus(contribs). It may differ significantly from the current revision.
A namespace is the largest article container in NuWiki apart from NuWiki itself. The namespace functionality was added in the CES NuWiki Special Pages modification, 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 NuWiki Forum Mode, usually sharing its title and forum ID, referred to as the NuWiki Parent.
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
Main Namespace
The main namespace is the default namespace, specified by the following values:
PHP Code:$vbulletin->options['nuwiki_default_forumid']
$vbulletin->options['nuwiki_default_namespace']
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 defaults.
Special Namespace
The Special namespace contains dynamic articles with statistical information about the rest of NuWiki, 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 NuWiki and its modifications and how to properly use those features. A complete list of Help topics can be accessed in Help:Contents.
Managing Namespaces
Namespaces can be added manually or by installing further modifications to NuWiki. To manually add a namespace, simply set a forum's NuWiki Forum Mode to 1 or 2 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 NuWiki Parent information. Although the NuWiki Parent should be available in the thread's nuwiki_parent key, the thread's namespace ID can also be retrieved by backtracing the forum's parent list using this function:
PHP Code:$thread['nuwiki_parent'] = fetch_nuwiki_parent($thread['forumid']);
Once a namespace has been created, avoid changing it to a Child Forum. This will corrupt some cached data, breaking statistics and making some articles completely inaccessible. If this occurs you should rebuild the NuWiki 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 CES NuWiki Special Pages v2.0, the following function automatically searches vBulletin's forum cache for compatible forums, adding them to the namespace array:
PHP Code:$namespace_array = fetch_namespace_array();