Cose di MediaWiki
Appunti relativi all'uso e all'amministrazione di MediaWiki, e come fare alcune cose specifiche.
Strumento di citazioni nel VisualEditor
Di default, il VisualEditor non sembra avere un metodo per aggiungere citazioni e riferimenti nella pagina...
Se questo è il caso, è perché va attivata l'estensione (inclusa) Cite; questo aggiungerà un relativo tasto nel VisualEditor che comodamente permette di aggiungere le citazioni belline col classico numeretto cliccabile inline.[1]
Aggiungere CSS custom
MediaWiki include una funzionalità per permettere agli amministratori di aggiungere comodamente CSS custom al sito.[2][3] Basta modificare le pagine di sistema relative al tipo fogli di stile che si vogliono arricchire, vuote di default, aggiungendo il proprio codice:
- MediaWiki:Common.css - Stili generali (
/* Gli stili CSS inseriti qui si applicano a tutti i temi */) - MediaWiki:Print.css - Stili specifici alla stampa (
/* Gli stili CSS inseriti qui si applicano all'output in stampa */)
Modificare la configurazione delle skin
In MediaWiki, le diverse skin possono fornire alcune opzioni di configurazione, definite nella sezione config del file skin.json, che possono essere sovrascritte esternamente dagli amministratori, senza modificare i file della skin.
Basta aggiungere una variabile del tipo $wg<NomeOpzione> al file LocalSettings.php. Per esempio, se l'opzione si chiama CosoText, basta aggiungere una riga $wgCosoText = "...";.
| In MediaWiki, how do I change a config value for a them? Must I change it in the skin.json or is there a proper way? |
You should not change configuration values directly in skin.json. Doing so makes it difficult to update the skin later, as your changes will be overwritten when you download a new version. [1, 2]
The proper way to change a config value for a theme (skin) is to override it in your How to Override Skin SettingsMost modern MediaWiki skins define their configurable options in their
Example: If you are using the Citizen skin and want to change its default theme, you would add this to
Other Proper Customization MethodsIf you want to change the look rather than just a functional setting:
Are you trying to change a specific setting for a particular skin, like Vector or Citizen? [1] https://stackoverflow.com [2] https://stackoverflow.com [3] https://www.mediawiki.org [4] https://www.mediawiki.org [5] https://www.digitalocean.com [6] https://www.mediawiki.org [7] https://www.awardspace.com [8] https://doc.wikimedia.org [9] https://www.mediawiki.org [10] https://workingwithmediawiki.com |
| So how do I change MedikColor for medik theme? |
To change the MedikColor for the Medik theme, you must add the configuration variable to your LocalSettings.php file.
The variable you need is How to Apply the Change
$wgMedikColor = '#YOUR_HEX_CODE';
Why this worksThis setting controls the color of the navbar and underlines throughout the skin. By defining it in Advanced: Changing other Medik settingsIf you want to customize further, Medik also supports changing the logo placement via Are you looking to change any other specific parts of the layout, like the sidebar or logo position? |
Note
- ↑ https://www.mediawiki.org/wiki/Help:VisualEditor/User_guide/Citations-Full
- ↑ Manual:CSS - MediaWiki: https://www.mediawiki.org/wiki/Manual:CSS
- ↑ Changing the CSS in MediaWiki: https://www.inmotionhosting.com/support/edu/mediawiki/changing-css-media-wiki/