[ class tree: plugins ] [ index: plugins ] [ all elements ]

Procedural File: slideshow.php

Source Location: /zp-extensions/slideshow.php

Page Details

Supports showing slideshows of images in an album.

Plugin Option 'slideshow_size' -- Size of the images Plugin Option 'slideshow_mode' -- The player to be used Plugin Option 'slideshow_effect' -- The cycle effect Plugin Option 'slideshow_speed' -- How fast it runs Plugin Option 'slideshow_timeout' -- Transition time Plugin Option 'slideshow_showdesc' -- Allows the show to display image descriptions

The theme files 'slideshow.php', 'slideshow.css', and 'slideshow-controls.png' must reside in the theme folder. If you are creating a custom theme, copy these files form the "default" theme of the Zenphoto distribution. Note that the Colorbox mode does not require these files as it is called on your theme's image.php and album.php direclty via the slideshow button. The Colorbox plugin must be enabled and setup for these pages.

NOTE: The jQuery Cycle and the jQuery Colorbox modes do not support movie and audio files. If you need to show them please use the Flash mode. In Colorbox mode there will be no slideshow button on the image page if that current image is a movie/audio file.

Author:  Malte Müller (acrylian), Stephen Billard (sbillard), Don Peterson (dpeterson)
Classes
Class Description
slideshowOptions Plugin option handling class
Functions
is_valid  [line 269]

Returns the file extension if the item passed is displayable by the player

Parameters:
mixed   $image:  either an image object or the filename of an image.
array   $valid_types:  list of the types we will accept


string; is_valid( mixed $image, array $valid_types  )

[ Top ]
printSlideShow  [line 304]

Prints the slideshow using the jQuery plugin Cycle (http://http://www.malsup.com/jquery/cycle/) or Flash based using Flowplayer3 http://flowplayer.org if installed

Two ways to use: a) Use on your theme's slideshow.php page and called via printSlideShowLink(): If called from image.php it starts with that image, called from album.php it starts with the first image (jQuery only) To be used on slideshow.php only and called from album.php or image.php.

b) Calling directly via printSlideShow() function (jQuery mode recommended) Call printSlideShowJS() function in the head section of the theme page you want to use the slideshow on. Then place the printSlideShow() function where you want the slideshow to appear and set $albumobj and if needed $imageobj. The controls are disabled automatically.

NOTE: The jQuery mode does not support movie and audio files anymore. If you need to show them please use the Flash mode. Also note that this function is not used for the Colorbox mode!

Parameters:
bool   $heading:  set to true (default) to emit the slideshow breadcrumbs in flash mode
bool   $speedctl:  controls whether an option box for controlling transition speed is displayed
obj   $albumobj:  The object of the album to show the slideshow of. If set this overrides the POST data of the printSlideShowLink()
obj   $imageobj:  The object of the image to start the slideshow with. If set this overrides the POST data of the printSlideShowLink(). If not set the slideshow starts with the first image of the album.
int   $width:  The width of the images (jQuery mode). If set this overrides the size the slideshow_width plugin option that otherwise is used.
int   $height:  The heigth of the images (jQuery mode). If set this overrides the size the slideshow_height plugin option that otherwise is used.
bool   $crop:  Set to true if you want images cropped width x height (jQuery mode only)
bool   $shuffle:  Set to true if you want random (shuffled) order


void printSlideShow( [bool $heading = true], [bool $speedctl = false], [obj $albumobj = ""], [obj $imageobj = ""], [int $width = ""], [int $height = ""], [bool $crop = false], [bool $shuffle = false]  )

[ Top ]
printSlideShowJS  [line 713]

Prints the path to the slideshow JS and CSS (printed because some values need to be changed dynamically).

CSS can be adjusted To be used on slideshow.php


void printSlideShowJS( )

[ Top ]
printSlideShowLink  [line 107]

Prints a link to call the slideshow (not shown if there are no images in the album) To be used on album.php and image.php A CSS id names 'slideshowlink' is attached to the link so it can be directly styled.

If the mode is set to "jQuery Colorbox" and the Colorbox plugin is enabled this link starts a Colorbox slideshow from a hidden HTML list of all images in the album. On album.php it starts with the first always, on image.php with the current image.

Parameters:
string   $linktext:  Text for the link
string   $linkstyle:  Style of Text for the link


void printSlideShowLink( [string $linktext = ''], [string $linkstyle = '']  )

[ Top ]


Documentation generated on Tue, 20 Dec 2011 16:08:09 +0100 by phpDocumentor 1.4.3