[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/gallery/ -> TraditionalImageGallery.php (summary)

(no description)

File Size: 338 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

TraditionalImageGallery:: (12 methods):
  toHTML()
  wrapGalleryText()
  getThumbPadding()
  getGBPadding()
  getGBBorders()
  getAllPadding()
  getVPad()
  getThumbParams()
  getThumbDivWidth()
  getGBWidth()
  getModules()
  adjustImageParameters()

ImageGallery:: (1 method):
  __construct()


Class: TraditionalImageGallery  - X-Ref

Image gallery.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
http://www.gnu.org/copyleft/gpl.html

toHTML()   X-Ref
Return a HTML representation of the image gallery

For each image in the gallery, display
- a thumbnail
- the image name
- the additional text provided when adding the image
- the size of the image

return: string

wrapGalleryText( $galleryText, $thumb )   X-Ref
Add the wrapper html around the thumb's caption

param: string $galleryText The caption
param: MediaTransformOutput|bool $thumb The thumb this caption is for
return: string

getThumbPadding()   X-Ref
How much padding such the thumb have between image and inner div that
that contains the border. This is both for verical and horizontal
padding. (However, it is cut in half in the vertical direction).

return: int

getGBPadding()   X-Ref

return: int

getGBBorders()   X-Ref
Get how much extra space the borders around the image takes up.

For this mode, it is 2px borders on each side + 2px implied padding on
each side from the stylesheet, giving us 2*2+2*2 = 8.
return: int

getAllPadding()   X-Ref
Get total padding.

return: int Number of pixels of whitespace surrounding the thumbnail.

getVPad( $boxHeight, $thumbHeight )   X-Ref
Get vertical padding for a thumbnail

Generally this is the total height minus how high the thumb is.

param: int $boxHeight How high we want the box to be.
param: int $thumbHeight How high the thumbnail is.
return: int Vertical padding to add on each side.

getThumbParams( $img )   X-Ref
Get the transform parameters for a thumbnail.

param: File $img The file in question. May be false for invalid image
return: array

getThumbDivWidth( $thumbWidth )   X-Ref
Get the width of the inner div that contains the thumbnail in
question. This is the div with the class of "thumb".

param: int $thumbWidth The width of the thumbnail.
return: int Width of inner thumb div.

getGBWidth( $thumb )   X-Ref
Width of gallerybox <li>.

Generally is the width of the image, plus padding on image
plus padding on gallerybox.

param: MediaTransformOutput|bool $thumb MediaTransformObject object or false.
return: int Width of gallerybox element

getModules()   X-Ref
Get a list of modules to include in the page.

Primarily intended for subclasses.

return: array Modules to include

adjustImageParameters( $thumb, &$imageParameters )   X-Ref
Adjust the image parameters for a thumbnail.

Used by a subclass to insert extra high resolution images.
param: MediaTransformOutput $thumb The thumbnail
param: array $imageParameters Array of options

Class: ImageGallery  - X-Ref

Backwards compatibility. This always uses traditional mode
if called the old way, for extensions that may expect traditional
mode.

__construct( $mode = 'traditional' )   X-Ref
No description



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1