Page MenuHomePhabricator
Paste P9215

LocalSettings_community-en.php Sample
ActivePublic

Authored by AndreiJirohOnDevsCentral on Mon, Sep 30, 5:01 AM.
<?php
# This file was automatically generated by the MediaWiki 1.33.0
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
# Some content is currently censored, such as database passwords, SMTP login credentials and more
# due to security and privacy reasons.
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
$wgSitename = "Community Discussions Wiki";
$wgMetaNamespace = "discussions-meta";
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "/community";
## The protocol and server name to use in fully-qualified URLs
$wgServer = "https://wikismadebythepins.ml";
## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath;
## The URL path to the logo. Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
## UPO means: this is also a user preference option
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "wikiadmin-support@madebythepins.x10host.com";
$wgPasswordSender = "password-reset@madebythepins.x10host.com";
$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;
## Database settings
$wgDBtype = "mysql";
$wgDBserver = "sql206.byetcluster.com";
$wgDBname = CENSORED;
$wgDBuser = CENSORED;
$wgDBpassword = CENSORED;
# MySQL specific settings
$wgDBprefix = "mwbv_";
# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
## Shared memory settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = [];
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
#$wgUseImageMagick = true;
#$wgImageMagickConvertCommand = "/usr/bin/convert";
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = true;
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
# about this MediaWiki instance. The Wikimedia Foundation shares this data
# with MediaWiki developers to help guide future development efforts.
$wgPingback = true;
## If you use ImageMagick (or any other shell command) on a
## Linux server, this will need to be set to the name of an
## available UTF-8 locale
$wgShellLocale = "en_US.utf8";
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publicly accessible from the web.
#$wgCacheDirectory = "$IP/cache";
# Site language code, should be one of the list in ./languages/data/Names.php
$wgLanguageCode = "en";
$wgSecretKey = CENSORED;
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = CENSORED;
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
$wgRightsPage = "Help:Copyright Center";
$wgRightsUrl = "https://creativecommons.org/licenses/by-sa/4.0";
$wgRightsText = "a Creative Commons Attribution-ShareAlike 4.0 Unported License";
$wgRightsIcon = "https://i.creativecommons.org/l/by-sa/4.0/88x31.png";
$wgEnableCreativeCommonsRdf = true;
$wgEnableDublinCoreRdf = true;
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
$wgDefaultSkin = "vector";
# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Timeless' );
wfLoadSkin( 'Vector' );
# End of automatically generated settings.
# Add more configuration options below.
$wgTmpDirectory = "/home/vol2_6/epizy.com/epiz_24535196/tmp_n1wni9";
# Namespaces settings should be here.
# Subpages option | Use 1 or true to allow. Otherwise, use 0 or false.
$wgNamespacesWithSubpages[NS_MAIN] = 1;
$wgNamespacesWithSubpages[NS_TEMPLATE] = true;
# Autoconfirmed accounts config
$wgAutoConfirmAge = 86400*7; // a week is required to get 'autoconfirmed' permission
$wgAutoConfirmCount = 10;
# Hooks should be placed here.
function efLoginFormMessage( &$template ) {
$template->set( 'header', "(In order to create an account, please contact the staff handling account requests at )");
return true;
}
$wgHooks['UserLoginForm'][]='efLoginFormMessage';
## For our ConfrimAccount extension, I configured this one for creating an RequestAccount special page.
$wgHooks['PersonalUrls'][] = 'onPersonalUrls';
function onPersonalUrls( array &$personal_urls, Title $title, SkinTemplate $skin ) {
// Add a link to Special:RequestAccount if a link exists for login
if ( isset( $personal_urls['login'] ) || isset( $personal_urls['anonlogin'] ) ) {
$personal_urls['createaccount'] = array(
'text' => wfMessage( 'requestaccount' )->text(),
'href' => SpecialPage::getTitleFor( 'RequestAccount' )->getFullURL()
);
}
return true;
}
# Install the extensions here, and place its configuration
# Mostly extensions support the new way of installing it after 1.27 release.
wfLoadExtension( 'CategoryTree' );
wfLoadExtension( 'Cite' );
wfLoadExtension( 'CiteThisPage' );
# Speaking of CodeEditor, some sort of configuration will be added. Please accept apologies.
wfLoadExtension( 'CodeEditor' );
$wgDefaultUserOptions['usebetatoolbar'] = 1; // user option provided by WikiEditor extension
wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ]);
$wgCaptchaClass = 'ReCaptchaNoCaptcha';
$wgReCaptchaSiteKey = '6LegtLoUAAAAAAFtqiwKKegQBLg3gsAhs0or2MDo';
$wgReCaptchaSecretKey = '6LegtLoUAAAAAOLbJJxjBZY5VLT3I_qbVBu9zGeq';
# Let's continue the messy workarounds on extensions.
wfLoadExtension( 'WikiEditor' );
wfLoadExtension( 'OATHAuth' );
wfLoadExtension( 'Gadgets' );
wfLoadExtension( 'ImageMap' );
wfLoadExtension( 'InputBox' );
wfLoadExtension( 'Interwiki' );
wfLoadExtension( 'LocalisationUpdate' );
wfLoadExtension( 'MultimediaViewer' );
wfLoadExtension( 'Nuke' );
wfLoadExtension( 'ParserFunctions' );
wfLoadExtension( 'PdfHandler' );
wfLoadExtension( 'OAuth' );
# IF the extension isn't yet supporting the new way of installating,
# use require_once "$IP/extensions/YourExtensionToBeInstalled/ExtensionScript.php";
require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
$wgConfirmAccountContact = 'account-requests@wikismadebythepins.ml';
$wgMakeUserPageFromBio = false;
$wgAutoWelcomeNewUsers = true;
$wgConfirmAccountRequestFormItems = array(
'UserName' => array( 'enabled' => true ),
'RealName' => array( 'enabled' => true ),
'Biography' => array( 'enabled' => false, 'minWords' => 50 ),
'AreasOfInterest' => array( 'enabled' => false ),
'CV' => array( 'enabled' => false ),
'Notes' => array( 'enabled' => true ),
'Links' => array( 'enabled' => false ),
'TermsOfService' => array( 'enabled' => true ),
);
# Some extensions are 'backward-compatible" when installing them.
# The following file extensions below are only allowed in this wiki.
# See MediaWiki documentation for details by clicking the link above in
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'doc',
'xls', 'mpp', 'pdf', 'ppt', 'tiff', 'bmp', 'docx', 'xlsx',
'pptx', 'ps', 'odt', 'ods', 'odp', 'odg'
);
# Configurtion for Extension:OAuth
$wgMWOAuthCentralWiki = "mwbv_";
# User permissions should be changed at this part, please start from anonynous people
# up to the admins and blah blah blah.
# Anonynous Users
$wgGroupPermissions['*']['createaccount'] = false;
# Registered users' permissions
$wgGroupPermissions['user']['createaccount'] = false;
$wgGroupPermissions['user']['oathauth-enable'] = true;
$wgGroupPermissions['user']['mwoauthmanagemygrants'] = true;
# Bureaucrats' permissions
$wgGroupPermissions['sysop']['mwoauthproposeconsumer'] = true;
$wgGroupPermissions['sysop']['mwoauthmanageconsumer '] = true;
$wgGroupPermissions['sysop']['mwoauthupdateownconsumer'] = true;
$wgGroupPermissions['sysop']['mwoauthsuppress'] = true;
$wgGroupPermissions['sysop']['mwoauthviewsuppressed '] = true;
$wgGroupPermissions['sysop']['mwoauthviewprivate'] = false;
# Custom user roles and permissions
$wgSMTP = array(
'host'=> "xo7.x10hosting.com",
'IDHost' => "madebythepins.x10host.com",
'port' => 465,
'auth' => true,
'username' => "wikiadmin-support@madebythepins.x10host.com",
'password' => CENSORED
);