*
* @param Array $options Attributes of gallery tag.
*/
- public function setAdditionalOptions( $options ) { }
+ public function setAdditionalOptions( $options ) {
+ }
/**
* Instruct the class to use a specific skin for rendering
? $this->mParser->getTargetLanguage()
: $this->getLanguage();
}
-
/* Old constants no longer used.
const THUMB_PADDING = 30;
const GB_PADDING = 5;
const GB_BORDERS = 8;
*/
-
}
*/
class NolinesImageGallery extends TraditionalImageGallery {
-
protected function getThumbPadding() {
return 0;
}
*/
class PackedImageGallery extends TraditionalImageGallery {
-
function __construct( $mode = 'traditional' ) {
parent::__construct( $mode );
// Does not support per row option.
// factor, so use random big number.
$width = $this->mHeights * 10 + 100;
}
+
// self::SCALE_FACTOR so the js has some room to manipulate sizes.
return array(
'width' => $width * self::SCALE_FACTOR,
if ( $thumbWidth < 60 * self::SCALE_FACTOR ) {
$thumbWidth = 60 * self::SCALE_FACTOR;
}
+
return $thumbWidth / self::SCALE_FACTOR + $this->getThumbPadding();
}
*/
protected function getGBWidth( $thumb ) {
$thumbWidth = $thumb ? $thumb->getWidth() : $this->mWidths * self::SCALE_FACTOR;
+
return $this->getThumbDivWidth( $thumbWidth ) + $this->getGBPadding();
}
*/
class PackedOverlayImageGallery extends PackedImageGallery {
-
/**
* Add the wrapper html around the thumb's caption
*
$captionWidth = ceil( $thumbWidth - 20 );
$outerWrapper = '<div class="gallerytextwrapper" style="width: ' . $captionWidth . 'px">';
+
return "\n\t\t\t" . $outerWrapper . '<div class="gallerytext">' . "\n"
- . $galleryText
- . "\n\t\t\t</div>";
+ . $galleryText
+ . "\n\t\t\t</div>";
}
}
* falls back to PackedHoverGallery. Degrades gracefully for
* screen readers.
*/
-class PackedHoverImageGallery extends PackedOverlayImageGallery { }
+class PackedHoverImageGallery extends PackedOverlayImageGallery {
+}
*/
class TraditionalImageGallery extends ImageGalleryBase {
-
/**
* Return a HTML representation of the image gallery
*
# Weird double wrapping (the extra div inside the li) needed due to FF2 bug
# Can be safely removed if FF2 falls completely out of existence
- $output .=
- "\n\t\t" . '<li class="gallerybox" style="width: ' . $this->getGBWidth( $thumb ) . 'px">'
- . '<div style="width: ' . $this->getGBWidth( $thumb ) . 'px">'
- . $thumbhtml
- . $galleryText
- . "\n\t\t</div></li>";
+ $output .= "\n\t\t" . '<li class="gallerybox" style="width: ' . $this->getGBWidth( $thumb ) . 'px">'
+ . '<div style="width: ' . $this->getGBWidth( $thumb ) . 'px">'
+ . $thumbhtml
+ . $galleryText
+ . "\n\t\t</div></li>";
}
$output .= "\n</ul>";
# http://bugzilla.wikimedia.org/show_bug.cgi?id=1765 -Ævar
return "\n\t\t\t" . '<div class="gallerytext">' . "\n"
- . $galleryText
- . "\n\t\t\t</div>";
+ . $galleryText
+ . "\n\t\t\t</div>";
}
/**
* @param MediaTransformOutput $thumb The thumbnail
* @param Array $imageParameters Array of options
*/
- protected function adjustImageParameters( $thumb, &$imageParameters ) { }
+ protected function adjustImageParameters( $thumb, &$imageParameters ) {
+ }
}
/**