Extension:TemplateSandbox/hi
- This is technical documentation of the extension. There is also a user documentation.
![]() प्रकाशन की स्थिति: स्थिर |
|
---|---|
![]() |
|
कार्यान्वयन | विशेष पृष्ठ , पृष्ठ एक्शन |
विवरण | Preview pages using sandboxed templates |
लेखक | Brad Jorsch (Anomieवार्ता) |
नवीनतम संस्करण | 1.1.0 (continuous updates) |
संगतता नीति | मीडियाविकि के साथ प्रकाशित स्नैपशॉट्स। मास्टर में पीछे की तरफ से संगतता नहीं है। |
MediaWiki | 1.35+ |
PHP | 7.0+ |
लाइसेंस | GNU साधारण सार्वजनिक लाइसेंस 2.0 या उसके बाद |
डाउनलोड करें | |
|
|
TemplateSandbox एक्सटेंशन को अनुवादित करें अगर यह translatewiki.net पर उपलब्ध है | |
मुद्दे | अधूरे कार्य · बग की रिपोर्ट करें |
The TemplateSandbox extension adds the ability to preview a page using sandboxed versions of templates, allowing for easy testing before making the sandbox code live. It also works with Scribunto modules.
स्थापित
- फाइलों को डाउनलोड करें और अपने
extensions/
फोल्डर केTemplateSandbox
नामक डिरेक्ट्री में डालें। - अपनी $LocalSettings के नीचे निम्नलिखित कोड जोड़ें:
wfLoadExtension( 'TemplateSandbox' );
- पूर्ण – अपने विकि पर Special:Version पर जाकर देखें कि एक्सटेंशन को सफलतापूर्वक स्थापित किया गया है कि नहीं।
मीडिया 1.24 या इससे पहले के सदस्यों के लिए:
ऊपर दिए गए निर्देश wfLoadExtension()
का उपयोग करके इस एक्सटेंशन को स्थापित करने के नए तरीके का वर्णन करते हैं।
अगर आप इस एक्सटेंशन को पहले के इन संस्करणों (मीडियाविकि 1.24 और उससे पहले) में स्थापित करना चाहते हैं, wfLoadExtension( 'TemplateSandbox' );
की जगह इसका इस्तेमाल करें:
require_once "$IP/extensions/TemplateSandbox/TemplateSandbox.php";
विन्यास
- Parameters
$wgTemplateSandboxEditNamespaces
- Namespaces in which to show the "Preview page with this template" box below the edit form.NS_TEMPLATE
by default. Can be expanded to all namespaces by individual users using advancedtemplatesandbox.js.
उपयोग
The extension adds a new special page, Special:TemplateSandbox. To preview a page using sandboxed templates, do the following:
- Copy the templates to be tested under a common prefix. For example, you might copy
Template:Foo
toUser:Example/sandbox/Template:Foo
. Alternatively, you might createUser:Example/sandbox/Template:Foo
as a redirect toTemplate:Foo/sandbox
. - Go to Special:TemplateSandbox. Fill in the page or revision to be rendered, and the prefix you chose in step 1. It is possible to specify multiple prefixes (a prefix search path) by separating them using vertical bars, e.g.
User:Example/sandbox1|User:Example/sandbox2
. - Click View.
The extension also adds a box at the bottom of the edit form for pages in the namespaces configured in $wgTemplateSandboxEditNamespaces
.
This allows for previewing some other page as it would appear were the template being edited saved with the current contents of the edit form.
The box can be forced to appear in the edit form for any page by adding the query parameter wpTemplateSandboxShow
to the URL.
यह भी देखें
- Help:ExpandTemplates
- Extension:SandboxLink
- Extension:Scribunto − This extension also allows for sandboxing Scribunto modules.
इस एक्सटेंशन का इस्तेमाल एक या अधिक विकिमीडिया परियोजनाओं पर किया जा रहा है। इसका शायद मतलब है कि एक्सटेंशन स्थिर है और इस तरह के अधिक दर्शकों वाले वेबसाइटों द्वारा उपयोग किए जाने के लिए पर्याप्त रूप से काम करता है। विकिमीडिया की CommonSettings.php और InitialiseSettings.php कॉन्फ़िगरेशन फ़ाइलों में इस एक्सटेंशन का नाम खोजें, और यह वहीं स्थापित होगा। किसी विशिष्ट विकि पर स्थापित एक्सटेंशन्स की पूरी सूची को विकि के Special:Version पृष्ठ पर देखा जा सकता है। |