Extension:BootstrapComponents/hi

From Linux Web Expert

मीडियाविकि एक्सटेंशन मैन्युअल
BootstrapComponents
प्रकाशन की स्थिति: स्थिर
कार्यान्वयन पर्सर एक्सटेंशन
विवरण सदस्यों को आसानी से Twitter Bootstrap 4 द्वारा परिचित अवयवों का इस्तेमाल करने का एक साधन प्रदान करता है
लेखक Tobias Oetterer (Oetterertalk)
नवीनतम संस्करण 5.1.1 (2023-09-07)
MediaWiki 1.35+
PHP 7.4+
डेटाबेस बदलता है नहीं
Composer mediawiki/bootstrap-components
लाइसेंस GNU साधारण सार्वजनिक लाइसेंस 3.0 या अधिक
डाउनलोड करें
README
RELEASE-NOTES
उदाहरण

  • $wgBootstrapComponentsDisableSourceLinkOnImageModal
  • $wgBootstrapComponentsEnableCarouselGalleryMode
  • $wgBootstrapComponentsModalReplaceImageTag
  • $wgBootstrapComponentsWhitelist
Quarterly downloads Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
Public wikis using Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').

BootstrapComponents एक्सटेंशन सदस्यों को आसानी से Twitter Bootstrap 4 द्वारा परिचित अवयवों का इस्तेमाल करने का एक साधन प्रदान करता है।

स्थापना

इस एक्सटेंशन को स्थापित करने के दो तरीके हैं: आप स्थापना, सक्रियण, और निर्भरता के प्रबंधन के लिए Composer का इस्तेमाल कर सकते हैं, या फिर आप ये सब काम खुद कर सकते हैं।

इस एक्सटेंशन को Bootstrap के संस्करण 4.0 या अधिक की ज़रूरत है। Composer की मदद से BootstrapComponents को स्थापित करने पर आपको इस बात की चिंता करने की ज़रूरत नहीं।

Composer

यह सबसे आसान और अनुशंसित माध्यम है।

बस यह कमांड चलाएँ:

COMPOSER=composer.local.json composer require mediawiki/bootstrap-components "^5.0"

यह निम्न भाग को composer.local.json में जोड़ देगा:

{
	"require": {
		"mediawiki/bootstrap-components": "^5.0"
	}
}

खुद

You need to download and activate the extension yourself. Also, you need to take care of dependencies.

  • First, you should take care of dependencies. That means installing the Bootstrap extension. See there for details on how to do this.
  • Then you need to download this extension, by cloning its repository using git. Venture into your extensions directory and run:
git clone https://github.com/oetterer/BootstrapComponents

You can also download the archive and extract it yourself.

Activation

Since release 4.0, you have to enable the extension in your configuration manually.

Previously, this would automatically be done by Composer. Please add the following line to your LocalSettings.php:

wfLoadExtension( 'Bootstrap' );
wfLoadExtension( 'BootstrapComponents' );

कॉन्फ़िगरेशन

You can change some of the behaviour of this extension with the following four settings inside your wiki's configuration.

Just add the corresponding line to your "LocalSettings.php" file.

$wgBootstrapComponentsWhitelist

Default setting is true.

This allows you to enable all, some, or none of the components inside your wiki code.

If you want all components available, set this to true:

$wgBootstrapComponentsWhitelist = true;

If you want only a selection of components, set this to an array containing the whitelisted components. For a list of all components, please refer to the documentation.

$wgBootstrapComponentsWhitelist = [ 'card', 'tooltip', 'modal' ];

When using modals[1], you might want to disable popovers[2].

See known issues for more.

To disable all components simply set this to false.

$wgBootstrapComponentsModalReplaceImageTag

Default setting is false.

You can have this extension change the normal image handling in your wiki. If you set this to true, all image tags not containing a link= parameter will be converted into a modal. So when you click on the image, instead of being referred to the corresponding page in the file namespace, a modal opens up showing the image with a possible caption (if you provided one) and a link to the source page of the file.

Example:

$wgBootstrapComponentsModalReplaceImageTag = true;

Most regular options that can be used with images are recognized and processed accordingly. Please see the help page for images.

Even after enabling this option you can suppress image modals on a given page by adding the magic word __NOIMAGEMODAL__ somewhere on the page. If you want to suppress modal conversion for an individual image, give it the css class no-modal.

Example:

[[File:NormalImage.png|class=no-modal|alt=normal|This image is displayed normally]]

Please see known issues for additional information.

$wgBootstrapComponentsDisableSourceLinkOnImageModal

Default setting is false.

When using image modals (thus having $wgBootstrapComponentsModalReplaceImageTag set to true) enabling this suppresses the source link in the footer section of the modal.

$wgBootstrapComponentsEnableCarouselGalleryMode

Default setting is true.

This adds the mode carousel to the ‎<gallery>-tag which, when used turns your gallery into a carousel. For Information on how to use galleries, please see the gallery documentation.

उदाहरण

ये भी देखें

Notes

  1. modal matches an element that is in a state in which it excludes all interaction with elements outside it until the interaction has been dismissed
  2. popover elements will appear above all other elements