Instal Ekstensi

<languages/> Templat:ExtensionTypes Templat:TOCRight <translate> An extension let you customise how MediaWiki looks and works. </translate>

  • <translate> Wiki users can [[<tvar name=cat>Special:MyLanguage/Category:Extensions by category</tvar>|browse through extensions]].</translate>
  • <translate> System administrators can [[<tvar name=1>#Installing an extension</tvar>|install]] (or remove) extensions on the MediaWiki installations that they manage.</translate>
  • <translate> Developers can [[<tvar name=man>Special:MyLanguage/Manual:Developing extensions</tvar>|write new extensions]] or [[<tvar name=cat>Special:MyLanguage/Category:Unmaintained extensions</tvar>|improve or maintain extensions]]. </translate>

<translate> While some extensions are maintained by MediaWiki developers, others were written by third-party developers.</translate> <translate> As a result, many have bugs, and they are not all guaranteed to be compatible with each other.</translate> <translate> Some are unmaintained; not all extensions work on all versions of MediaWiki.</translate> <translate> Use any extension, especially those tagged as insecure, at your own risk.</translate> <translate> If you are using an extension that requires patches to the core software, be sure to back up your database.</translate> <translate> This helps avoid the risk of breaking your wiki.</translate>

<translate>

Types of extensionsSunting

</translate> Templat:ContentGrid

<translate>

Browsing extensionsSunting

</translate> <translate> You can browse <tvar name=cat>

  1. REDIRECT Template:Localized link</tvar> to see the full range of extensions that have already been written.</translate>

<translate> For information on installing these extensions or writing your own, see below.</translate>

<translate>

Checking installed extensionsSunting

</translate> <translate> Only someone with administration access to the filesystem (and often the database too) on a server can install extensions for MediaWiki, but anyone can check which extensions are active on an instance of MediaWiki by accessing the <tvar name=special>Special:Version</tvar> page.</translate> <translate> For example, these extensions are active in the English Wikipedia.</translate>

<translate>

Popular extensionsSunting

There are a number of ways of finding popular extensions. </translate>

<translate> The first set is those that are [[<tvar name="1">Special:MyLanguage/Bundled extensions and skins</tvar>|bundled with MediaWiki]] (a list that is reviewed regularly, and to which anyone can [[<tvar name="2">Special:MyLanguage/Suggestions for extensions to be integrated</tvar>|suggested an addition]]).</translate>

<translate> Extensions that are downloaded from MediaWiki.org via the <tvar name=1>

  1. REDIRECT Template:Localized link</tvar> mechanism have some statistics gathered.</translate>

<translate> The top 15 most downloaded extensions are listed at <tvar name="1">Special:ExtensionDistributor</tvar>, and applicable extensions have their download count shown in their infobox.</translate> <translate> Note that these numbers do not account for alternate ways of installing extensions, such as [[<tvar name="1">Special:MyLanguage/Download from Git#Using Git to download MediaWiki extensions</tvar>|via Git]] or [[<tvar name="2">Special:MyLanguage/Composer/For extensions</tvar>|Composer]].</translate>

<translate> A third option is to look at <tvar name="1">

  1. REDIRECT Template:Localized link</tvar>'s counts of wikis that extensions are installed on.</translate>

<translate> This has the advantage of representing actual installations and not just downloads (i.e. it queries the wiki's APIs), but it is also (as of 2023) not completely up to date.</translate> <translate> It also doesn't count installations on private wikis.</translate>

<translate>

Installing an extensionSunting

</translate> <translate> MediaWiki is ready to accept extensions just after [[<tvar name=man>Special:MyLanguage/Manual:Installation</tvar>|installation]] is finished.</translate> <translate> To add an extension follow these steps:</translate>

  1. <translate> Before you start</translate>
    <translate> Many extensions provide instructions designed for installation using Unix commands.</translate> <translate> You require shell access (SSH) to enter these commands listed on the extension help pages.</translate>
  2. <translate> Download your extension.</translate>
    <translate> [[<tvar name=special>Special:ExtensionDistributor</tvar>|Extension Distributor]] helps you to select and download most of the popular extensions.</translate>
    <translate> Extensions are usually distributed as modular packages.</translate> <translate> They generally go in their own subdirectory of <tvar name=IP>
  3. REDIRECT Template:Localized link/extensions/</tvar>.</translate> <translate> A list of extensions stored in the Wikimedia [[<tvar name=gerrit>Special:MyLanguage/Gerrit</tvar>|Git repository]] is located at <tvar name=extensions>git:mediawiki/extensions</tvar>.</translate> <translate> Some extensions [[<tvar name=cat>Special:MyLanguage/Category:Extensions which host their code in-wiki</tvar>|don't use version control]] and are not recommended.</translate>
    <translate> Some extensions are also available in [[<tvar name=1>Special:MyLanguage/Software bundles</tvar>|bundles]], <tvar name=composer>
  4. REDIRECT Template:Localized link</tvar> or [[<tvar name=2>Special:MyLanguage/Comparison of extensions in distributions</tvar>|package repositories]].</translate>
    <translate> It's recommended to read the <tvar name=1>README</tvar> file before installation.</translate> <translate> It usually contains important info about configuration.</translate>
  5. <translate> Install your extension.</translate>.
    <translate> At the end of the <tvar name=LocalSettings>
  6. REDIRECT Template:Localized link</tvar> file, add:</translate>
    wfLoadExtension( 'ExtensionName' );
    <translate> This line forces the PHP interpreter to read the extension file, and thereby make it accessible to MediaWiki.</translate>
    <translate> Some extensions can conflict with maintenance scripts, for example if they directly access $_SERVER (not recommended).</translate>
    <translate> In this case they can be wrapped in the conditional so maintenance scripts can still run.</translate>
    if ( !$wgCommandLineMode ) {
       wfLoadExtension ( 'ExtensionName' );
    }
    <translate> The maintenance script <tvar name=ImportDump>
  7. REDIRECT Template:Localized link</tvar> will fail for any extension which requires customised namespaces which is included inside the conditional above such as <tvar name=1>
  8. REDIRECT Template:Localized link</tvar>, <tvar name=2>
  9. REDIRECT Template:Localized link</tvar>.</translate>
<translate> Ensure that required permissions are set for extensions!</translate>
<translate> While this installation procedure is sufficient for most extensions, some require a different installation procedure.</translate> <translate> Check your extension's documentation for details.</translate>
<translate> If you want to alter configuration variables in LocalSettings.php, you have to do this typically after including the extension.</translate> <translate> Otherwise defaults defined in the extension will overwrite your settings.</translate>

<translate>

Upgrading an extensionSunting

</translate> <translate> Some extensions require to be updated whenever you update MediaWiki, while others work with multiple versions.</translate> <translate> To upgrade to a new version of an extension:</translate>

<translate>

  1. Download the new version of the extension</translate>

<translate>

  1. Replace all the extension files in the extensions/ExtensionName directory with the new files.</translate> <translate> Do not remove the extension configuration present in LocalSettings.php</translate>

<translate>

  1. If the extension requires changes to the MediaWiki database, you will need to run the <tvar name=1>
  2. REDIRECT Template:Localized link</tvar> maintenance script.</translate> <translate> Most extensions will mention if this script needs to be run or not.</translate> <translate> (Perform backup of your data before executing the script).</translate> <translate> If you don't have command line access, you can also use the [[<tvar name=man>Special:MyLanguage/Manual:Upgrading#Web_updater</tvar>|web updater]].</translate>
<translate> These instructions cover 99% of extensions.</translate> <translate> If the specific extension you are upgrading has instructions that differ from these, you should probably follow the specific extension's instructions</translate>

<translate>

Uninstalling an extensionSunting

Remove the line from LocalSettings.php with the extension name to uninstall it: </translate>

wfLoadExtension( 'ExtensionName' );

<translate>

  • You must remove any lines pertaining to the configuration of the extension.

See alsoSunting

</translate>

  1. REDIRECT Template:Localized link
  1. REDIRECT Template:Localized link
  1. REDIRECT Template:Localized link
  1. REDIRECT Template:Localized link - <translate> Information about translating extensions.</translate>

Templat:Extensions

[[Category:Customization techniques{{#translation:}}|Instal Ekstensi]] [[Category:Extension creation{{#translation:}}]]