Différences entre versions de « Extension:SyntaxHighlight »

De Mi caja de notas

Balise : Contenu remplacé
Ligne 15 : Ligne 15 :
  
 
== [[LocalSettings.php]] ==
 
== [[LocalSettings.php]] ==
−
Voici le fichier de configuration de ce wiki au 4 novembre 2019
 
  
−
<syntaxhighlight lang="php" line='line'>
 
−
 
−
<?php
 
−
# This file was automatically generated by the MediaWiki 1.23.5
 
−
# 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;
 
−
}
 
−
 
−
## Uncomment this to disable output compression
 
−
# $wgDisableOutputCompression = true;
 
−
 
−
$wgSitename = "wikiducamp";
 
−
$wgMetaNamespace = "Projet";
 
−
 
−
## Le chemin de base URL vers le dossier contenant le wiki;
 
−
## defaults for all runtime URL paths are based off of this.
 
−
## Pour plus d'informations sur la personnalisation des URLs regardez SVP :
 
−
## http://www.mediawiki.org/wiki/Manual:Short_URL
 
−
$wgScriptPath = "";
 
−
$wgScriptExtension = ".php";
 
−
$wgArticlePath = "/$1";
 
−
$wgUsePathInfo = true;
 
−
 
−
# (enjoliver URL via indieweb.org/Mediawiki-customization)
 
−
# $wgCapitalLinks = false;
 
−
 
−
## Le protocole et le nom du serveur à utiliser dans les URLs pleinement qualifiées
 
−
$wgServer = "https://ducamp.me";
 
−
 
−
## Le chemin relatif URL vers le dossier des skins
 
−
$wgStylePath = "$wgScriptPath/skins";
 
−
 
−
## Le chemin relatif URL vers le logo. Assurez de modifier ça à partir du défaut,
 
−
## ou sinon vous écraserez votre logo lors de la mise à jour !
 
−
$wgLogo = "$wgStylePath/common/images/graisse-chassis.png";
 
−
 
−
## UPO signifie : c'est aussi une option de préférence utilisateur
 
−
 
−
$wgEnableEmail = true;
 
−
$wgEnableUserEmail = true; # UPO
 
−
 
−
$wgEmergencyContact = "christophe@ducamp.me";
 
−
$wgPasswordSender = "christophe@ducamp.me";
 
−
 
−
$wgEnotifUserTalk = false; # UPO
 
−
$wgEnotifWatchlist = false; # UPO
 
−
$wgEmailAuthentication = true;
 
−
 
−
## Database settings
 
−
$wgDBtype = "mysql";
 
−
$wgDBserver = "localhost";
 
−
$wgDBname = "monwiki";
 
−
$wgDBuser = "monwiki";
 
−
$wgDBpassword = "dugVpN2F";
 
−
 
−
# MySQL specific settings
 
−
$wgDBprefix = "";
 
−
 
−
# MySQL table options to use during installation or update
 
−
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
 
−
 
−
# Experimental charset support for MySQL 5.0.
 
−
$wgDBmysql5 = false;
 
−
 
−
## Shared memory settings
 
−
$wgMainCacheType = CACHE_NONE;
 
−
$wgMemCachedServers = array();
 
−
 
−
## Pour autoriser le televersement d'images, assurez vous que le répertoire 'images'
 
−
## soit writable, puis réglez sur true:
 
−
$wgEnableUploads = true;
 
−
$wgUseImageMagick = true;
 
−
$wgImageMagickConvertCommand = "/usr/bin/convert";
 
−
 
−
 
−
# InstantCommons permet au wiki d'utiliser les images provenant de http://commons.wikimedia.org
 
−
$wgUseInstantCommons = true;
 
−
 
−
## Si vous utilisez ImageMagick (ou toute autre commande shell) sur un serveur
 
−
## Linux, this will need to be set to the name of an
 
−
## available UTF-8 locale
 
−
$wgShellLocale = "en_US.utf8";
 
−
 
−
## If you want to use image uploads under safe mode,
 
−
## create the directories images/archive, images/thumb and
 
−
## images/temp, and make them all writable. Then uncomment
 
−
## this, if it's not already uncommented:
 
−
#$wgHashedUploadDirectory = false;
 
−
 
−
## Set $wgCacheDirectory to a writable directory on the web server
 
−
## to make your wiki go slightly faster. The directory should not
 
−
## be publically accessible from the web.
 
−
#$wgCacheDirectory = "$IP/cache";
 
−
 
−
# Site language code, should be one of the list in ./languages/Names.php
 
−
$wgLanguageCode = "fr";
 
−
 
−
$wgSecretKey = "9652b3afe249ec6722ba428622df08a128ef0b0d6c2cf309c358787df1653dc9";
 
−
 
−
# Site upgrade key. Must be set to a string (default provided) to turn on the
 
−
# web installer while LocalSettings.php is in place
 
−
$wgUpgradeKey = "acd224e9eeb6b2f1";
 
−
 
−
## Skin par défaut : vous pouvez modifier la skin par défaut. Utilisez les noms de symboles
 
−
## internes, c-a-d. 'cologneblue', 'monobook', 'vector':
 
−
$wgDefaultSkin = "vector";
 
−
 
−
wfLoadSkin( 'MonoBook' );
 
−
wfLoadSkin( 'Timeless' );
 
−
wfLoadSkin( 'Vector' );
 
−
 
−
 
−
## Pour accrocher des metadonnees de licence aux pages, et afficher une
 
−
## notice appropriee / icone de copyright. GNU Free Documentation
 
−
## License and Creative Commons licenses are supported so far.
 
−
$wgEnableCreativeCommonsRdf = true;
 
−
$wgRightsPage = "WikiDucamp:Copyrights"; # Mettre ici le titre d'une page wiki qui décrit votre licence/copyright
 
−
$wgRightsUrl = "http://creativecommons.org/publicdomain/zero/1.0/";
 
−
$wgRightsText = "a CC0 public domain dedication";
 
−
$wgRightsIcon = "https://i.creativecommons.org/p/zero/1.0/88x31.png";
 
−
 
−
# Chemin vers utilitaire GNU diff3. utilisé pour la résolution de conflit.
 
−
$wgDiff3 = "/usr/bin/diff3";
 
−
 
−
# Extensions activees. La plupart des extensions sont activees en incluant ici le fichier de base de l'extension
 
−
# mais verifier la documentation specifique de l'extension pour plus de details
 
−
# Les extensions suivantes ont été automatiquement activées :
 
−
 
−
require_once "$IP/extensions/InputBox/InputBox.php";
 
−
require_once "$IP/extensions/Interwiki/Interwiki.php";
 
−
require_once "$IP/extensions/Nuke/Nuke.php";
 
−
require_once "$IP/extensions/Poem/Poem.php";
 
−
 
−
# Fin des reglages automatiquement generes.
 
−
 
−
# Ajouter en-dessous les options de configuration.
 
−
 
−
wfLoadExtension( 'Cite' );
 
−
wfLoadExtension( 'ParserFunctions' );
 
−
wfLoadExtension( 'Auth_remoteuser' );
 
−
wfLoadExtension( 'CategoryTree' );
 
−
wfLoadExtension( 'ConfirmEdit' );
 
−
wfLoadExtension( 'Gadgets' );
 
−
wfLoadExtension( 'ImageMap' );
 
−
wfLoadExtension( 'LocalisationUpdate' );
 
−
$wgLocalisationUpdateDirectory = "$IP/cache";
 
−
wfLoadExtension( 'WikiEditor' );
 
−
$wgHiddenPrefs[] = 'usebetatoolbar';
 
−
wfLoadExtension( 'HeaderTabs' );
 
−
wfLoadExtension( 'SpamBlacklist' );
 
−
wfLoadExtension( 'TitleBlacklist' );
 
−
wfLoadExtension( 'PdfHandler' );
 
−
 
−
# Extensions IndieWeb
 
−
 
−
require_once('extensions/IndieWeb/raw.php');
 
−
require_once('extensions/IndieWeb/notitle.php');
 
−
require_once('extensions/IndieWeb/AllowAnchorTags.php');
 
−
require_once('extensions/IndieWeb/Calendar.php');
 
−
 
−
# require_once('extensions/IndieWeb/RelWebmention.php');
 
−
# require_once('extensions/IndieWeb/LassoAuth.php');
 
−
 
−
# LassoAuth::$auth = 'https://sso.indieweb.org/';
 
−
# LassoAuth::$wiki = 'https://indieweb.org/';
 
−
 
−
# Droits utilisateurs IndieWeb
 
−
$wgGroupPermissions['*']['read'] = true;
 
−
$wgGroupPermissions['*']['edit'] = false;
 
−
$wgGroupPermissions['*']['createaccount'] = false;
 
−
$wgGroupPermissions['*']['autocreateaccount'] = true;
 
−
$wgGroupPermissions['user']['move'] = true;
 
−
$wgGroupPermissions['user']['movefile'] = true;
 
−
$wgGroupPermissions['user']['delete'] = true;
 
−
$wgGroupPermissions['user']['undelete'] = true;
 
−
$wgGroupPermissions['user']['browsearchive'] = true;
 
−
$wgGroupPermissions['user']['rollback'] = true;
 
−
$wgDefaultUserOptions ['editsection'] = true;
 
−
$wgAllowUserSkin = true;
 
−
$wgAllowUserCss = true;
 
−
$wgAllowUserJs = true;
 
−
 
−
# Mise en valeur syntaxe
 
−
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
 
−
 
−
 
−
# Gestion des groupes utilisateurs : droits de modifier - interdire éditions aux utilisateurs non enregistres.
 
−
 
−
# $wgGroupPermissions['*']['edit'] = false;
 
−
# $wgEmailConfirmToEdit = true;
 
−
# $wgGroupPermissions['user']['edit'] = true;
 
−
 
−
# Permission de création de comptes uniquement
 
−
# $wgGroupPermissions['*']['createaccount'] = false;
 
−
$wgGroupPermissions['sysop']['createaccount'] = true;
 
−
 
−
## Permission de modifier l'interwiki
 
−
## Pour créer des droits pour les groupes d'utilisateurs qui puissent modifier la data interwiki
 
−
require_once( "extensions/Interwiki/Interwiki.php" );
 
−
 
−
# Pour donner des permissions aux sysops de modifier la data interwiki
 
−
$wgGroupPermissions['sysop']['interwiki'] = true;
 
−
 
−
# (les bureaucrates pourront ajouter des utilisateurs à ce groupe)
 
−
$wgGroupPermissions['bureaucrats']['interwiki'] = true;
 
−
 
−
 
−
#Extension:Youtube
 
−
wfLoadExtension( 'YouTube' );
 
−
 
−
//Bandeau site
 
−
$wgSiteNotice = "==IndieWeb Learning Zone==";
 
−
 
−
#Html ok
 
−
# $wgRawHtml['sysop'] = true; (inoperant sur v 1.3)
 
−
wfLoadExtension( 'SaferHTMLTag' );
 
−
$wgGroupPermissions['sysop']['edit-html'] = true; // Enable in-wiki HTML editing for sysops.
 
−
 
−
#Image Tag
 
−
$wgAllowImageTag = true;
 
−
 
−
 
−
// Transclusion
 
−
$wgEnableScaryTranscluding = true;
 
−
 
−
# MSUpload pour téléverser plusieurs fichiers par glisser déposer
 
−
wfLoadExtension( 'MsUpload' );
 
−
 
−
$wgMSU_useDragDrop = true; // Should the drag & drop area be shown? (Not set by default)
 
−
$wgMSU_showAutoCat = true; // Files uploaded while editing a category page will be added to that category
 
−
$wgMSU_checkAutoCat = true; // Whether the checkbox for adding a category to a page is checked by default
 
−
$wgMSU_useMsLinks = false; // Insert links in Extension:MsLinks style?
 
−
$wgMSU_confirmReplace = true; // Show the "Replace file?" checkbox
 
−
$wgMSU_imgParams = 'thumb|none'; // Any image parameter separated by a semicolon. Examples are: {width}px, left, right, center, none, border, frameless, frame, thumb etc etc
 
−
$wgEnableWriteAPI = true; // Enable the API
 
−
$wgEnableUploads = true; // Enable uploads
 
−
$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 = array('png','svg','gif','jpg','jpeg','doc','xls','pdf','ppt','tiff','bmp','docx','xlsx','pptx');
 
−
 
−
 
−
#Afficher des images externes
 
−
$wgAllowExternalImagesFrom = array( 'http://upload.wikimedia.org', 'http://vicnent.com' , 'http://www.flickr.com' );
 
−
 
−
 
−
# Twitter Login fonctionnel selon navigateurs
 
−
# require_once "$IP/extensions/TwitterLogin/TwitterLogin.php";
 
−
# include_once("$IP/extensions/TwitterLogin/TwitterLogin.php");
 
−
# $wgConsumerKey = 'W7q5lP4UEtEe9bjeec6j3z83n';
 
−
# $wgConsumerSecret = 'lHimEftsr0UFLUTD2Jn6mP2CQaP4Ha5iPd1mOo671VlSnPuZLS';
 
−
 
−
# Header Tabs (onglets titres)
 
−
#require_once "$IP/extensions/HeaderTabs/HeaderTabs.php";
 
−
$htEditTabLink= false;
 
−
 
−
## Lecture seule
 
−
# $wgReadOnly = 'Maintenance du Site - Chantier Sauvegarde';
 
−
 
−
# Retirer l'onglet discussion
 
−
function RemoveVectorTabs( SkinTemplate &$sktemplate, array &$links ) {
 
−
        global $wgUser, $wgHVTFUUviewsToRemove;
 
−
        if ( isset( $links['namespaces']['talk'] ))
 
−
                unset( $links['namespaces']['talk'] );
 
−
        return true;
 
−
}
 
−
$wgHooks['SkinTemplateNavigation'][] = 'RemoveVectorTabs';
 
−
 
−
# Extension TemplateData
 
−
#require_once "$IP/extensions/TemplateData/TemplateData.php";
 
−
// Set this to true to enable the TemplateData GUI editor
 
−
$wgTemplateDataUseGUI = true;
 
−
 
−
# Extension Bootstrap-skin
 
−
#require_once "$IP/extensions/BootstrapExtension.php";
 
−
 
−
# Voir les détails des erreurs
 
−
#$wgShowExceptionDetails = true;
 
−
 
−
</syntaxhighlight>
 
 
----
 
----
 
{{:mw:Extension:SyntaxHighlight/fr}}
 
{{:mw:Extension:SyntaxHighlight/fr}}

Version du 4 novembre 2019 à 20:10

Une extension de MediaWiki pour la mise en valeur de syntaxe

Usage avec `syntaxhighlight`

1 def quickSort(arr):
2 	less = []
3 	pivotList = []
4 	more = []
5 	if len(arr) <= 1:
6 		return arr
7 	else:
8 		pass

LocalSettings.php