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