MediaWiki  REL1_24
PackedOverlayImageGallery.php
Go to the documentation of this file.
00001 <?php
00024 class PackedOverlayImageGallery extends PackedImageGallery {
00033     protected function wrapGalleryText( $galleryText, $thumb ) {
00034 
00035         // If we have no text, do not output anything to avoid
00036         // ugly white overlay.
00037         if ( trim( $galleryText ) === '' ) {
00038             return '';
00039         }
00040 
00041         # ATTENTION: The newline after <div class="gallerytext"> is needed to
00042         # accommodate htmltidy which in version 4.8.6 generated crackpot HTML
00043         # in its absence, see: http://bugzilla.wikimedia.org/show_bug.cgi?id=1765
00044         # -Ævar
00045 
00046         $thumbWidth = $this->getGBWidth( $thumb ) - $this->getThumbPadding() - $this->getGBPadding();
00047         $captionWidth = ceil( $thumbWidth - 20 );
00048 
00049         $outerWrapper = '<div class="gallerytextwrapper" style="width: ' . $captionWidth . 'px">';
00050 
00051         return "\n\t\t\t" . $outerWrapper . '<div class="gallerytext">' . "\n"
00052             . $galleryText
00053             . "\n\t\t\t</div></div>";
00054     }
00055 }
00056 
00063 class PackedHoverImageGallery extends PackedOverlayImageGallery {
00064 }