/usr/share/httpd/w/LocalSettings.php (1)

From RaySoft
<?php

# ------------------------------------------------------------------------------
# LocalSettings.php
# =================
#
# Project   RaySoft
# Copyright (C) 2024 by RaySoft, Zurich, Switzerland
# License   GNU General Public License (GPL) 2.0
#           https://www.gnu.org/licenses/gpl2.txt
#
# ------------------------------------------------------------------------------
#
# An index of all supported configuration settings based on the
# DefaultSettings.php file.
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
#
# ------------------------------------------------------------------------------

# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
    exit;
}

# ------------------------------------------------------------------------------
# General Settings

# This is the name of the site as displayed throughout the site.
$wgSitename = 'RaySoft';

# ------------------------------------------------------------------------------
# Server URLs and file paths

# This is the base URL that will be used to construct all internal links within
# MediaWiki.
$wgArticlePath = "/wiki/$1";

# Server name with protocol (HTTP or HTTPS) to use for links to the wiki from
# external locations, such as IRC feeds and email notifications. Must be fully
# qualified, even if $wgServer is protocol-relative.
$wgCanonicalServer = 'https://www.raysoft.ch';

# The URL of the site favicon.
$wgFavicon = '/favicon.ico';

# If you switch on server-side file caching $wgUseFileCache = true;, then you
# can use this variable to specify where the cached pages will be saved on your
# server filesystem.
$wgFileCacheDirectory = "$IP/cache";

# If this setting true, when an insecure HTTP request is received, always
# redirect to HTTPS.
$wgForceHTTPS = true;

# The base path in a URL, used to build URLs to refer to other parts of this
# wiki.
$wgScriptPath = '/w';

# The base URL of the server, including protocol but without the trailing slash
# and without the subdirectory if any (e.g., https://www.mediawiki.org). Since
# version 1.18.0 MediaWiki also supports setting $wgServer to a protocol-
# relative URL (e.g., //www.mediawiki.org). This is used for supporting both
# HTTP and HTTPS with the same caches by using links that work under both
# protocols.
$wgServer = '//www.raysoft.ch';

# The URL of the skins directory. This is where MediaWiki tells the browser to
# get the styles from.
$wgStylePath = "$wgScriptPath/skins";

# Whether to use 'pretty' URLs.
# https://www.mediawiki.org/wiki/Manual:Short_URL
$wgUsePathInfo = true;

# ------------------------------------------------------------------------------
# Files and file uploads

# When set to true, users will be allowed to upload images and other enabled
# files.
$wgEnableUploads = true;

# $wgFileExtensions is the list of allowed/preferred extensions for uploading
# files.
$wgFileExtensions = array( 'jpg', 'pdf', 'png' );

# - ImageMagick

# Set to the command used to invoke ImageMagick.
$wgImageMagickConvertCommand = '/usr/local/bin/convert';

# Resizing can be done using PHP's internal image libraries, or using
# ImageMagick or another third-party converter, e.g. GraphicMagick.
$wgUseImageMagick = true;

# ------------------------------------------------------------------------------
# Email settings

# Set to true to enable email authentication: all email functions (except
# requesting a password reminder email) only work for authenticated (confirmed)
# email addresses.
$wgEmailAuthentication = false;

# This allows the site administrator to specify an email address that the wiki
# can contact if something goes wrong.
$wgEmergencyContact = 'alex@raysoft.loc';

# Set to true to enable the basic email features: Password reminders, etc.
$wgEnableEmail = false;

# Set to true to enable user-to-user email via Special:Emailuser.
$wgEnableUserEmail = false;

# Password reminder email address. The address we should use as sender when a
# user is requesting his password. Also used as the sender address for other
# email notifications.
$wgPasswordSender = 'alex@raysoft.loc';

# - Email notification (Enotif) settings

# Set to true to allow email notifications to a user when someone else edits the
# user's talk page.
$wgEnotifUserTalk = false;

# Set to true to allow email notification for watched pages.
$wgEnotifWatchlist = false;

# ------------------------------------------------------------------------------
# Database settings

# Name of the database used by current installation of MediaWiki.
$wgDBname = 'raysoft';

# The password for $wgDBuser.
$wgDBpassword = '******************************';

# Table name prefix.
$wgDBprefix = '';

# Database host name or IP address.
$wgDBserver = 'raysoft.loc';

# Type of database.
$wgDBtype = 'mysql';

# Database username.
$wgDBuser = 'alex';

# - MySQL-specific

# MySQL table options to use during installation or update.
$wgDBTableOptions = 'ENGINE=InnoDB, DEFAULT CHARSET=binary';

# ------------------------------------------------------------------------------
# Cache

# This directory stores some cache files specific for a given wiki, which means
# wiki farms should have one such directory per wiki.
$wgCacheDirectory = "$IP/cache";

# Setting this to true will invalidate all cached pages whenever
# LocalSettings.php is changed.
$wgInvalidateCacheOnLocalSettingsChange = true;

# Allows to configure the object cache used.
$wgMainCacheType = CACHE_ACCEL;

# The cache type for storing session data.
$wgSessionCacheType = CACHE_DB;

# - File Cache

# Set to true to activate the server-side file cache. The cache consists of
# static HTML pages that are served to unregistered viewers to reduce database
# traffic.
$wgUseFileCache = true;

# - Message Cache

# Message cache setting.
$wgMessageCacheType = CACHE_ACCEL;

# - Sidebar Cache

# If true, cache the sidebar navigation links.
$wgEnableSidebarCache = true;

# - Parser Cache

# Parser cache setting.
$wgParserCacheType = CACHE_ACCEL;

# ------------------------------------------------------------------------------
# Language, regional and character encoding settings

# The site language code is usually set automatically with the installer.
$wgLanguageCode = 'en';

# ------------------------------------------------------------------------------
# Output format and skin settings

# - Skins

# This setting sets the default skin and should be set to the lowercase name of
# the skin (e.g. 'monobook', not 'MonoBook').
$wgDefaultSkin = 'vector-2022';

# ------------------------------------------------------------------------------
# ResourceLoader

# Many wikis use pages like MediaWiki:Common.css to create a custom 'theme' for
# their wiki.
$wgAllowSiteCSSOnRestrictedPages = true;

# ------------------------------------------------------------------------------
# Page titles and redirects

# Set this to false to avoid forcing the first letter of page titles (including
# included pages, images and categories) to capitals.
$wgCapitalLinks = false;

# - Namespaces

# The name of the meta namespace (also known as the project namespace), used for
# pages regarding the wiki itself.
$wgMetaNamespace = 'RaySoft';

# ------------------------------------------------------------------------------
# Parser

# Set a default target for external links. If set to e.g. "_blank", this will
# also set the "noreferrer" and "noopener" link rel to prevent the attack
# described at https://mathiasbynens.github.io/rel-noopener/.
$wgExternalLinkTarget = '_blank';

# ------------------------------------------------------------------------------
# User accounts, authentication

# Specifies various settings related to password strength and security.
$wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 12;

# ------------------------------------------------------------------------------
# User rights, access control and monitoring

# $wgGroupPermissions is a two-dimensional array indexed by user group and
# available permissions. The value can be either true to grant the permission or
# false if it should not be granted.
$wgGroupPermissions['*']['createaccount']   = false;
$wgGroupPermissions['*']['edit']            = false;
$wgGroupPermissions['sysop']['editsitecss'] = true;

# ------------------------------------------------------------------------------
# Security

# This should always be customized to a secret, unique string.
$wgSecretKey = '******************************';

# ------------------------------------------------------------------------------
# Profiling, testing and debugging

# - Debug

# If set to true, uncaught exceptions will print a complete stack trace to
# output. This should only be used for debugging, as it may reveal private
# information in function parameters due to PHP's backtrace formatting.
$wgShowExceptionDetails = true;

# ------------------------------------------------------------------------------
# Search

# Array of namespace IDs to generate a sitemap for when the
# maintenance/generateSitemap.php script is run, or false if one is to be
# generated for all namespaces.
$wgSitemapNamespaces = array( 0, 6, 14 );

# ------------------------------------------------------------------------------
# Edit user interface

# Path to the GNU diff3 utility.
$wgDiff3 = '/usr/bin/diff3';

# ------------------------------------------------------------------------------
# Maintenance Scripts setting

# When overridden in LocalSettings.php, this setting allows you to run upgrades
# from the web interface. The value of this variable serves as a password
# protecting the upgrade script.
$wgUpgradeKey = '******************************';

# ------------------------------------------------------------------------------
# Recent changes, new pages, watchlist and history

# Disable links to talk pages of anonymous users (IPs) in listings on special
# pages like page history, recent changes, etc.
$wgDisableAnonTalk = true;

# Use new pages patrolling to check for vandalism.
$wgUseNPPatrol = false;

# Use recent changes patrolling to check for vandalism. If set to false,
# exclamation points will no longer appear in recent changes next to
# unpatrolled edits.
$wgUseRCPatrol = false;

# ------------------------------------------------------------------------------
# Category

# The setting determines what collation algorithm should be used to sort
# category listings.
$wgCategoryCollation = 'uca-de';

# ------------------------------------------------------------------------------
# Jobs

# Number of jobs to perform per request. May be less than one in which case
# jobs are performed or not performed based on probability. If this is zero,
# jobs will not be done during ordinary apache requests. In this case,
# maintenance/runJobs.php should be run periodically.
$wgJobRunRate = 0;

# ------------------------------------------------------------------------------
# Extensions

# - Enable extensions

wfLoadExtension( 'Cite' );
wfLoadExtension( 'DynamicPageList3' );
wfLoadExtension( 'OATHAuth' );
wfLoadExtension( 'ParserFunctions' );
wfLoadExtension( 'ReplaceText' );
wfLoadExtension( 'SyntaxHighlight_GeSHi' );

# - DynamicPageList

# Set this to true to ignore 'maxCategoryCount' and allow unlimited categories.
# Please note that large amounts of categories in a query can slow down or crash
# servers.
$wgDplSettings['allowUnlimitedCategories'] = false;

# Maximum number of categories to allow in queries.
$wgDplSettings['maxCategoryCount'] = 10;

# Set this to true to ignore 'maxResultCount' and allow unlimited results.
# Please note that large result sets may result in slow or failed page loads.
$wgDplSettings['allowUnlimitedResults'] = false;

# Maximum number of results to return from a query.
$wgDplSettings['maxResultCount'] = 200;

# Set this to true to ignore 'allowcachedresults' and always enable the parser
# cache.
$wgDplSettings['alwaysCacheResults'] = false;

# Configure query cache time. The query cache cannot be purged. Suggested value 
# between 30 to 600.
$wgDplSettings['queryCacheTime'] = 600;

# - ParserFunctions

# Allows to activate the integrated string function functionality.
$wgPFEnableStringFunctions = true;

# ------------------------------------------------------------------------------
# Skins

# - Enable skins

wfLoadSkin( 'Vector' );

# ------------------------------------------------------------------------------

?>