Page MenuHomePhabricator
Paste P10726

(An Untitled Masterwork)
ActivePublic

Authored by Reedy on Mar 19 2020, 12:34 AM.
Tags
None
Referenced Files
F31690721: raw.txt
Mar 19 2020, 12:35 AM
F31690718: raw.txt
Mar 19 2020, 12:34 AM
Subscribers
None
//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;

Event Timeline

Reedy updated the paste's language from autodetect to php.
Reedy edited the content of this paste. (Show Details)