साँचा:ExtensionInstall
- फ़ाइलों को डाउनलोड करें और अपने
extensions/फ़ोल्डर केExtensionInstallनामक डिरेक्ट्री में डालें।
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ExtensionInstall
- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
require_once "$IP/extensions/ExtensionInstall/ExtensionInstall.php";
पूर्ण – अपने विकि पर Special:Versionपर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
| Uses Lua: |
प्रयोग
Installation instructions.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Extension name | 1 | Set the extension name manually.
| String | optional |
| Git submodule | git-submodule | Add --recurse-submodules to the git clone command | Boolean | optional |
| Vagrant role name | vagrant | If given, shows how to install extension with the Vagrant's enable-role command | String | optional |
| Download link | download-link | Overwrite the download link.
| URL | optional |
| LocalSettings early | localsettingsearly | Pass custom php code that the user should include in [[LocalSettings.php]] before the extension is loaded.
| Unknown | optional |
| LocalSettings | localsettings | Pass custom PHP code that the user should include in [[LocalSettings.php]].
| Unknown | optional |
| Database update | db-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.)
| Boolean | optional |
| Composer | composer | 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.
| Boolean | optional |
| Custom steps 0 | custom-steps0 | Additional steps before download, e.g. other required extensions (as an unordered "* list"). | Content | optional |
| Custom steps | custom-steps | Additional steps (as an unordered "* list"). | Content | optional |
| Supports registration | registration | 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. | String | optional |
| No registration version | no-registration-version | The MediaWiki version for which extension registration should not be used.
| Unknown | optional |
See also
उदाहरण
इस साँचे का उपयोग करने के कुछ उदाहरण नीचे दिए गए हैं:
सरल
{{ExtensionInstall}}
- फ़ाइलों को डाउनलोड करें और अपने
extensions/फ़ोल्डर केMyExtensionनामक डिरेक्ट्री में डालें।
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
require_once "$IP/extensions/MyExtension/MyExtension.php";पूर्ण – अपने विकि पर
Special:Versionपर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
नाम
{{ExtensionInstall|CategoryTree}}
- फ़ाइलों को डाउनलोड करें और अपने
extensions/फ़ोल्डर केCategoryTreeनामक डिरेक्ट्री में डालें।
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
require_once "$IP/extensions/CategoryTree/CategoryTree.php";पूर्ण – अपने विकि पर
Special:Versionपर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
डाउनलोड की कड़ी
{{ExtensionInstall
|download-link=[http://bits.wikimedia.org/example.zip Download]
}}
- फ़ाइलों को Download और अपने
extensions/फ़ोल्डर केMyExtensionनामक डिरेक्ट्री में डालें।- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
require_once "$IP/extensions/MyExtension/MyExtension.php";पूर्ण – अपने विकि पर
Special:Versionपर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
LocalSettings
{{ExtensionInstall
|localsettings=
$wgUseAjax = true;
}}
- फ़ाइलों को डाउनलोड करें और अपने
extensions/फ़ोल्डर केMyExtensionनामक डिरेक्ट्री में डालें।
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
require_once "$IP/extensions/MyExtension/MyExtension.php"; $wgUseAjax = true;पूर्ण – अपने विकि पर
Special:Versionपर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
LocalSettings मगर जल्दी
{{ExtensionInstall
|localsettingsearly=
$wgUseAjax = true; // This must be included before the extension is loaded
}}
- फ़ाइलों को डाउनलोड करें और अपने
extensions/फ़ोल्डर केMyExtensionनामक डिरेक्ट्री में डालें।
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
$wgUseAjax = true; // This must be included before the extension is loaded require_once "$IP/extensions/MyExtension/MyExtension.php";पूर्ण – अपने विकि पर
Special:Versionपर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
डेटाबेस अपडेट
{{ExtensionInstall
|db-update=Yes
}}
- फ़ाइलों को डाउनलोड करें और अपने
extensions/फ़ोल्डर केMyExtensionनामक डिरेक्ट्री में डालें।
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
require_once "$IP/extensions/MyExtension/MyExtension.php";- अपडेट स्क्रिप्ट चलाएँ जो स्वचालित रूप से आवश्यक डेटाबेस टेबल्स का निर्माण करेगा जिसकी इस एक्सटेंशन को आवश्यकता है।
पूर्ण – अपने विकि पर
Special:Versionपर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
Composer
{{ExtensionInstall
|composer=Yes
}}
- फ़ाइलों को डाउनलोड करें और अपने
extensions/फ़ोल्डर केMyExtensionनामक डिरेक्ट्री में डालें।
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension- सिर्फ गिट से डाउनलोड करते समय एक्सटेंशन डिरेक्ट्री से
composer install --no-devप्रकाशित करके PHP निर्भरताएँ स्थापित करने के लिए Composer चलाएँ। (संभावित जटिलताओं के लिए T173141 देखें।)- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
require_once "$IP/extensions/MyExtension/MyExtension.php";पूर्ण – अपने विकि पर
Special:Versionपर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
अनुकूलित चरण
{{ExtensionInstall
|custom-steps=
* Lorem ipsum dolor sit amet
* Foo bar baz quux [[sandbox]]
}}
- फ़ाइलों को डाउनलोड करें और अपने
extensions/फ़ोल्डर केMyExtensionनामक डिरेक्ट्री में डालें।
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
require_once "$IP/extensions/MyExtension/MyExtension.php";- Lorem ipsum dolor sit amet
- Foo bar baz quux sandbox
पूर्ण – अपने विकि पर
Special:Versionपर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
सहायता पंजीकरण
{{ExtensionInstall
|registration=1
}}
- फ़ाइलों को डाउनलोड करें और अपने
extensions/फ़ोल्डर केMyExtensionनामक डिरेक्ट्री में डालें।
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
wfLoadExtension( 'MyExtension' );पूर्ण – अपने विकि पर
Special:Versionपर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
Support registration with minimum version
{{ExtensionInstall
|registration=1
|no-registration-version=1.39
}}
- फ़ाइलों को डाउनलोड करें और अपने
extensions/फ़ोल्डर केMyExtensionनामक डिरेक्ट्री में डालें।
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
wfLoadExtension( 'MyExtension' );पूर्ण – अपने विकि पर
Special:Versionपर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।मीडियाविकि 1.39 या इससे पहले के सदस्यों के लिए:
ऊपर दिए गए निर्देश
wfLoadExtension()का उपयोग करके इस एक्सटेंशन को स्थापित करने के नए तरीके का वर्णन करते हैं। अगर आप इस एक्सटेंशन को पहले के इन संस्करणों (मीडियाविकि 1.39 और उससे पहले) में स्थापित करना चाहते हैं,wfLoadExtension( 'MyExtension' );की जगह इसका इस्तेमाल करें:require_once "$IP/extensions/MyExtension/MyExtension.php";
This only works if the version specified is 1.39 or later, otherwise the template assumes nobody cares about ancient versions and falls back to #Require registration.
पंजीकरण की आवश्यकता
{{ExtensionInstall
|registration=required
}}
- फ़ाइलों को डाउनलोड करें और अपने
extensions/फ़ोल्डर केMyExtensionनामक डिरेक्ट्री में डालें।
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
wfLoadExtension( 'MyExtension' );पूर्ण – अपने विकि पर
Special:Versionपर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
सब कुछ
{{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
}}
- फ़ाइलों को Download और अपने
extensions/फ़ोल्डर केExampleनामक डिरेक्ट्री में डालें।- सिर्फ गिट से डाउनलोड करते समय एक्सटेंशन डिरेक्ट्री से
composer install --no-devप्रकाशित करके PHP निर्भरताएँ स्थापित करने के लिए Composer चलाएँ। (संभावित जटिलताओं के लिए T173141 देखें।)- अपने LocalSettings.php फ़ाइल के अंत में निम्न कोड जोड़ें:
wfLoadExtension( 'Example' ); $wgUseAjax = true;- अपडेट स्क्रिप्ट चलाएँ जो स्वचालित रूप से आवश्यक डेटाबेस टेबल्स का निर्माण करेगा जिसकी इस एक्सटेंशन को आवश्यकता है।
- Lorem ipsum dolor sit amet
- Foo bar baz quux sandbox
पूर्ण – अपने विकि पर
Special:Versionपर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।मीडियाविकि 1.39 या इससे पहले के सदस्यों के लिए:
ऊपर दिए गए निर्देश
wfLoadExtension()का उपयोग करके इस एक्सटेंशन को स्थापित करने के नए तरीके का वर्णन करते हैं। अगर आप इस एक्सटेंशन को पहले के इन संस्करणों (मीडियाविकि 1.39 और उससे पहले) में स्थापित करना चाहते हैं,wfLoadExtension( 'Example' );की जगह इसका इस्तेमाल करें:require_once "$IP/extensions/Example/Example.php";
Vagrant स्थापना:
- अगर आप Vagrant का इस्तेमाल कर रहे हैं, तो
vagrant roles enable example --provisionसे स्थापित करें