added custom namespace and permission handling to the wiki
This commit is contained in:
parent
78f14d712d
commit
b0cdcb702e
1 changed files with 45 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ $wgImageMagickConvertCommand = "/usr/bin/convert";
|
|||
$wgAllowJavaUploads = true; // Solves problem with Office 2007 and newer files (docx, xlsx, etc.)
|
||||
$wgGroupPermissions['user']['upload'] = true; // Allow regular users to upload files
|
||||
// Make sure that the file types you want to upload are allowed:
|
||||
$wgFileExtensions = [ 'png','gif','jpg','jpeg','doc','xls','pdf','ppt','tiff','bmp','docx','xlsx','pptx' ];
|
||||
$wgFileExtensions = [ 'png','gif','jpg','jpeg','svg','doc','xls','pdf','ppt','tiff','bmp','docx','xlsx','pptx' ];
|
||||
|
||||
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
|
||||
$wgUseInstantCommons = true;
|
||||
|
|
@ -163,11 +163,42 @@ $wgRightsIcon = "";
|
|||
# Path to the GNU diff3 utility. Used for conflict resolution.
|
||||
$wgDiff3 = "/usr/bin/diff3";
|
||||
|
||||
# Costum Namespaces and permission settings
|
||||
###########################################
|
||||
|
||||
# Start with assigning the default permissions from group "user" inherited
|
||||
$wgGroupPermissions['conradgroup'] = $wgGroupPermissions['*'];
|
||||
$wgGroupPermissions['lauragroup'] = $wgGroupPermissions['*'];
|
||||
|
||||
# Namespace definition for Conrad and Laura
|
||||
# Define constants for Conrads namespace
|
||||
define("NS_CONRAD", 3000); // This MUST be even.
|
||||
define("NS_CONRAD_TALK", 3001); // This MUST be the following odd integer.
|
||||
# Define constants for Laura namespace
|
||||
define("NS_LAURA", 3002); // This MUST be even.
|
||||
define("NS_LAURA_TALK", 3003); // This MUST be the following odd integer.
|
||||
|
||||
# Add namespaces.
|
||||
$wgExtraNamespaces[NS_CONRAD] = "Conrad";
|
||||
$wgExtraNamespaces[NS_CONRAD_TALK] = "Conrad_talk"; // Note underscores in the namespace name.
|
||||
$wgExtraNamespaces[NS_LAURA] = "Laura";
|
||||
$wgExtraNamespaces[NS_LAURA_TALK] = "Laura_talk"; // Note underscores in the namespace name.
|
||||
|
||||
# The following permissions were set based on your choice in the installer
|
||||
$wgGroupPermissions['*']['createaccount'] = false;
|
||||
$wgGroupPermissions['*']['edit'] = false;
|
||||
$wgGroupPermissions['*']['read'] = false;
|
||||
|
||||
# Special permissions for User Namespaces
|
||||
$wgNamespaceProtection[NS_CONRAD] = array( 'editconrad' ); // permission "editfoo" required to edit the foo namespace
|
||||
$wgNamespacesWithSubpages[NS_CONRAD] = true; // subpages enabled for the foo namespace
|
||||
$wgGroupPermissions['conradgroup']['editconrad'] = true; // permission "editfoo" granted to users in the "sysop" group
|
||||
|
||||
# Special permissions for User Namespaces
|
||||
$wgNamespaceProtection[NS_LAURA] = array( 'editlaura' ); // permission "editfoo" required to edit the foo namespace
|
||||
$wgNamespacesWithSubpages[NS_LAURA] = true; // subpages enabled for the foo namespace
|
||||
$wgGroupPermissions['lauragroup']['editlaura'] = true; // permission "editfoo" granted to users in the "sysop" group
|
||||
|
||||
## Default skin: you can change the default skin. Use the internal symbolic
|
||||
## names, ie 'vector', 'monobook':
|
||||
$wgDefaultSkin = "timeless";
|
||||
|
|
@ -217,6 +248,12 @@ wfLoadExtension( 'WikiEditor' );
|
|||
# Add more configuration options below.
|
||||
#######################################
|
||||
|
||||
# Adding Lockdown for Page restrictions
|
||||
#######################################
|
||||
|
||||
wfLoadExtension( 'Lockdown' );
|
||||
$wgNamespacePermissionLockdown[NS_CONRAD]['view'] = [ 'user' ];
|
||||
|
||||
#wfLoadExtension( 'ClipUpload' );
|
||||
require_once "$IP/extensions/ClipUpload/ClipUpload.php";
|
||||
|
||||
|
|
@ -234,6 +271,13 @@ $wgMSU_useMsLinks = false; // Insert links in Extension:MsLinks style?
|
|||
$wgMSU_confirmReplace = true; // Show the "Replace file?" checkbox
|
||||
$wgMSU_imgParams = 'thumb|none'; // Any image parameter(s), delimited by pipes, e.g., {width}px, left, right, center, none, border, frameless, frame, thumb etc.
|
||||
|
||||
# SVG Converter Extension
|
||||
######################
|
||||
$wgSVGConverter = 'ImageMagick';
|
||||
$wgAllowTitlesInSVG = true;
|
||||
# Path to ImageMagick
|
||||
#$wgSVGConverterPath = '/usr/bin/convert';
|
||||
|
||||
# PdfHandler Extension
|
||||
######################
|
||||
wfLoadExtension( 'PdfHandler' );
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue