Page MenuHomePhabricator
Authored By
Reedy
Mar 19 2020, 12:34 AM
Size
1 KB
Referenced Files
None
Subscribers
None
<?php
//Define constants for my additional namespaces.
//NOTE: Most website info is between 100-199.
//Plugins for wiki go from 200-2999. So we start at 3000.
//The ceiling of this value is 32767.
define("NS_POLICY", 3000); //This MUST be even.
define("NS_POLICY_TALK", 3001); //This MUST be the following odd integer.
define("NS_PROCEDURE", 3002);
define("NS_PROCEDURE_TALK", 3003);
define("NS_METHOD", 3004);
define("NS_METHOD_TALK", 3005);
//additional content
$wgContentNamespaces = [NS_POLICY, NS_PROCEDURE, NS_METHOD, NS_MAIN];
//Add Namespaces.
$wgExtraNamespaces[NS_POLICY] = "Policy";
$wgExtraNamespaces[NS_POLICY_TALK] = "Policy_Talk"; // Note underscores in the namespace name.
$wgExtraNamespaces[NS_PROCEDURE] = "Proceedure";
$wgExtraNamespaces[NS_PROCEDURE_TALK] = "Proceedure_Talk";
$wgExtraNamespaces[NS_METHOD] = "Method";
$wgExtraNamespaces[NS_METHOD_TALK] = "Method_Talk";
//Namespace Protection
$wgNamespaceProtection[NS_POLICY] = array( 'editpolicy' );
$wgNamespaceProtection[NS_PROCEDURE] = array( 'editprocedure' );
$wgNamespaceProtection[NS_METHOD] = array( 'editmethod' );
//Enable namespace subpages
$wgNamespaceWithSubpages[NS_POLICY] = true;
$wgNamespaceWithSubpages[NS_PROCEDURE] = true;
$wgNamespaceWithSubpages[NS_METHOD] = true;

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8355946
Default Alt Text
raw.txt (1 KB)

Event Timeline