Différences entre versions de « Extension:SyntaxHighlight »

De Mi caja de notas

(Page créée avec « Mise en valeur de syntaxe : == Usage avec `syntaxhighlight`== <syntaxhighlight lang="Python" line='line'> def quickSort(arr): less = [] pivotList = [] more = [] if... »)
 
Ligne 1 : Ligne 1 :
Mise en valeur de syntaxe :
+
Une extension de MediaWiki pour la mise en valeur de syntaxe
 
 
  
 
== Usage avec `syntaxhighlight`==
 
== Usage avec `syntaxhighlight`==
Ligne 312 : Ligne 311 :
 
</syntaxhighlight>
 
</syntaxhighlight>
 
----
 
----
{{:mediawikiwiki:Extension:SyntaxHighlight/fr}}
+
{{:mw:Extension:SyntaxHighlight/fr}}

Version du 4 novembre 2019 à 20:09

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

Voici le fichier de configuration de ce wiki au 4 novembre 2019

  1 <?php
  2 # This file was automatically generated by the MediaWiki 1.23.5
  3 # installer. If you make manual changes, please keep track in case you
  4 # need to recreate them later.
  5 #
  6 # See includes/DefaultSettings.php for all configurable settings
  7 # and their default values, but don't forget to make changes in _this_
  8 # file, not there.
  9 #
 10 # Further documentation for configuration settings may be found at:
 11 # https://www.mediawiki.org/wiki/Manual:Configuration_settings
 12 
 13 # Protect against web entry
 14 if ( !defined( 'MEDIAWIKI' ) ) {
 15 	exit;
 16 }
 17 
 18 ## Uncomment this to disable output compression
 19 # $wgDisableOutputCompression = true;
 20 
 21 $wgSitename = "wikiducamp";
 22 $wgMetaNamespace = "Projet";
 23 
 24 ## Le chemin de base URL vers le dossier contenant le wiki;
 25 ## defaults for all runtime URL paths are based off of this.
 26 ## Pour plus d'informations sur la personnalisation des URLs regardez SVP :
 27 ## http://www.mediawiki.org/wiki/Manual:Short_URL
 28 $wgScriptPath = "";
 29 $wgScriptExtension = ".php";
 30 $wgArticlePath = "/$1";
 31 $wgUsePathInfo = true;
 32 
 33 # (enjoliver URL via indieweb.org/Mediawiki-customization)
 34 # $wgCapitalLinks = false;
 35 
 36 ## Le protocole et le nom du serveur à utiliser dans les URLs pleinement qualifiées
 37 $wgServer = "https://ducamp.me";
 38 
 39 ## Le chemin relatif URL vers le dossier des skins
 40 $wgStylePath = "$wgScriptPath/skins";
 41 
 42 ## Le chemin relatif URL vers le logo. Assurez de modifier ça à partir du défaut,
 43 ## ou sinon vous écraserez votre logo lors de la mise à jour !
 44 $wgLogo = "$wgStylePath/common/images/graisse-chassis.png";
 45 
 46 ## UPO signifie : c'est aussi une option de préférence utilisateur
 47 
 48 $wgEnableEmail = true;
 49 $wgEnableUserEmail = true; # UPO
 50 
 51 $wgEmergencyContact = "christophe@ducamp.me";
 52 $wgPasswordSender = "christophe@ducamp.me";
 53 
 54 $wgEnotifUserTalk = false; # UPO
 55 $wgEnotifWatchlist = false; # UPO
 56 $wgEmailAuthentication = true;
 57 
 58 ## Database settings
 59 $wgDBtype = "mysql";
 60 $wgDBserver = "localhost";
 61 $wgDBname = "monwiki";
 62 $wgDBuser = "monwiki";
 63 $wgDBpassword = "dugVpN2F";
 64 
 65 # MySQL specific settings
 66 $wgDBprefix = "";
 67 
 68 # MySQL table options to use during installation or update
 69 $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
 70 
 71 # Experimental charset support for MySQL 5.0.
 72 $wgDBmysql5 = false;
 73 
 74 ## Shared memory settings
 75 $wgMainCacheType = CACHE_NONE;
 76 $wgMemCachedServers = array();
 77 
 78 ## Pour autoriser le televersement d'images, assurez vous que le répertoire 'images' 
 79 ## soit writable, puis réglez sur true:
 80 $wgEnableUploads = true;
 81 $wgUseImageMagick = true;
 82 $wgImageMagickConvertCommand = "/usr/bin/convert";
 83 
 84 
 85 # InstantCommons permet au wiki d'utiliser les images provenant de http://commons.wikimedia.org
 86 $wgUseInstantCommons = true;
 87 
 88 ## Si vous utilisez ImageMagick (ou toute autre commande shell) sur un serveur
 89 ## Linux, this will need to be set to the name of an
 90 ## available UTF-8 locale
 91 $wgShellLocale = "en_US.utf8";
 92 
 93 ## If you want to use image uploads under safe mode,
 94 ## create the directories images/archive, images/thumb and
 95 ## images/temp, and make them all writable. Then uncomment
 96 ## this, if it's not already uncommented:
 97 #$wgHashedUploadDirectory = false;
 98 
 99 ## Set $wgCacheDirectory to a writable directory on the web server
100 ## to make your wiki go slightly faster. The directory should not
101 ## be publically accessible from the web.
102 #$wgCacheDirectory = "$IP/cache";
103 
104 # Site language code, should be one of the list in ./languages/Names.php
105 $wgLanguageCode = "fr";
106 
107 $wgSecretKey = "9652b3afe249ec6722ba428622df08a128ef0b0d6c2cf309c358787df1653dc9";
108 
109 # Site upgrade key. Must be set to a string (default provided) to turn on the
110 # web installer while LocalSettings.php is in place
111 $wgUpgradeKey = "acd224e9eeb6b2f1";
112 
113 ## Skin par défaut : vous pouvez modifier la skin par défaut. Utilisez les noms de symboles 
114 ## internes, c-a-d. 'cologneblue', 'monobook', 'vector':
115 $wgDefaultSkin = "vector";
116 
117 wfLoadSkin( 'MonoBook' );
118 wfLoadSkin( 'Timeless' );
119 wfLoadSkin( 'Vector' );
120 
121 
122 ## Pour accrocher des metadonnees de licence aux pages, et afficher une 
123 ## notice appropriee / icone de copyright. GNU Free Documentation
124 ## License and Creative Commons licenses are supported so far.
125 $wgEnableCreativeCommonsRdf = true;
126 $wgRightsPage = "WikiDucamp:Copyrights"; # Mettre ici le titre d'une page wiki qui décrit votre licence/copyright
127 $wgRightsUrl = "http://creativecommons.org/publicdomain/zero/1.0/";
128 $wgRightsText = "a CC0 public domain dedication";
129 $wgRightsIcon = "https://i.creativecommons.org/p/zero/1.0/88x31.png";
130 
131 # Chemin vers utilitaire GNU diff3. utilisé pour la résolution de conflit.
132 $wgDiff3 = "/usr/bin/diff3";
133 
134 # Extensions activees. La plupart des extensions sont activees en incluant ici le fichier de base de l'extension
135 # mais verifier la documentation specifique de l'extension pour plus de details
136 # Les extensions suivantes ont été automatiquement activées :
137 
138 require_once "$IP/extensions/InputBox/InputBox.php";
139 require_once "$IP/extensions/Interwiki/Interwiki.php";
140 require_once "$IP/extensions/Nuke/Nuke.php";
141 require_once "$IP/extensions/Poem/Poem.php";
142 
143 # Fin des reglages automatiquement generes.
144 
145 # Ajouter en-dessous les options de configuration.
146 
147 wfLoadExtension( 'Cite' );
148 wfLoadExtension( 'ParserFunctions' );
149 wfLoadExtension( 'Auth_remoteuser' );
150 wfLoadExtension( 'CategoryTree' );
151 wfLoadExtension( 'ConfirmEdit' );
152 wfLoadExtension( 'Gadgets' );
153 wfLoadExtension( 'ImageMap' );
154 wfLoadExtension( 'LocalisationUpdate' );
155 $wgLocalisationUpdateDirectory = "$IP/cache";
156 wfLoadExtension( 'WikiEditor' );
157 $wgHiddenPrefs[] = 'usebetatoolbar';
158 wfLoadExtension( 'HeaderTabs' );
159 wfLoadExtension( 'SpamBlacklist' );
160 wfLoadExtension( 'TitleBlacklist' );
161 wfLoadExtension( 'PdfHandler' );
162 
163 # Extensions IndieWeb
164 
165 require_once('extensions/IndieWeb/raw.php');
166 require_once('extensions/IndieWeb/notitle.php');
167 require_once('extensions/IndieWeb/AllowAnchorTags.php');
168 require_once('extensions/IndieWeb/Calendar.php');
169 
170 # require_once('extensions/IndieWeb/RelWebmention.php');
171 # require_once('extensions/IndieWeb/LassoAuth.php');
172 
173 # LassoAuth::$auth = 'https://sso.indieweb.org/';
174 # LassoAuth::$wiki = 'https://indieweb.org/';
175 
176 # Droits utilisateurs IndieWeb 
177 $wgGroupPermissions['*']['read'] = true;
178 $wgGroupPermissions['*']['edit'] = false;
179 $wgGroupPermissions['*']['createaccount'] = false;
180 $wgGroupPermissions['*']['autocreateaccount'] = true;
181 $wgGroupPermissions['user']['move'] = true;
182 $wgGroupPermissions['user']['movefile'] = true;
183 $wgGroupPermissions['user']['delete'] = true;
184 $wgGroupPermissions['user']['undelete'] = true;
185 $wgGroupPermissions['user']['browsearchive'] = true;
186 $wgGroupPermissions['user']['rollback'] = true;
187 $wgDefaultUserOptions ['editsection'] = true;
188 $wgAllowUserSkin = true;
189 $wgAllowUserCss = true;
190 $wgAllowUserJs = true;
191 
192 # Mise en valeur syntaxe 
193 wfLoadExtension( 'SyntaxHighlight_GeSHi' );
194 
195 
196 # Gestion des groupes utilisateurs : droits de modifier - interdire éditions aux utilisateurs non enregistres. 
197 
198 # $wgGroupPermissions['*']['edit'] = false; 
199 # $wgEmailConfirmToEdit = true;
200 # $wgGroupPermissions['user']['edit'] = true;
201 
202 # Permission de création de comptes uniquement 
203 # $wgGroupPermissions['*']['createaccount'] = false; 
204 $wgGroupPermissions['sysop']['createaccount'] = true;
205 
206 ## Permission de modifier l'interwiki
207 ## Pour créer des droits pour les groupes d'utilisateurs qui puissent modifier la data interwiki
208 require_once( "extensions/Interwiki/Interwiki.php" );
209 
210 # Pour donner des permissions aux sysops de modifier la data interwiki
211 $wgGroupPermissions['sysop']['interwiki'] = true;
212 
213 # (les bureaucrates pourront ajouter des utilisateurs à ce groupe)
214 $wgGroupPermissions['bureaucrats']['interwiki'] = true;
215 
216 
217 #Extension:Youtube 
218 wfLoadExtension( 'YouTube' );
219 
220 //Bandeau site
221 $wgSiteNotice = "==IndieWeb Learning Zone==";
222 
223 #Html ok 
224 # $wgRawHtml['sysop'] = true; (inoperant sur v 1.3)
225 wfLoadExtension( 'SaferHTMLTag' );
226 $wgGroupPermissions['sysop']['edit-html'] = true; // Enable in-wiki HTML editing for sysops.
227 
228 #Image Tag
229 $wgAllowImageTag = true;
230  
231 
232 // Transclusion
233 $wgEnableScaryTranscluding = true;
234 
235 # MSUpload pour téléverser plusieurs fichiers par glisser déposer
236 wfLoadExtension( 'MsUpload' );
237 
238 $wgMSU_useDragDrop = true; // Should the drag & drop area be shown? (Not set by default)
239 $wgMSU_showAutoCat = true; // Files uploaded while editing a category page will be added to that category
240 $wgMSU_checkAutoCat = true; // Whether the checkbox for adding a category to a page is checked by default
241 $wgMSU_useMsLinks = false; // Insert links in Extension:MsLinks style?
242 $wgMSU_confirmReplace = true; // Show the "Replace file?" checkbox
243 $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
244 $wgEnableWriteAPI = true; // Enable the API
245 $wgEnableUploads = true; // Enable uploads
246 $wgAllowJavaUploads = true; // Solves problem with Office 2007 and newer files (docx, xlsx, etc.)
247 $wgGroupPermissions['user']['upload'] = true; // Allow regular users to upload files
248 
249 
250 // Make sure that the file types you want to upload are allowed:
251 $wgFileExtensions = array('png','svg','gif','jpg','jpeg','doc','xls','pdf','ppt','tiff','bmp','docx','xlsx','pptx');
252 
253 
254 #Afficher des images externes
255 $wgAllowExternalImagesFrom = array( 'http://upload.wikimedia.org', 'http://vicnent.com' , 'http://www.flickr.com' );
256 
257 
258 # Twitter Login fonctionnel selon navigateurs
259 # require_once "$IP/extensions/TwitterLogin/TwitterLogin.php";
260 # include_once("$IP/extensions/TwitterLogin/TwitterLogin.php");
261 # $wgConsumerKey = 'W7q5lP4UEtEe9bjeec6j3z83n';
262 # $wgConsumerSecret = 'lHimEftsr0UFLUTD2Jn6mP2CQaP4Ha5iPd1mOo671VlSnPuZLS';
263 
264 # Header Tabs (onglets titres)
265 #require_once "$IP/extensions/HeaderTabs/HeaderTabs.php";
266 $htEditTabLink= false;
267 
268 ## Lecture seule 
269 # $wgReadOnly = 'Maintenance du Site - Chantier Sauvegarde';
270 
271 # Retirer l'onglet discussion 
272 function RemoveVectorTabs( SkinTemplate &$sktemplate, array &$links ) { 
273         global $wgUser, $wgHVTFUUviewsToRemove;
274         if ( isset( $links['namespaces']['talk'] ))
275                 unset( $links['namespaces']['talk'] );
276         return true;
277 }
278 $wgHooks['SkinTemplateNavigation'][] = 'RemoveVectorTabs';
279 
280 # Extension TemplateData
281 #require_once "$IP/extensions/TemplateData/TemplateData.php";
282 // Set this to true to enable the TemplateData GUI editor
283 $wgTemplateDataUseGUI = true;
284 
285 # Extension Bootstrap-skin
286 #require_once "$IP/extensions/BootstrapExtension.php";
287 
288 # Voir les détails des erreurs
289 #$wgShowExceptionDetails = true;