Manual:FAQ/it

This page is a translated version of the page Manual:FAQ and the translation is 49% complete.
Outdated translations are marked like this.

Immediate help
  • mediawiki-l, the MediaWiki mailing list.
  • #mediawiki connect - the IRC channel.
  • Support desk
For a complete list of support venues, see Comunicazione .
Frequently asked questions (FAQ) about MediaWiki usage. If your question is neither answered here nor in the technical MediaWiki documentation or the MediaWiki user documentation, then please ask in a support venue.

Le basi

Quali sono le differenze tra MediaWiki, Wikimedia, Wikipedia e wiki?

Vedere Differenze tra Wikipedia, Wikimedia, MediaWiki, e wiki per una risposta dettagliata.

Voglio usare una installazione di MediaWiki per (qualsiasi cosa). Sono autorizzato a farlo?

MediaWiki è un software libero: questo vuol dire che puoi usarlo per qualunque scopo senza conseguenze legali. Inoltre, le condizioni di licenza vengono applicate solamente al software stesso. Questo significa che anche se molti wiki mettono i propri contenuti sotto una licenza permissiva, non sei obbligato a porre sotto licenza il contenuto nel tuo wiki in maniera particolare. Ovviamente, come progetto fondato per supportare siti come Wikipedia, ti incoraggiamo a porre sotto una licenza libera i testi che scrivi, ma, in pratica, non sei tenuto a farlo.

Se desideri modificare il software, in generale, puoi farlo, ma ci sono alcune restrizioni e dovresti consultare il testo completo del GNU GPL versione 2 per dettagli. Visto che MediaWiki è gratuito, non c'è garanzia, nei limiti delle leggi applicabili.

Come si crea un wiki?

Creare un wiki comporta l'installazione di Mediawiki su un server e avere accesso per gestirlo. Ci sono diverse opzioni, a seconda del livello di competenza:

  • Per creare un wiki sul tuo server, segui la Guida all'installazione.
  • Alcuni host offrono installazioni con un solo clic o permettono di creare un wiki su richiesta. Vedere i Servizi di hosting per ulteriori opzioni.

Questo sito (MediaWiki.org) oppure il Wikimedia Foundation non consente ai singoli di creare wiki.

Installazione e configurazione

Dove scarico MediaWiki?

Scarica l'ultima versione stabile di MediaWiki. I file sono forniti in formato compresso di archivio .tar.gz MediaWiki può anche essere ottenuto direttamente via Git.

Come installare MediaWiki?

Installare MediaWiki richiede tra i 10 e i 30 minuti, e include l'upload e la copia dei file e l'esecuzione dell'installer (script di installazione) per la configurazione. Vedi Manuale:Guida all'installazione , dove troverai i requisiti minimi di sistema.

Come installo MediaWiki usando un sistema di gestione pacchetti?

Molte distribuzioni di Linux supportano l'istallazione tramite la gestione di pacchetti. Il team di sviluppo di MediaWiki rimanda alla tua distribuzione di Linux per assistenza all'installazione, alla configurazione e all'uso. Le singole comunità o società che mantengono questi pacchetti dovrebbero poterti fornire istruzioni di installazione.

Ricorda che le distribuzioni di terze parti potrebbero essere non aggiornate, quindi fai molta attenzione alle informazioni di compatibilità per le estensioni.

Vedi anche: Software bundles

Posso installare più di una wiki su un server che usa MediaWiki?

È possibile installare più di una wiki su un server a patto che:

  • Si possano installare più istanze di MediaWiki (ad esempio con un software bundle come il Bitnami MediaWiki Stack); in diverse directory – una per ogni wiki

Oppure

  • Si può utilizzare un database differente per ogni wiki

Oppure

  • Si può utilizzare un prefisso del database differente per ogni wiki (per Postfix puoi ottenere un risultato simile usando schemi e utenti diversi) If you want to use the same LocalSettings.php file for both, you must ensure $wgServer is dynamically set to the correct value.

Per informazioni sulle ultime due opzioni, vedi rispettivamente $wgDBname e $wgDBprefix .

Per altre informazioni sulla configurazione di una famiglia di wiki (wikifarm), vedi Manual:Wiki family .

Come posso installare un wiki esistente, come Wikipedia o Wiktionary?

Il metodo principale (ma non necessariamente il più semplice) è l'importazione. Guarda Wiki importing, qui sotto.

(I metodi non MediaWiki, come Xowa e Kiwix, possono essere trovati su w:Wikipedia:Database download).

MediaWiki richiede l'accesso alla shell?

L'accesso alla shell (SSH access) non è obbligatorio per l'installazione di MediaWiki, ma è caldamente raccomandato. Senza accesso alla shell, si possono avere difficoltà per eseguire il backup del tuo wiki o l'aggiornamento a una nuova versione. In generale, senza accesso alla shell non è possibile effettuare operazioni di manutenzione. Molte estensioni importanti funzionano meglio con un accesso tramite terminale.

Come installo le estensioni?

Vedi Manuale:Estensioni per informazioni su come installare e creare estensioni. Vedi la Categoria: Estensioni per trovare estensioni esistenti.

Come aggiungo un namespace extra?

Vedi Creare un namespace personalizzato.

Come abilito l'upload?

L'upload di file è un'opzione molto usata di MediaWiki, ma è disabilitata di default in tutte le versioni. Per abilitarla, crea la cartella di upload (images di default) modificabile dal server (chmod 777 o abilitare l'utente Apache a scriverci, ecc.), poi modifica $wgEnableUploads true in LocalSettings.php. Se si ottiene l'errore "failed to mkdir" mentre si tenta di caricare, probabilmente significa che ci sono problemi di permessi.

Vedi anche: Manuale: Configurare l'upload dei file

Come abilito l'upload di altri formati?

MediaWiki richiede che abilitare l'upload di alri formati sia specificato con la configurazione della variabile $wgFileExtensions . Di solito questa variabile è situata in LocalSettings.php nel root dell'installazione MediaWiki.

Per esempio, per abilitare l'upload di file PDF, bisogna aggiungere le seguenti righe di codice in LocalSettings.php:

$wgFileExtensions[] = 'pdf';

Per permettere l'upload di più di un tipo di file, usa la sintassi seguente

$wgFileExtensions = array_merge( $wgFileExtensions, [ 'pdf', 'txt', 'mp3' ] );
Vedi anche: Manuale: Configurare l'upload dei file

Come abilito l'uso di formule matematiche?

MediaWiki supporta l'uso di formule tramite un programma chiamato texvc che usa il LaTeX per la resa finale. Vedi Extension:Math per le istruzioni complete sulla configurazione.

Come imposto il fuso orario per il mio MediaWiki?

Vedere Manual:Timezone

Come svuoto la cache di una pagina?

Per eliminare una pagina nella cache, ad esempio quando si apportano modifiche alla barra di navigazione, aggiungi &action=purge alla fine dell'URL dinamico della pagina.

Esempio: https://www.mediawiki.org/w/index.php?title=Main_Page&action=purge

Oppure ?action=purge alla fine dell'URL del modulo breve della pagina:

Esempio: https://www.mediawiki.org/wiki/Main_Page?action=purge

Vedi anche: Manual:Purge , Manual:Parameters to index.php

Come disattivo completamente la cache?

Aggiungere nel file LocalSettings.php le seguenti linee:

$wgParserCacheType = CACHE_NONE; $wgCachePages = false;

"Il file ha un'estensione non valida o è corrotto"

Qualche utente ha riportato che dopo aver aggiunto un formato, è venuto fuori questo errore. Il testo dell'errore è principalmente il seguente:

Il file ha un'estensione non valida o è corrotto. Controlla l'estensione e riprova di nuovo.

Come possibile soluzione impostare il valore di $wgMimeDetectorCommand . Su Unix o Linux, dovrebbe essere

$wgMimeDetectorCommand = "file --brief --mime";
Vedi anche: Manual:MIME type detection

L'utente iniziale non è stato creato dall'installer o non è un amministratore

A volte, l'installer non riesce a creare l'utente di default, o questo è perso per qualche motivo. Ci sono un paio di soluzioni:

maintenance/createAndPromote.php

Aggiungi --bureaucrat alla riga di commando se vuoi che l'utente diventi un burocrate, oltre che un amministratore.

Questo creerà un nuovo utente e lo promuoverà amministratore. Per aiuto, esegui lo script con il parametro --help.

Modificare il database

  • Controlla l'ID dell'utente via API.
  • Eseguire la seguente istruzione SQL sul database:
    • INSERT INTO user_groups ( ug_user, ug_group ) VALUES ( <id>, 'bureaucrat' ), ( <id>, 'sysop' );
<id> sopra dovrebbe essere sostituito con lo user ID appropriato, che puoi vedere nella pagina delle preferenze dell'utente
Nota: se $wgDBprefix è definito in LocalSettings.php, devi anteporre il valore al nome della tabella. Per esempio, se $wgDBprefix è "XYZ", allora il nome da usare per la tabella è XYZuser_groups

Lascia a tutti la possibilità di assegnare i diritti per promuovere il tuo utente iniziale

  Attenzione: Non dovresti permettere agli estranei di accedere al tuo wiki mentre lo usi, se usi questo metodo. Questo metodo può lasciare il tuo wiki temporaneamente vulnerabile agli attacchi durante la procedura.

Questo metodo prevede essenzialmente che tutti gli utenti modifichino temporaneamente i permessi dell'utente per promuoverne uno.

Effettuare il login utilizzando quella utenza.

  • Aggiungi il seguente codice alla fine del LocalSettings.php
    • $wgGroupPermissions['user']['userrights'] = true;
  • Andare in special:userrights e aggiungere l'utente appena creato ai gruppi Amministratore e Burocrate.
  • Rimuovere la riga $wgGroupPermissions['user']['userrights'] = true; dal vostro LocalSettings.php. Questo passaggio è molto importante, poiché finché non lo si rimuove chiunque può alterare i permessi, il che è negativo.

Come resetto la password?

Vedere Manual:Resetting passwords

Come creo interwiki dal mio wiki?

Vedere Manual:Interwiki

Come accorcio il mio URL di base?

(ad esempio /wiki/Article_Name al posto di /w/index.php?title=Article_Name)

Vedi Manual:Short URL

Come si organizzano le pagine in sottodirectory come /wiki/subdir/NomePagina?

Vedere Manual:$wgNamespacesWithSubpages e Aiuto:Sottopagine

Il download e l'uso dei contenuti di MediaWiki.org è gratis?

Si, è gratis nel senso di Software libero. Vedi Project:Copyrights per le licenze sui contenuti di questo sito.

Come amministro gli utenti?

Vedi Manuale:Permessi utente . Vedere Manuale:Impedire l'accesso per metodi e strategie per limitare l'accesso.

Come impedisco le modifiche agli utenti anonimi?

Il metodo raccomandato è modificare il valore di $wgGroupPermissions . Modifica LocalSettings.php ed aggiungi la linea:

$wgGroupPermissions['*']['edit'] = false;

Se si usa Extension:AbuseFilter , ogni amministratore può anche disabilitare temporaneamente la modifica dell'IP, se necessario.

Vedi anche: Impedire l'accesso , Manuale:Permessi utente

Come impedire agli utenti anonimi la lettura di qualsiasi pagina?

  • Aggiungere questo alla fine di LocalSettings.php:
$wgGroupPermissions['*']['read'] = false;

Vedere anche Manual:$wgWhitelistRead . Vedere Manuale:Impedire accesso#Restringere la visibilità di tutte le pagines per ulteriori informazioni.

Come posso limitare la creazione di account?

  • Aggiungere questo alla fine di LocalSettings.php:
$wgGroupPermissions['*']['createaccount'] = false;

Come posso richiedere che venga specificato un indirizzo e-mail al momento della registrazione?

Vedere Manual:$wgEmailConfirmToEdit

Come posso mettere MediaWiki in modalità Solo lettura?

Versione MediaWiki:
1.5
Vedere Manual:$wgReadOnly

Come cambio le impostazioni predefinite delle preferenze utenti?

Versione MediaWiki:
1.4

Le impostazioni predefinite di MediaWiki per le preferenze utente si trovano in MainConfigSchema.php . Non modificare questo file, utilizzalo solo come riferimento.

Se si desidera nascondere le modifiche minori nelle modifiche recenti come impostazione predefinita, in DefaultSettings.php c'è:

public const DefaultUserOptions = [
        ...
	'hideminor' => 0,
        ...
]

Per impostare questa preferenza, inserire nel vostro file LocalSettings.php:

$wgDefaultUserOptions["hideminor"] = 1;

Per cambiare i namespace predefiniti da ricercare, in qualsiasi versione di MediaWiki, impostare $wgNamespacesToBeSearchedDefault in LocalSettings.php in un array che mappi gli indici dei namespace in valori booleani. Ad esempio, per cercare nel namespace principale e nel namespace delle categorie, utilizzare:

$wgNamespacesToBeSearchedDefault = [
    NS_MAIN => true,
    NS_CATEGORY => true,
];

In alcuni casi, dopo aver modificato una preferenza utente predefinita, è possibile che si desideri modificare anche le preferenze utente di tutte le utenze esistenti.

In tal caso, utilizzate lo script userOptions.php nella directory maintenance. Utilizza l'opzione --dry alla prima esecuzione, valuta l'impatto ed inizia da lì. (--dry non apporta le modifiche al database.)

php userOptions.php --dry --nowarn hideminor --old 0 --new 1

È consigliabile fare sempre una copia di sicurezza del tuo database prima di attivare queste modifiche (non è necessario farlo se stai usando soltanto l'opzione --dry).

Vedere anche: Manual:$wgDefaultUserOptions

Come posso rendere MediaWiki più veloce?

Vedere: Manual:Performance tuning

Come posso attivare un elenco a caduta dei suggerimenti della ricerca?

Vedere Manual:Enabling autocomplete in search box

Come si concilia MediaWiki con il GDPR?

Vedere GDPR (General Data Protection Regulation) and MediaWiki software

Aggiornamento di MediaWiki

Vedere Manuale:Aggiornare

Migrazione

È possibile migrare il mio wiki su una macchina differente?

Sì, dovrebbe essere possibile. In breve, devi eseguire la copia di sicurezza della tua installazione attuale e "ripristinarla" nella nuova macchina. Di seguito dovrai apportare alcune modifiche alla configurazione del nuovo wiki in modo che tutto punti ai nuovi percorsi.

Come migrare il mio wiki su di un server differente?

Segui le istruzioni indicate in Manual:Moving a wiki .

Cambiare l'interfaccia

Come cambio il logo?

L'immagine che appare in alto a sinistra in ogni pagina è determinato dalla configurazione di $wgLogo nel file LocalSettings.php .

Ci sono due metodi per cambiare il logo:

  1. Puoi caricare un file nella wiki utilizzando la solita interfaccia di caricamento. Questo ti permette d'aggiornare il logo con facilità, anche se in tal caso dovresti pensare di proteggere quella pagina.
    Quindi aggiungi la linea $wgLogo nel file LocalSettings.php; ad esempio:
    $wgLogo = "{$wgUploadPath}/6/62/mylogo.png";
    
  2. Usare un'immagine caricata sul server tramite altri mezzi (come FTP).
    Aggiungi la linea $wgLogo nel file LocalSettings.php; ad esempio:
    $wgLogo = "{$wgScriptPath}/mylogo.jpg";
    
    (in questo esempio l'immagine è nella stessa cartella del file LocalSettings.php)

Se vuoi cambiare il logo solo in alcune pagine specifiche, devi sovrascrivere la proprietà dell'immagine di sfondo per #p-logo nel CSS o utilizzare delle estensioni di terzi parti come Extension:LogoFunctions .

  Caution: È sconsigliato sovrascrivere il logo predefinito installato con MediaWiki: (/resources/assets/wiki.png); questo file viene riscritto quando aggiorni MediaWiki.
Una buona dimensione per un logo quadrato è 135x135px o 150x150px, ma non è necessario che il logo sia quadrato, soprattutto se contiene del testo sotto un'immagine. La dimensione massima di un logo per lo stile Vector è ~160x160px, mentre per lo stile MonoBook è ~155x155px. Un logo con dimensioni maggiori di quelle previste verrà tagliato.

How do I edit the wiki's CSS?

You shouldn't edit the CSS files (such as common.css) directly, because it will make upgrading harder if you need to apply your customizations each time you upgrade the software. Instead you need to edit a wiki page called MediaWiki:Common.css if you want to apply your CSS changes for all skins, or a wiki page called MediaWiki:Vector.css if you want to apply the customizations only for the Vector skin.

The content of the MediaWiki:Common.css and MediaWiki:Vector.css pages always overrides the default CSS styles specified in the skin files.

How do I hide the left vertical navigation toolbar?

In other words, how do you make the main content div take up 100% of the display, hiding the logo, toolbox, navigation and search engine?

To hide it permanently, copy and paste the following into the MediaWiki:Common.css page:

#column-content { margin: 0 0 .6em 0; }
#content { margin: 2.8em 0 0 0; }
#p-logo, .generated-sidebar, #p-lang, #p-tb, #p-search { display:none; }
#p-cactions { left: .1em; }

To instead hide the toolbar when the user presses F11, enter this in your wiki's MediaWiki:Common.js:

document.onkeydown = function( e ) {
	if( e == null ) e = event
	if( testKey( e, 122 ) ) { //F11
		appendCSS('#column-content {margin: 0 0 .6em 0;} #content {margin: 2.8em 0 0 0;} #p-logo, .generated-sidebar, #p-lang, #p-tb, #p-search {display:none;} #p-cactions {left: .1em;} #footer {display:none;}');
		return false;
	}
}

function testKey( e, intKeyCode ) {
	if( window.createPopup )
		return e.keyCode == intKeyCode
	else
		return e.which == intKeyCode
}

How do I hide the categories at the bottom of each page?

You can hide display of the categories on each page by modifying your MediaWiki:Common.css and adding:

.catlinks { display: none; }

Come modifico l'URL a cui punta il logo?

Di default, cliccando sul logo, si è indirizzati alla pagina principale. Se vuoi cambiare quale pagina si a la principale, modifica MediaWiki:Mainpage.

To make the link of the site-logo link externally to any other arbitrary URL, you can use jQuery code within MediaWiki:Common.js:

$("a.mw-wiki-logo").attr("href", "http://www.example.com");
$("a.mw-wiki-logo").attr("title", "Go to example.com website");


Come cambio l'icona nella barra degli indirizzi del browser (favicon)?

  • Semplicemente rimpiazzando l'immagine favicon.ico con l'immagine .ico desiderata.
  • Alternatively edit the $wgFavicon setting in LocalSettings.php and add

$wgFavicon = "$wgScriptPath/path/to/your/favicon.ico";

See Manuale:$wgFavicon for more details.

Tip: The favicon image should be either 16 x 16 pixels or 32 x 32 pixels.

Rewrite Rule

If you are using a rewrite rule in .htaccess to remove "index.php" from the URL, you will also need to add an exception for .ico files. Simply add the following rule to your .htaccess:

RewriteRule .*\.ico$ - [L]

This rule must appear before the index.php rule.

Case sensitivity

When uploading the favicon file, be sure the filename is in lowercase. (That is, "favicon.ico", not "Favicon.ico".) A lot of servers (e.g., those on UNIX-like operating systems) will not be able to find the file unless its name is in lowercase.

Come modifico la barra di navigazione?

Il contenuto della barra di navigazione appare nella sinistra di ogni pagina usando la skin Vector oppure Monobook ed è determinato dalla pagina MediaWiki:Sidebar del tuo wiki. For information on customising these, please see Manual:Interfaccia/Barra laterale .

Come aggiungo un messaggio di testo (sitenotice) su ogni pagina?

Metti il tuo testo nella pagina MediaWiki:Sitenotice e verrà visualizzato in cima ad ogni pagina.

You can also add text to MediaWiki:Anonnotice to create a message that only displays for logged-out users. It is often a good idea to transclude the site notice on the anon notice to make sure that logged-out users still get the information on the site notice.

Come cambio la pagina principale?

Di default, MediaWiki cerca una pagina dal titolo Main Page e la imposta come pagina principale. Questa può essere cambiata modificando il contenuto della pagina MediaWiki:Mainpage in modo che punti ad un'altra pagina. Se non si cambia anche la sezione 'Main Page' nella barra laterale, modifica anche MediaWiki:Sidebar.

Come nascondo il titolo della pagina principale?

Simply click on the "Move" tab, and move the page to the desired page title.

Come nascondo il titolo della pagina principale?

MediaWiki 1.38+

The displayed title of the main page can be changed using the MediaWiki messages MediaWiki:mainpage-title and MediaWiki:mainpage-title-loggedin (for logged-out and logged-in users respectively). The main page title can be hidden by setting both messages to empty (or only either of them if the title should still be displayed to logged-out or logged-in users).

MediaWiki 1.37 and below

MediaWiki non ha un'opzione built-in per nascondere il titolo della pagina principale (vedi bug 6129). Puoi comunque usare JavaScript o CSS. Alternatively, you can use the NoTitle extension.

Add the following to MediaWiki:Common.css on your wiki:

body.page-Main_Page.action-view h1.firstHeading, body.page-Main_Page.action-submit h1.firstHeading { display: none; }

If your main page uses a localized name or you have renamed the main page you need to change the page-Main_Page part. You can find a correct parameter by viewing HTML source of the main page and searching for the body tag.

For example, if your language is Lojban, the body tag looks like this:

<body class="mediawiki ltr sitedir-ltr ns-4 ns-subject page-uikipedi_as_ralju skin-vector action-view">

Therefore you should put this line in your MediaWiki:Common.css instead:

body.page-uikipedi_as_ralju.action-view h1.firstHeading, body.page-uikipedi_as_ralju.action-submit h1.firstHeading { display: none; }

If you would like to hide the title of a "Main Page" in a specific namespace like "Help:Main_Page" add the following to MediaWiki:Common.css on your wiki:

body.page-Help_Main_Page.action-view h1.firstHeading, body.page-Help_Main_Page.action-submit h1.firstHeading { display: none; }

Note the difference: body.page-Help_Main_Page in comparison to body.page-Help:Main_Page. The latter will not work.

If this doesn't work, you may be using a skin that doesn't support this, or you moved your main page without updating MediaWiki:Mainpage, or you have a really old MediaWiki version.

If the skin uses a different element for the title than a h1 element with class firstHeading, you'll need to find the appropriate CSS selector to apply for that skin.

Come nascondo l'indice?

L'indice (TOC, da Table Of Contents, tavola dei contenuti) è automaticamente visualizzato se ci sono quattro o più sezioni nella pagina. Ci sono vari modi per nasconderlo.

Su una pagina
Inserisci __NOTOC__ nel sorgente della pagina.
Su tutte le pagine
Installa Extension:NoTOC .
o
Add the following rule to MediaWiki:Common.css:
.toc, #toc { display: none; }
Per utente
Users can add the same CSS rule to their common.css personal stylesheet.

Come modifico il testo dell'interfaccia?

Il testo dell'interfaccia viene modificato utilizzando le pagine nel namespace MediaWiki. Per ogni modifica dai messaggi di default, c'è una pagina MediaWiki:MessaggioOriginale, e per i messaggi solo per una determinata lingua MediaWiki:MessaggioOriginale/codicelingua. (Dalla versione 1.9 non ci sono pagine per messaggi uguali a quelli di default). Alla creazione di una pagina, l'area di edit presenta automaticamente il valore di default. Quando si crea una pagina per modificare un messaggio, è bene salvare prima la versione di default e pi sovrascriverla in modo da agevolare il confronto. Vedi anche Help:System message .

How do I edit error messages?

Special:Allmessages contains a complete list of messages (error or otherwise), that can be edited.

You may also add ?uselang=qqx or &uselang=qqx to a URL which will display the name of each messages in the interface.

Come modifico la lingua dell'interfaccia?

Per modificare la lingua di default dell'interfaccia, modifica la variabile $wgLanguageCode in LocalSettings.php, es.

$wgLanguageCode = "fr";

You may also need to bypass your browser's cache to see the changes.

The new default interface language will be applied to all users who haven't ever customised it.

If you want to provide users the possibility to create and choose pages and interface elements in languages other than the default one of the wiki, you need the Estensione:Traduzione extension, which can make your wiki multilingual.

If you want to change the language settings for all existing users, use the userOptions.php maintenance script. For instance, to have all users with English set use French instead, run:

php userOptions.php language --old en --new fr

How do I remove the article/edit etc tabs?

For a little more control see: User:Subfader/Hide_page_tabs

Edit MediaWiki:Common.css on your wiki, and add this:

li#ca-edit { display: none; }

See the page source for the various #ca-* ids used in the content tabs.

This will only work for Monobook and derived skins such as Modern and Vector (the default skin), and doesn't actually stop people from editing. To do that, see Manuale:Permessi utente .

Come aggiungo/rimuovo in generale le linguette?

For example, to remove the talk tab and then add a tab that always goes to the main page you would save this code in

extensions/AR-Tabs.php:

Versione MediaWiki:
1.21
<?php
if( !defined( 'MEDIAWIKI' ) ){
	die( "This is not a valid access point.\n" );
}

$wgHooks['SkinTemplateNavigation'][] = 'replaceTabs';
function replaceTabs( &$skin, &$links) {  
	// Remove the talk action
	unset( $links['namespaces']['talk'] );
	$maintitle = Title::newFromText( wfMessage( 'mainpage' )->inContentLanguage()->text() );
	// Add an additional link
	$links['namespaces']['main'] = array(
		'class' => false, // false or 'selected', defines whether the tab should be highlighted
		'text' => wfMessage( 'sitetitle' )->text(), // what the tab says
		'href' => $maintitle->getFullURL(), // where it links to
		'context' => 'main',
	);
	return true;
}

ed aggiungi

require_once("extensions/AR-Tabs.php");

alla fine di LocalSettings.php

How do I remove a tab on only one page?

Versione MediaWiki:
1.9

Per esempio, per eliminare il tab 'Discussione' della pagina principale, aggiungere questo alla tua pagina MediaWiki:Common.css:

body.page-Main_Page li#ca-talk { display: none !important; }

To modify MediaWiki:Common.css you must be an Interface administrator .

Vedi anche: Manual:Hide page tabs

Come elimino un tab in tutte le pagine

Versione MediaWiki:
1.9

Per esempio, per eliminare il tab 'Discussione' della pagina principale, aggiungere questo alla tua pagina MediaWiki:Common.css:

#ca-talk { display:none!important; }

Altri tabs che puoi togliere sono #ca-history (Cronologia), #ca-viewsource (vedere fonte), #ca-view (leggere) e #ca-nstab-main (pagina).

Altri elementi di menu istantaneo che puoi togliere sono #ca-watch (aggiungere a tracciamento), #ca-move (spostare) e #ca-delete (cancellare).

Per potere modificare MediaWiki:Common.css devi essere un Interface administrator .

<span id="How_do_I_remove_the_"Talk_for_this_IP"_link_at_the_top_right_(e.g._when_$wgDisableAnonTalk _is_true)?">

Come rimuovo "Talk for this IP" (discussioni per questo IP) in alto a destra se $wgDisableAnonTalk è impostato su true?

One option is to hide the link using the following CSS in the wiki page MediaWiki:Common.css in your wiki:

#p-personal #pt-anonuserpage {
    display: none;
}

Another option is, inside your LocalSettings.php file, to use the PersonalUrls hook to remove the link to the talk page of anonymous users:

$wgHooks['PersonalUrls'][] = 'lfRemoveAnonUserpageLink';
function lfRemoveAnonUserpageLink( &$personal_urls, $title ) {
	unset( $personal_urls['anonuserpage'] );
	return true;
}

Come tolgo "Create an Account or Login" (Entra/Registrati) in alto a destra?

To remove the login / create account links from the personal_urls you can use this code in your LocalSettings.php to hook in and remove them:

$wgHooks['SkinTemplateNavigation::Universal'][] = function ( $skinTemplate, &$links ) {
	unset( $links['user-menu']['login'] );
	unset( $links['user-menu']['login-private'] );
	unset( $links['user-menu']['createaccount'] );
};

How can I suppress actions and special pages?

There are two different ways:

Using .htaccess file

MediaWiki is not designed for this kind of usage! Not all servers support .htaccess file. Note also that this system is not foolproof, it's just one step further than hiding the links (see above).

Suppressing actions and special pages can be useful when you want to create the illusion of a static website via a particular URL or VirtualHost, but also have an 'internal' view that is a true wiki. i.e. if you have an inward facing 'view' of your wiki that users can edit, and an outward facing 'view' that should appear like a static website (no history, no discussion, etc., etc.).

After hiding all the appropriate links (see above), if you are using the Apache web server, you can disable actions and special pages using the following rewrite rules:

# Lock down the site (disable MediaWiki commands)

RewriteEngine On

#RewriteLog /tmp/rewrite.log

#RewriteLogLevel 9

## See https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Parameters_to_index.php#Actions

RewriteCond %{QUERY_STRING} (.*action=.*)
RewriteRule .* http://www.my.domain.com?

RewriteCond %{REQUEST_URI} !^/index.php/Special:Search
RewriteCond %{REQUEST_URI}  ^(.*Special:.*)
RewriteRule .* http://www.my.domain.com?

## Catch a trick...
RewriteCond %{QUERY_STRING} ^(.*Special:.*)
RewriteRule .* http://www.my.domain.com?

Above, a request for 'http://www.my.domain.com/wiki/Page_name?action=edit', for example, will be simply rewritten to 'http://www.my.domain.com'. Similarly any page in the Special namespace (except for Special:Search) will be rewritten to 'http://www.my.domain.com'.

Alternatively, you may also serve a "403 Forbidden" for all such requests using: RewriteRule .* - [F]. Remember, this is only a hack, and isn't intended as a solution for a secure CMS.

Note that you will need to adjust the above rules to match your specific URL naming schema.

Other issues to consider when trying to lock down a site like this is the API and POST requests for the wiki content (rather than GET).

Using LocalSettings.php

To disable a specific special page (such as Special:SpecialPages), you may use:

$wgSpecialPages['Name'] = DisabledSpecialPage::getCallback( 'Name', 'message' );

where Name is the canonical (English) name of the special page to disable, and message is the message to be shown to users when they try to access the special page.

To disable an action (such as edit), you may use:

$wgActions['edit'] = false;

See API:Restricting API usage to disable an API module.

This is only the basic usages. Usually you may want to disable special pages, actions or API modules conditionally.

Come modifico il footer?

See: Manual:Footer , Manual:Configuration settings#Copyright

Come posso modificare / rimuovere l'immagine (e possibili ulteriori immagini ) Powered by MediaWiki dal piè di pagina?

Puoi nascondere l'immagine Powered by MediaWiki aggiungendo al MediaWiki:Common.css della tua wiki:

#footer-poweredbyico { display: none; }

If you want to remove it completely, you can use $wgFooterIcons to remove it using this in your LocalSettings.php:

unset( $wgFooterIcons['poweredby'] );

Note that this will also remove other powered-by icons, e.g. also the one coming from BlueSpice.

If you wish to change the icon images, urls, alt text, or add new icons please see $wgFooterIcons ' documentation.

How do I add a reply link to default signature tildes (~~~~) template?

You can customize signatures in MediaWiki:Signature / MediaWiki:Signature-anon.

For example, changing the entries to [[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|talk]]) will put a link to users' talk pages and [[{{ns:user}}:$1|$2]] ([{{fullurl:{{ns:user_talk}}:$1|action=edit&section=new}} Reply]) would give a more direct link.

Users can change their signature in their preferences.

<span id="How_can_I_change_what_the_‎<title>_of_each_page_is?_Where_do_I_make_changes?">

Come posso modificare il ‎<title> di ogni pagina? Dove posso fare le modifiche?

La maggior parte del testo che vuoi modificare si trova nel namespace MediaWiki.

Se vuoi modificare titoli, testi, annunci ecc. vai a Special:Allmessages, dove troverai il testo associato alla pagina che vuoi modificare. You need to log in as an administrator to edit the protected entries in the MediaWiki namespace.

Se vuoi modificare il titolo nel browserm devi modificare MediaWiki:pagetitle. Go there and edit it just like you would any other page in your wiki.

Nelle ultime versioni di MediaWiki, MediaWiki:Pagetitle è $1 - {{SITENAME}} di default. Se {{SITENAME}} produce un testo non corretto, devi modificare $wgSitename in LocalSettings.php.

Non dimenticare di svuotare la cahce del browser dopo aver effettuato tali modifiche!

Does MediaWiki automatically capitalize the first letter of $wgSitename?

Yes. This can be changed using the $wgCapitalLinks configuration setting.

Come faccio a far aprire i collegamenti esterni in una nuova finestra?

See Manual:$wgExternalLinkTarget

Come impedisco a MediaWiki di formattare URL, tag, ecc?

Put "‎<nowiki>‎</nowiki>" tags around the URL or tag.

Esempio:

svn co <nowiki>http://svn.example.com/myproject/</nowiki>

Produce:
svn co http://svn.example.com/myproject/

Come faccio a obbligare gli utenti ad usare l'anteprima prima di salvare?

Vedere: Manual:Force preview , Extension:ForcePreview

Come metto caratteri speciali inseribili cliccandoci sopra nella pagina di modifica?

See: Manual:Custom edit buttons

Come metto caratteri speciali inseribili cliccandoci sopra nella pagina di modifica?

For adding more selectable special characters, etc., below the edit field, see Extension:CharInsert .

How can I use a different skin on my wiki?

See Manual:$wgDefaultSkin for more information on configuring your default skin.

How do I disable external links from showing in the printable version of a page?

Edit the page MediaWiki:Print.css on your wiki and add the following code there:

#content a.external.text:after,
#content a.external.autonumber:after {
	content: none;
}

This will override the styles defined in the CSS files coming with the MediaWiki source code. Per maggiori informazioni, vedere Manuale:CSS

If instead you want to have the external links underlined in the printable version, then also add the following code:

#content a.external {
    text-decoration: underline !important;
}

How do I print footnotes at the bottom of each printed page?

Try this StackOverflow solution: Printed HTML per-page footnotes

How do I change the text of the article (page name) tab of my wiki's main page?

To change the text of the tab, as one example used in Wikipedia, you first open the page "MediaWiki:Mainpage-nstab".

After you've done that, click Edit and type in the edit box the text you want to be seen later on the main page - that's it. Don't forget to save the page as well.

How do I change the background color?

To change the background color of the MediaWiki interface outside of the page content and tabs, add the following CSS to the MediaWiki page [[MediaWiki:Common.css]]:

/* Changes the background color of the bottom and left of each page, up to behind half of the logo: */
body {
  background: red;
}

/* Changes the background color behind the top half of the logo and at top of each page: */
#mw-page-base {
  background: red;
}

This will change the background color outside of the tabs, search, and page content to red. See Manuale:CSS for more information.

How do I load external fonts?

This example refers to Google Fonts, a repository of free open-source fonts that you can use with MediaWiki. Go to https://fonts.google.com/, find fonts that you like, and select them by clicking the "plus" (+) icon. Select one or more fonts to be added. Click the tab for the pop-up notification, and then select "@IMPORT". Copy and paste the resulting CSS into [[MediaWiki:Common.css]]. The examples below use Noto Sans and Noto Serif. They are default fonts for Android operating system and have good support for Unicode text.

@import url( 'https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Serif ');

/* Changes the default font used for MediaWiki to Noto Sans (does not include headings or monospaced text): */
body {
  font-family: "Noto Sans", sans-serif;
}

/* Changes the default font used for MediaWiki headings to Noto Serif: */
#content h1, 
#content h2 {
  font-family: "Noto Serif", serif;
}

How to hide the "Your edit was saved" notification?

Edit the wiki page MediaWiki:Common.css on your wiki to include the line .postedit {display: none;}. See Manual:Interface/Stylesheets for more information.

Cenni di base

Come modifico una pagina?

Per modificare una pagina, clicca sul bottone edit (modifica) che appare in ogni pagina. Usando il monobook di default, questo è una linguetta in cima alla pagina. Apparirà un riquadro con il markup della pagina; quando hai finito, clicca su save (salva)

See also: Help:Modificare le pagine

Come creo una nuova pagina?

Ci sono alcuni modi per creare una pagina:

  • Clicca su un link rosso da un'altra pagina
  • Inserisci il nome della pagina nell'URL es.http://www.foowiki.org/index.php?title=New_page e clicca su modifica.
  • In qualche wiki, la ricerca di una pagine inesistente ti permette di crearla.
See also: Help:Creare una nuova pagina

Come cancello una vecchia versione di una pagina?

Versioni superate di una pagina sono conservate dal database e possono essere viste dalla cronologia della pagina. Possono essere, comunque, cancellate da un amministratore.

  • Gli amministratori possono cancellare una pagina e recuperare le revisioni desiderate
  • For newer MediaWikis (1.14+), you can enable the core RevisionDelete feature that allows privileged users to remove single revisions from page histories.
See also: Manual:Removing embarrassment

How do I use oversight/delete revisions in the page history?

See: RevisionDelete

You can also delete a page, and then restore only the revisions you want.

C'è qualche guida di editing?

Ci sono alcune guide alla modifica delle pagine, la maggior parte in Wikipedia o nei progetti Wikimedia. Ci sono anche aiuti per il markup, la sintassi ecc. su Meta.

Come faccio a visualizzare la versione stampabile di una pagina?

MediaWiki include un foglio di stile che riduce la pagina ad un layout adatto alla stampa.

You can also view this printable form using the printable version link in the sidebar under Toolbox or Print/export if using the Collection extension.

How do I use templates?

See Help:Templates/it

Can I use media (images, video, audio, etc.) from Wikimedia Commons in my installed version of MediaWiki?

Yes, this is encouraged through the use of Manual:$wgUseInstantCommons .

See also: InstantCommons

How do I use a template as a signature?

When you look at your preferences, you see a check box for "raw signature." But the field will only take a certain number of characters. What if you want more?

You will need to create two pages, possibly in your userspace.

  1. Create the first page (FIRST PAGE)
  2. Go to your preferences, check "raw signature" and put {{FIRST PAGE}} in the signature. Salva
  3. Create a second page (SECOND PAGE) (possibly a sub-page of the first)
  4. Go back to the first page (FIRST PAGE) and do {{SECOND PAGE}}
  5. Go to the second page (SECOND PAGE) and place the code you wish to have for your signature.

If you don't have this structure, you will still be inserting all your signature code into the raw code wherever your signature is used, because the software will insert "SUBST" in your preferences. You may not mind this, in which case you only need one page. If you want the raw code to only display {{FIRST PAGE}}, which looks a lot cleaner, then you need to use the two-page structure.

How do I add the sandbox functionality to my installation of the wiki?

In wiki terms, a sandbox is simply a "play pen"; a page which users can mess about in. This is an ordinary page created in the normal manner, and can be located wherever you like. There is no special sandbox functionality built into MediaWiki.

Users often inquire about the Wikipedia sandboxes, which seem to be self-emptying. This is not quite correct; there are a number of volunteers who run bots to clean these up and return them to a certain state at regular time intervals.

See also: Extension:SandboxLink which will add a link to user's personal sandbox (i.e. a subpage of personal user page) to personal tools menu.

How do I add a "Sandbox" link to personal tools (top right)?

You need to install the SandboxLink extension.

How do I make my wiki serve all languages?

Wiki importing

Importing from MediaWiki XML dumps

See: Manual:Importing XML dumps

Importing from other types of wiki software

This section lacks information - please feel free to add it.

Importing from other types of files

There are a variety of tools available to help convert content from HTML (and other formats) to MediaWiki markup.

Developer and SysAdmin tools
End-user tools
  • wikEd - a text editor for MediaWiki that can import HTML (including Microsoft Word-generated HTML.)
Instructions

Templates imported from other wikis (such as Wikipedia) don't work for me

You probably need to install some extensions used on the source wiki, such as Scribunto , TemplateStyles , ParserFunctions or sometimes Cite . Also, make sure that you copied all site CSS and JavaScript required by the template.

Personalizzazioni avanzate

I want to have multiple wikis, but only require registration once

  • If you're starting from scratch or you're switching from one wiki to multiple, you can use $wgSharedDB and $wgSharedTables to have all wikis share the user table of the "main" wiki.

You can share other tables as well, as long as they don't contain any data dependent on non-shared tables or data specific to one wiki. See Manual:Shared database for examples and more information.

  • If your wikis are already established and you want to switch to a single sign-on, you can use the CentralAuth extension.

It has a few more features than a shared user table, but it's more difficult to configure and it's tailored toward a Wikimedia-style setup. However, it is easier than attempting to completely merge multiple user tables into one.

Come permetto l'uso di tag HTML?

Vedi Manual:$wgGroupPermissions e Manuale:Impedire l'accesso e Manual:$wgRawHtml .

  Caution: alcuni utenti potrebbero abusarne!

Vedi Extension:Secure HTML e Extension:HTMLets per renderlo più sicuro.

How do I fix problems or add features to MediaWiki?

The basic steps to improving MediaWiki (that is, becoming a MediaWiki developer) are:

  • Download the Git "clone" of the MediaWiki source code
  • Get a server, a database, and PHP running on your computer (this can be annoying, so please ask for help if something isn't working)
  • Get MediaWiki running on your computer off that Git checkout (can be annoying as well, so, ditto)
  • Fix the problem or add the feature you were thinking of
  • Edit the source code of the relevant file(s) to fix the problem

How do I run a bot?

See: Manual:Bots

You might want to use the Pywikibot framework.

How do I change noindex nofollow

How do I create a small wiki farm?

See: Manual:Wiki family

How do I add meta tags?

The OutputPage class includes an addMeta method which can be used to add meta tags. The RequestContext can be used to get the relevant OutputPage object.

$out->addMeta ( 'description', 'This is a meta description.' );

Perché...?

...il namespace Help (Aiuto) è vuoto?

in ogni caso, il namespace Help è ancora quasi in bianco. It's up to you how much or how little help you give to your site visitors and whether this relates to other aspects of your site. Obviously you can easily link your visitors to help resources elsewhere.

Non abbiamo ancora una serie di pagine di aiuto libere, pulite, organizzate e internazionalizzate. However, if you want to copy in some help information onto your site, about how to use a wiki (a MediaWiki powered wiki) you are free to copy the Help:Indice from this wiki. This set of pages have been deliberately created for this purpose, with wiki-neutral information, and no license restrictions. See Project:Aiuto sul PD . More help is available at the Meta-Wiki MediaWiki Handbook.

...dopo un aggiornamento alcune immagini non si vedono?

Alcuni utenti hanno segnalato che, dopo un aggiornamento alcune immagini non si vedevano. I file c'erano e il tipo MIME delle immagini era unknowncode>/unknown ed, in alcuni casi, segnalate come pericolose.

Per sistemare ciò, esegui maintenance/rebuildImages.php dalla linea di comando. Questo sistemerà le informazioni MIME per ogni file presente nel database.

MediaWiki 1.21 and newer implements responsive images. Due to a bug, if the server locale is set to one that uses commas instead of dots for representing a decimal point, images may not render on some browsers/devices. This can be confirmed by inspecting a thumbnail of a medium or big image on a page with the browser tools, looking at the HTML code, and see if the srcset attribute contains commas instead of dots when representing the 1.5x value.

...tutti i file PNG non sono visualizzati come miniature?

Dopo un aggiornamento del PHP, è possibile che una differente funzione di MimeMagic.php sia usata per controllare i tipi MIME dei file, in particolare la funzione built-in PHP mime_content_type, che controlla i PNG. Cerca mime_content_type png nel web per informazioni su come sistemare il bug al livello del PHP, anche modificando il file magic.mime.

…can't I download MediaWiki 1.42?

MediaWiki 1.42 is in a development state at present, and has not been packaged into a general release. The code can be downloaded from Git if desired. Or, if you want the latest development version packaged as an archive, get it at mediawiki-master.tar.gz (GitHub).

...questo non funziona? Su Wikipedia va!

Wikipedia ed altri siti Wikimedia usano la versione corrente del codice in via di sviluppo che al momento è MediaWiki 1.12alpha. A questo va aggiunto anche l'uso di numerose espansioni che possono aggiungere altre opzioni rispetto al software di base.

  • Per vedere quale versione un sito sta usando, vedi la sua pagina Special:Version.

...ricevo un errore 403 Forbidden dopo aver impostato i permessi sul mio sistema Fedora?

Fedora Core usa SELinux di default. Instructions for setting SELinux permissions for MediaWiki are available.

…do I get Installing some external dependencies (e.g. via composer) is required?

Many hosting providers only handle zip archives, and we only provide gz compressed tar archives, thus the archives has to be recompressed before uploading. This should not be a hurdle, but it seems like some archive tools occasionally fail to include all files in large archives. When this happen the vendor folder is left out, leaving the user with the rather non-explanatory error message.

Use a command line tool when recompressing the tar archive into a zip archive.

...vengo disconnesso continuamente?

Probabilmente è un problema legato ai cookies o alla sessione di dati. Vedere Log in problems per informazioni.

If this is happening constantly to all users, it probably means that caching is misconfigured. Setting $wgSessionCacheType = CACHE_DB; can be used to determine if caching is the cause of the problem. If that solves the problem, you should still investigate what is wrong with your caching configuration.

...è una buona idea tenere tutti gli account?

Molte volte può capitare che si desideri rimuovere un account, perché è di uno spammer, di un vandalo o semplicemente perché se ne ha voglia. La scelta migliore è, però, bloccare l'account o rinominarlo. Here is why:

Do I just remove this row from the user table?

Rob Church posted the following regarding this issue on the wikitech-l mailing list:

If the user has made edits, then removing rows from the user table cause theoretical loss of referential integrity.

Now, to be honest with you, I can't think of any conditions where this would cause an actual problem; "undefined behaviour" is the phrase we use.

What I'd suggest doing, to be on the safe side, is running a couple of quick updates against the database:

UPDATE revision SET rev_user = 0 WHERE rev_user = <current_user_id>
UPDATE archive SET ar_user = 0 WHERE ar_user = <current_user_id>

What this will do is cause MediaWiki to treat the revisions as having been made anonymously when generating things like page histories, which should eliminate any problems caused by these routines attempting to check user details from other tables.

If the user has caused log entries, i.e. rows in the logging table, or uploaded images, then the situation becomes trickier, as you'll have to start mopping up all the rows everywhere and it could become a bit of a mess, so if the user's done anything other than edit, I would strongly recommend just blocking them indefinitely.

If the username is offensive or undesirable, then you could consider renaming it using the RenameUser extension.

Another option is to give Admins the 'hideuser' right, and indefinitely block the user with the Hide username from edits and lists option selected.

Extension:UserMerge is also useful.

…is the number of pages so low on Special:Statistics?

By default, $wgArticleCountMethod is set to link. This means the number of "Content pages" on the Special:Statistics page only counts pages which include at least one internal link. This can be changed by setting $wgArticleCountMethod to any. Afterwards, run updateArticleCount.php and/or initSiteStats.php . (On Wikimedia websites, initSiteStats.php is run on the 1st and 15th of each month.) There might still be wrong behavior, see for example phab:T212706.

Anti-spam

Come faccio ad usare $wgSpamRegex per bloccare più di una stringa?

$wgSpamRegex è un potente filtro per contenuti. Può, comunque, essere difficile aggiungere elementi multipli alla regex. Considera di usare questo:

$wgSpamRegexLines[] = 'display\s*:\s*none';
$wgSpamRegexLines[] = 'overflow\s*:\s*auto';
[...]
$wgSpamRegex = '/(' . implode( '|', $wgSpamRegexLines ) . ')/i';

This example code allows convenient addition of additional items to the regex without fiddling about each time. It also demonstrates two popular filters, which block some of the most common spam attacks.

See also: Extension:SpamRegex

Are there additional ways to fight spam?

See Manual:Combating spam for an overview of anti-spam measures such as Captcha, content filtering and restricting edition.

Anti-vandalism

See Manual:Combating vandalism for hints and suggestions on how to deal with wiki vandalism.

Ed ora?

Ho trovato un bug o ho una richiesta tecnica. Dove lo segnalo?

Bugs and feature requests should be posted on Phabricator . See How to report a bug.

I'm getting a strange error. What now?

I tried that but it didn't work

I had a problem, I came to this page and it told me how to fix it. But it didn't work, the problem is still there!!!!

Nine times out of ten this is because you didn't clear your cache. The simple test for this is to request a page that hasn't been requested before. Select the part of the URL in the address bar that contains the page title (e.g. Main_Page). Twiddle your fingers on the keyboard for a while, hit enter. Check if the problem is on that page too.

MediaWiki uses both a server-side cache and a client-side cache, so clearing your browser cache is often not enough. See the relevant entry above for more details.

Here are some other things to check:

  • Were you editing the right file? Try inserting some garbage into the file you edited, does it break anything?
    • A great debugging tool in this case is to create a file called phpinfo.php, containing only <?php phpinfo() ?>.

Upload it into your web directory and invoke it with your browser. Check the document root and the path to php.ini.

  • Were you editing the right part of the file?

Did you create a duplicate entry in php.ini? Add new settings to the end of LocalSettings.php, not to the beginning.

  • If you created a .htaccess, are you sure AllowOverrides is on?

Ask your hosting provider.

Ho una domanda a cui non è risposto qui. Cosa faccio?

Se non hai trovato risposta qui, vedi:

  • See the section below for information on how to contact developers and other knowledgeable users.

Still no luck. Where can I ask for help?

See the support venues listed on Comunicazione .

Vedi anche