Jump to content

Template:ExtensionInstall

From mediawiki.org
This page is a translated version of the page Template:ExtensionInstall and the translation is 56% complete.
Outdated translations are marked like this.
  • Download and move the extracted ExtensionInstall folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ExtensionInstall
    
  • Aggiungi il seguente codice al tuo $LocalSettings (preferibilmente alla fine):
    require_once "$IP/extensions/ExtensionInstall/ExtensionInstall.php";
    
  • Yes Done – Naviga in Special:Version nella tua wiki per verificare che l'estensione sia stata installata correttamente.
Manuale del template

Uso

Installation instructions.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Extension name1

Set the extension name manually.

Default
The current page name without namespace prefix.
Auto value
{{ROOTPAGENAME}}
Stringoptional
Git submodulegit-submodule

Add --recurse-submodules to the git clone command

Booleanoptional
Vagrant role namevagrant

If given, shows how to install extension with the Vagrant's enable-role command

Stringoptional
Download linkdownload-link

Overwrite the download link.

Default
Link to Special:ExtensionDistributor with the extension name.
URLoptional
LocalSettings earlylocalsettingsearly

Pass custom php code that the user should include in [[LocalSettings.php]] before the extension is loaded.

Example
$wgUseAjax = true; // Must be included before the extension is loaded
Unknownoptional
LocalSettingslocalsettings

Pass custom PHP code that the user should include in [[LocalSettings.php]].

Example
$wgUseAjax = true;
Unknownoptional
Database updatedb-update

If the extension requires the update script to be run, set this parameter to any value. (For example, if it has one or more database tables that need to be created.)

Example
1
Booleanoptional
Composercomposer

If the extension uses Composer to manage dependencies, set this parameter to any value. Not that this does not indicate that the extension is able to be installed with Composer.

Default
false
Booleanoptional
Custom steps 0custom-steps0

Additional steps before download, e.g. other required extensions (as an unordered "* list").

Contentoptional
Custom stepscustom-steps

Additional steps (as an unordered "* list").

Contentoptional
Supports registrationregistration

Changes the template to use <code>wfLoadExtension()</code> if it supports registration. Set to any value if the extension supports registration, or to <code>required</code> if it <em>only</em> supports registration and doesn't support the old-style of loading.

Stringoptional
No registration versionno-registration-version

The MediaWiki version for which extension registration should not be used.

Default
1.24
Unknownoptional

See also

Esempi

Sotto alcuni esempi sull'uso di questo template:

Semplice

{{ExtensionInstall}}
  • Download and move the extracted MyExtension folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension
    
  • Aggiungi il seguente codice al tuo $LocalSettings (preferibilmente alla fine):
    require_once "$IP/extensions/MyExtension/MyExtension.php";
    
  • Yes Done – Naviga in Special:Version nella tua wiki per verificare che l'estensione sia stata installata correttamente.

Nome

{{ExtensionInstall|CategoryTree}}
  • Download and move the extracted CategoryTree folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
    
  • Aggiungi il seguente codice al tuo $LocalSettings (preferibilmente alla fine):
    require_once "$IP/extensions/CategoryTree/CategoryTree.php";
    
  • Yes Done – Naviga in Special:Version nella tua wiki per verificare che l'estensione sia stata installata correttamente.

{{ExtensionInstall
|download-link=[http://bits.wikimedia.org/example.zip Download]
}}
  • {{$3|[[$2|Scarica]]|Scarica}} e sposta il/i file in una directory chiamata MyExtension nella tua cartella extensions/.
  • Aggiungi il seguente codice al tuo $LocalSettings (preferibilmente alla fine):
    require_once "$IP/extensions/MyExtension/MyExtension.php";
    
  • Yes Done – Naviga in Special:Version nella tua wiki per verificare che l'estensione sia stata installata correttamente.

LocalSettings

{{ExtensionInstall
|localsettings=
$wgUseAjax = true;
}}
  • Download and move the extracted MyExtension folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension
    
  • Aggiungi il seguente codice al tuo $LocalSettings (preferibilmente alla fine):
    require_once "$IP/extensions/MyExtension/MyExtension.php";
    $wgUseAjax = true;
    
  • Yes Done – Naviga in Special:Version nella tua wiki per verificare che l'estensione sia stata installata correttamente.

LocalSettings early

{{ExtensionInstall
|localsettingsearly=
$wgUseAjax = true; // This must be included before the extension is loaded
}}
  • Download and move the extracted MyExtension folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension
    
  • Aggiungi il seguente codice al tuo $LocalSettings (preferibilmente alla fine):
    $wgUseAjax = true; // This must be included before the extension is loaded
    require_once "$IP/extensions/MyExtension/MyExtension.php";
    
  • Yes Done – Naviga in Special:Version nella tua wiki per verificare che l'estensione sia stata installata correttamente.

DB Update

{{ExtensionInstall
|db-update=Yes
}}
  • Download and move the extracted MyExtension folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension
    
  • Aggiungi il seguente codice al tuo $LocalSettings (preferibilmente alla fine):
    require_once "$IP/extensions/MyExtension/MyExtension.php";
    
  • Esegui lo script di aggiornamento, che creerà automaticamente nel database le tavole necessarie a questa estensione.
  • Yes Done – Naviga in Special:Version nella tua wiki per verificare che l'estensione sia stata installata correttamente.

Composer

{{ExtensionInstall
|composer=Yes
}}
  • Download and move the extracted MyExtension folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension
    
  • Solo durante l'installazione da git eseguire Composer per installare le dipendenze PHP, immettendo composer install --no-dev nella directory dell'estensione. (Vedere T173141 per potenziali complicazioni.)
  • Aggiungi il seguente codice al tuo $LocalSettings (preferibilmente alla fine):
    require_once "$IP/extensions/MyExtension/MyExtension.php";
    
  • Yes Done – Naviga in Special:Version nella tua wiki per verificare che l'estensione sia stata installata correttamente.

passaggi personalizzati

{{ExtensionInstall
|custom-steps=
* Lorem ipsum dolor sit amet
* Foo bar baz quux [[sandbox]]
}}
  • Download and move the extracted MyExtension folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension
    
  • Aggiungi il seguente codice al tuo $LocalSettings (preferibilmente alla fine):
    require_once "$IP/extensions/MyExtension/MyExtension.php";
    
  • Lorem ipsum dolor sit amet
  • Foo bar baz quux sandbox
  • Yes Done – Naviga in Special:Version nella tua wiki per verificare che l'estensione sia stata installata correttamente.

Support registration

{{ExtensionInstall
|registration=1
}}
  • Download and move the extracted MyExtension folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension
    
  • Aggiungi il seguente codice al tuo $LocalSettings (preferibilmente alla fine):
    wfLoadExtension( 'MyExtension' );
    
  • Yes Done – Naviga in Special:Version nella tua wiki per verificare che l'estensione sia stata installata correttamente.

Support registration with minimum version

{{ExtensionInstall
|registration=1
|no-registration-version=1.39
}}
  • Download and move the extracted MyExtension folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension
    
  • Aggiungi il seguente codice al tuo $LocalSettings (preferibilmente alla fine):
    wfLoadExtension( 'MyExtension' );
    
  • Yes Done – Naviga in Special:Version nella tua wiki per verificare che l'estensione sia stata installata correttamente.

Per gli utenti che eseguono MediaWiki 1.39 o versioni precedenti:

Le istruzioni sottostanti descrivono il nuovo metodo per installare questa estensione usando wfLoadExtension(). Se è necessario installare questa estensione su queste versioni precedenti (MediaWiki 1.39 e successive), al posto di wfLoadExtension( 'MyExtension' );, devi usare:

require_once "$IP/extensions/MyExtension/MyExtension.php";

This only works if the version specified is 1.35 or later, otherwise the template assumes nobody cares about ancient versions and falls back to #Require registration.

Registrazione richiesta

{{ExtensionInstall
|registration=required
}}
  • Download and move the extracted MyExtension folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension
    
  • Aggiungi il seguente codice al tuo $LocalSettings (preferibilmente alla fine):
    wfLoadExtension( 'MyExtension' );
    
  • Yes Done – Naviga in Special:Version nella tua wiki per verificare che l'estensione sia stata installata correttamente.

Completo

{{ExtensionInstall|Example
|download-link=[http://bits.wikimedia.org/example.zip Download]
|vagrant=example
|localsettings=
$wgUseAjax = true;

|db-update=Yes
|composer=Yes
|custom-steps=
* Lorem ipsum dolor sit amet
* Foo bar baz quux [[sandbox]]
|registration=yes
}}
  • {{$3|[[$2|Scarica]]|Scarica}} e sposta il/i file in una directory chiamata Example nella tua cartella extensions/.
  • Solo durante l'installazione da git eseguire Composer per installare le dipendenze PHP, immettendo composer install --no-dev nella directory dell'estensione. (Vedere T173141 per potenziali complicazioni.)
  • Aggiungi il seguente codice al tuo $LocalSettings (preferibilmente alla fine):
    wfLoadExtension( 'Example' );
    $wgUseAjax = true;
    
  • Esegui lo script di aggiornamento, che creerà automaticamente nel database le tavole necessarie a questa estensione.
  • Lorem ipsum dolor sit amet
  • Foo bar baz quux sandbox
  • Yes Done – Naviga in Special:Version nella tua wiki per verificare che l'estensione sia stata installata correttamente.

Per gli utenti che eseguono MediaWiki 1.39 o versioni precedenti:

Le istruzioni sottostanti descrivono il nuovo metodo per installare questa estensione usando wfLoadExtension(). Se è necessario installare questa estensione su queste versioni precedenti (MediaWiki 1.39 e successive), al posto di wfLoadExtension( 'Example' );, devi usare:

require_once "$IP/extensions/Example/Example.php";


Vagrant installation:

  • Se stai usando Vagrant , installa con vagrant roles enable example --provision