LocalSettings

From ◜◝◟◞◜◝◟◞◜◝◟◞◜◝◟◞◜◝◟◞◜◝◟◞◜◝◟◞
Jump to: navigation, search

==LocalSettings.php==

<?php
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
$wgSitename = "◜◝◟◞◜◝◟◞◜◝◟◞◜◝◟◞◜◝◟◞◜◝◟◞◜◝◟◞";
$wgMetaNamespace = "Meta";
$wgServer = "http://wiki.brandonphuong.net";
$wgScriptPath = "";
    $wgArticlePath      = "/$1";
    $wgUsePathInfo      = true;
$wgScriptExtension  = ".php";
$wgLogo = "$wgResourceBasePath/resources/assets/logo.png";
$wgStylePath = "$wgScriptPath/skins";
wfLoadSkin( 'Vector' );
$wgDBtype = "mysql";
$wgDBserver = "localhost";
$wgDBname = "wiki_brandon_db";
$wgDBuser = "root";
$wgDBpassword = "****";
$wgDBprefix = "";
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
$wgDBmysql5 = false;
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = array();
$wgDiff3 = "/usr/bin/diff3";
$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
$wgUseInstantCommons = true;
$wgShellLocale = "en_US.utf8";
$wgLanguageCode = "en";
$wgSecretKey = "d807e5552acb2580b402171d6a7883bb500e460aea009da47c7d8693ce3faa93";
$wgUpgradeKey = "b4a2391e050aec89";
$wgVectorUseSimpleSearch = true;
$wgVectorUseIconWatch = true;
$wgCapitalLinks = false;
$wgUniversalEditButton = true;
$wgEnableAPI = true;
$wgCategoryMagicGallery = true;
$wgRawHtml = true;
$wgUseTidy = true;
$wgDebugToolbar = true;
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'doc',
    'xls', 'mpp', 'pdf', 'ppt', 'tiff', 'bmp', 'docx', 'xlsx', 'rtf',
    'pptx', 'ps', 'odt', 'ods', 'odp', 'odg' , 'mp4' , 'avi' , 'mpeg' , 'flv'
);
$wgMaxUploadSize = array(
    '*' => 1024 * 1024 * 50, // 50 MB
    'url' => 1024 * 1024 * 2, // 2 MB
);
$wgAllowCopyUploads = true;
$wgCopyUploadsFromSpecialUpload = true;
$wgGroupPermissions['user']['upload_by_url'] = true;
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "https://creativecommons.org/licenses/by-sa/3.0/";
$wgRightsText = "Creative Commons Attribution-ShareAlike";
$wgRightsIcon = "$wgResourceBasePath/resources/assets/licenses/cc-by-sa.png";
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "brandonphuong@gmail.com";
$wgPasswordSender = "brandonphuong@gmail.com";
$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;
function modifyToolbox( BaseTemplate $baseTemplate, array &$toolbox ) {

	static $keywords = array( 'WHATLINKSHERE', 'RECENTCHANGESLINKED', 'FEEDS', 'CONTRIBUTIONS', 'LOG', 'BLOCKIP', 'EMAILUSER', 'USERRIGHTS', 'UPLOAD', 'SPECIALPAGES', 'PRINT', 'PERMALINK', 'INFO' );

	$modifiedToolbox = array();

	// Walk in the MediaWiki:Sidebar message, section toolbox
	foreach ( $baseTemplate->data['sidebar']['TOOLBOX'] as $value ) {
		$specialLink = false;

		// Search if the keyword exists
		foreach ( $keywords as $key ) {
			if ( $value['href'] == Title::newFromText($key)->fixSpecialName()->getLinkURL() ) {
				$specialLink = true;

				// This is a keyword, hence add this special link
				if ( array_key_exists( strtolower($key), $toolbox ) ) {
					$modifiedToolbox[strtolower($key)] = $toolbox[strtolower($key)];
					break;
				}
			}
		}

		// This is a normal link
		if ( !$specialLink ) {
			$modifiedToolbox[] = $value;
		}
	}

	$toolbox = $modifiedToolbox;

	return true;
}
##########################################################################
require_once "$IP/extensions/AdminLinks/AdminLinks.php";
require_once "$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php";
wfLoadExtension( 'WikiEditor' );
require_once "$IP/extensions/Math/Math.php";
wfLoadExtension( 'Cite' );
wfLoadExtension( 'CiteThisPage' );
$wgUrlProtocols[] = "mediawiker://";
require_once "$IP/extensions/MsUpload/MsUpload.php";

require_once "$IP/extensions/UniversalLanguageSelector/UniversalLanguageSelector.php";
## Ensure MW_MATH_MATHML; is added to the $wgMathValidModes array;
$wgMathValidModes[] = MW_MATH_MATHML;
$wgDefaultUserOptions['math'] = MW_MATH_MATHML;
#Allows admin to configure the toolbox in the sidebar.
$wgHooks['BaseTemplateToolbox'][] = 'modifyToolbox';
require_once "$IP/extensions/VisualEditor/VisualEditor.php";
$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgHiddenPrefs[] = 'visualeditor-enable';
$wgVisualEditorParsoidURL = 'http://localhost:8142';
$wgVisualEditorParsoidPrefix = 'localhost';

require_once "$IP/extensions/MsLinks/MsLinks.php";

wfLoadExtension( 'PdfHandler' );
$wgPdfProcessor = 'gs';
$wgPdfPostProcessor = $wgImageMagickConvertCommand; // if defined via ImageMagick
// $wgPdfPostProcessor = 'convert'; // if not defined via ImageMagick
$wgPdfInfo = 'pdfinfo';
$wgPdftoText = 'pdftotext';
require_once "$IP/extensions/CategoryTree/CategoryTree.php";
$wgUseAjax = true;