Erweiterung:BootstrapComponents
BootstrapComponents Freigabestatus: stabil |
|
---|---|
Einbindung | Parser-Erweiterung |
Beschreibung | Aims to provide editors with an easy access to certain components introduced by Bootstrap 4 |
Autor(en) | Tobias Oetterer (OettererDiskussion) |
Letzte Version | 5.2.1 (2024-07-16) |
MediaWiki | 1.39+ |
PHP | 8.0+ |
Datenbankänderungen | Nein |
Composer | mediawiki/bootstrap-components |
Lizenz | GNU General Public License 3.0 oder neuer |
Herunterladen | GitHub: README RELEASE-NOTES |
Beispiel | |
|
|
see components.md |
|
The BootstrapComponents extension provides editors with easy access to certain components introduced by Bootstrap 4.
Installation
There are two ways you can install this extension: you can use Composer for installation, activation, and dependency management, or you can do this all manually.
Composer
This is the easiest and only recommended approach.
Just run the following command:
COMPOSER=composer.local.json composer require mediawiki/bootstrap-components "^5.0"
It will add the following to composer.local.json
:
{
"require": {
"mediawiki/bootstrap-components": "^5.0"
}
}
Manually (Not recommended)
You must download the extension on your own. 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 must manually enable the extension in your configuration.
Previously, this would automatically be done by Composer. Please add the following line to your LocalSettings.php:
wfLoadExtension( 'Bootstrap' );
wfLoadExtension( 'BootstrapComponents' );
Konfiguration
You can change some of the behavior 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
.
This extension can 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>
-a tag which, when used turns your gallery into a carousel.
For Information on how to use galleries, please see the gallery documentation.
Beispiele
Siehe auch
- Supported skins
- Dependencies
- Other solutions
Notes
Diese Erweiterung ist in den folgenden Softwarepaketen enthalten und/oder wird von den folgenden Wiki-Farmen, bzw. Wiki-Hostern verwendet: Dies ist keine maßgebliche Liste. Softwarepakete und/oder Wiki-Farmen, bzw. Wiki-Hoster nutzen diese Erweiterung ggf., obwohl sie nicht in dieser Liste enthalten sind. Prüfe daher stets die Nutzung im verwendeten Softwarepaket und/oder bei der Wiki-Farm, bzw. dem Wiki-Hoster. |
- Stable extensions/de
- Parser extensions/de
- Extensions supporting Composer/de
- GPL licensed extensions/de
- Extensions in GitHub version control/de
- GalleryGetModes extensions/de
- ImageBeforeProduceHTML extensions/de
- InternalParseBeforeLinks extensions/de
- OutputPageParserOutput extensions/de
- ParserAfterParse extensions/de
- ParserFirstCallInit extensions/de
- ScribuntoExternalLibraries extensions/de
- SetupAfterCache extensions/de
- All extensions/de
- Extensions included in Canasta/de
- Extensions included in MyWikis/de
- Extensions included in ProWiki/de
- Skin extensions/de