Skip to content

Commit

Permalink
Create custom mardi namespaces
Browse files Browse the repository at this point in the history
cf. #392
  • Loading branch information
physikerwelt authored Sep 7, 2023
1 parent 1008a79 commit ea82c5d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions mediawiki/LocalSettings.d/mardi_namespaces.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
// Define constants for my additional namespaces.
define("NS_FORMULA", 4200); // This MUST be even.
define("NS_FORMULA_TALK", 4201); // This MUST be the following odd integer.
define("NS_PERSON", 4202);
define("NS_PERSON_TALK", 4203);

// Add namespaces.
$wgExtraNamespaces[NS_FORMULA] = "Formula";
$wgExtraNamespaces[NS_FORMULA_TALK] = "Formula_talk";
$wgExtraNamespaces[NS_PERSON] = "Person";
$wgExtraNamespaces[NS_PERSON_TALK] = "Person_talk";

$wgNamespaceProtection[NS_FORMULA] = array( 'overwriteprofilepages' );
$wgNamespaceProtection[NS_PERSON] = array( 'overwriteprofilepages' );

$wgGroupPermissions['sysop']['overwriteprofilepages'] = true;

$wgContentNamespaces[] = NS_FORMULA;
$wgContentNamespaces[] = NS_PERSON;

0 comments on commit ea82c5d

Please sign in to comment.