Closed CrispyCrafter closed 7 years ago
Can you add the img-responsive
class to the images? e.g. [[File:Slider1.png|center|class=img-responsive|link=Page One]]
.
Thank you so much! Worked perfectly
<?php /**
@subpackage Skins */ class BootstrapMediaWikiTemplate extends QuickTemplate { /**
@access private */ public function execute() { global $wgRequest, $wgUser, $wgSitename, $wgSitenameshort, $wgCopyrightLink, $wgCopyright, $wgBootstrap, $wgArticlePath, $wgGoogleAnalyticsID, $wgSiteCSS; global $wgEnableUploads; global $wgLogo; global $wgTOCLocation; global $wgNavBarClasses; global $wgSubnavBarClasses; //$this->skin = $this->data['skin']; $action = $wgRequest->getText( 'action' ); $url_prefix = str_replace( '$1', '', $wgArticlePath ); // Suppress warnings to prevent notices about missing indexes in $this->data wfSuppressWarnings(); $this->html('headelement'); ?>
get_page_links('Bootstrap:Subnav') ) { ?>
I'm trying to implement a Bootstrap Carousel on the Main page of a MW site. For simplicity I am currently injecting the code directly into wikitext on Main. The code executes fine on desktop, but images fail to re-scale below 700px, In other words its hiding in overflow, not scaling.
The fix is simple, change the image scaling to, max-width=100% and height=auto. However, seeing as this information is parsed by MediaWiki with the link: [[File:Slider1.png|center|link=Page One]], this seems a bit more tricky.
Do you guys have any advice on maybe injecting this from the Bootstrap PHP side, without losing the wikitext functionality ? Maybe by using something like DynamicPageList3 and a random categorized page for the link and image ?
< div class="container"> < div id="SampleCarousel" class="carousel slide" data-ride="carousel" >
Think it would be a nice touch
MediaWiki 1.28.2 PHP 5.6.25 Bootstrap-mw – (4ef5a0f)