User:DivineCriticizer

From Sun Myung Moon Archive
Revision as of 06:56, 16 June 2015 by DivineCriticizer (talk | contribs) (Created page with " ==Instructions for Charles how to make the namespace 'Private'== :''Delete this section after Charles finished making it!!!'' ===We added the following code to the LocalSet...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Instructions for Charles how to make the namespace 'Private'

Delete this section after Charles finished making it!!!

We added the following code to the LocalSettings.php

// Define constants for my additional namespaces.
define("NS_Private", 3000); // This MUST be even.
define("NS_Private_TALK", 3001); // This MUST be the following odd integer.

// Add namespaces.
$wgExtraNamespaces[NS_Private] = "Private";
$wgExtraNamespaces[NS_Private_TALK] = "Private_talk"; // Note underscores in the namespace name.

Extension downloaded

  • Extension downloaded from MediaWiki Extension:Lockdown
  • Then placed in the extensions folder in the MediaWiki folder
  • Then added to the LocalSettings.php:
require_once "$IP/extensions/Lockdown/Lockdown.php";
  • Then added to the LocalSettings.php, to restrict reading to logged-in users:
#restrict "read" permission to logged in users
$wgNamespacePermissionLockdown[3000]['read'] = array('user');
$wgNamespacePermissionLockdown[3001]['read'] = array('user');
  • Because: Note that when restricting read-access to a namespace, the restriction can easily be circumvented if the user has write access to any other namespace: by including a read-protected page as a template, it can be made visible. To avoid this, you would have to forbid the use of pages from that namespace as templates, by adding the namespace's ID to $wgNonincludableNamespaces also the following must be added to the LocalSettings.php:
#prevent inclusion of pages from that namespace
$wgNonincludableNamespaces[] = 3000;
$wgNonincludableNamespaces[] = 3001;
Note: To make more extra namespaces, the numbers 3002 & 3003, and so on, can be used.