Difference between revisions of "User:DivineCriticizer"

From Sun Myung Moon Archive
(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...")
 
Line 4: Line 4:
 
:''Delete this section after Charles finished making it!!!''
 
:''Delete this section after Charles finished making it!!!''
  
 +
:''Make a new namespace and include also the talk pages''
 
===We added the following code to the LocalSettings.php===
 
===We added the following code to the LocalSettings.php===
 
  // Define constants for my additional namespaces.
 
  // Define constants for my additional namespaces.

Revision as of 07:31, 16 June 2015


Instructions for Charles how to make the namespace 'Private'

Delete this section after Charles finished making it!!!
Make a new namespace and include also the talk pages

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.