slideshow.php, slideshow.css and slideshow-controls.png need to be present in the theme folder.");
$plugin_author = "Malte Müller (acrylian), Stephen Billard (sbillard), Don Peterson (dpeterson)";
$plugin_version = '1.1.1';
$plugin_URL = "http://www.zenphoto.org/documentation/plugins/_plugins---slideshow.php.html";
$option_interface = new slideshowOptions();
/**
* Plugin option handling class
*
*/
class slideshowOptions {
function slideshowOptions() {
//setOptionDefault('slideshow_size', '595');
setOptionDefault('slideshow_width', '595');
setOptionDefault('slideshow_height', '595');
setOptionDefault('slideshow_watermark', '');
setOptionDefault('slideshow_mode', 'jQuery');
setOptionDefault('slideshow_effect', 'fade');
setOptionDefault('slideshow_speed', '500');
setOptionDefault('slideshow_timeout', '3000');
setOptionDefault('slideshow_showdesc', '');
// incase the flowplayer has not been enabled!!!
setOptionDefault('slideshow_flow_player_width', '640');
setOptionDefault('slideshow_flow_player_height', '480');
}
function getOptionsSupported() {
return array( gettext('Slide width') => array('key' => 'slideshow_width', 'type' => OPTION_TYPE_TEXTBOX,
'desc' => gettext("Width of the images in the slideshow. [jQuery mode option]
If empty the theme options image size is used.")),
gettext('Slide height') => array('key' => 'slideshow_height', 'type' => OPTION_TYPE_TEXTBOX,
'desc' => gettext("Height of the images in the slideshow. [jQuery mode option]
If empty the theme options image size is used.")),
gettext('Watermark') => array('key' => 'slideshow_watermark', 'type' => OPTION_TYPE_CHECKBOX,
'desc' => gettext("Check if you want to use your watermark on the images [jQuery mode option].")),
gettext('Mode') => array('key' => 'slideshow_mode', 'type' => OPTION_TYPE_SELECTOR,
'selections' => array(gettext("jQuery")=>"jQuery", gettext("flash")=>"flash"),
'desc' => gettext("jQuery for JS ajax slideshow, flash for flash based slideshow.)")),
gettext('Effect') => array('key' => 'slideshow_effect', 'type' => OPTION_TYPE_SELECTOR,
'selections' => array(gettext('fade')=>"fade", gettext('shuffle')=>"shuffle", gettext('zoom')=>"zoom", gettext('slide X')=>"slideX", gettext('slide Y')=>"slideY", gettext('scroll up')=>"scrollUp", gettext('scroll down')=>"scrollDown", gettext('scroll left')=>"scrollLeft", gettext('scroll right')=>"scrollRight"),
'desc' => gettext("The cycle slide effect to be used. [jQuery mode option]")),
gettext('Speed') => array('key' => 'slideshow_speed', 'type' => OPTION_TYPE_TEXTBOX,
'desc' => gettext("Speed of the transition in milliseconds.")),
gettext('Timeout') => array('key' => 'slideshow_timeout', 'type' => OPTION_TYPE_TEXTBOX,
'desc' => gettext("Milliseconds between slide transitions (0 to disable auto advance.) [jQuery mode option]")),
gettext('Description') => array('key' => 'slideshow_showdesc', 'type' => OPTION_TYPE_CHECKBOX,
'desc' => gettext("Check if you want to show the image's description below the slideshow [jQuery mode option].")),
gettext('flow player width') => array('key' => 'slideshow_flow_player_width', 'type' => OPTION_TYPE_TEXTBOX,
'desc' => gettext("Width of the Flowplayer display for the slideshow (Flash mode).")),
gettext('flow player height') => array('key' => 'slideshow_flow_player_height', 'type' => OPTION_TYPE_TEXTBOX,
'desc' => gettext("Height of the Flowplayer display for the slideshow (Flash mode)."))
);
}
function handleOption($option, $currentValue) {
}
}
$slideshow_instance = 0;
/**
* 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.
*
* @param string $linktext Text for the link
*/
function printSlideShowLink($linktext='') {
global $_zp_current_image, $_zp_current_album, $_zp_current_search, $slideshow_instance;
if (checkForPassword(true)) return;
if(empty($_GET['page'])) {
$pagenr = 1;
} else {
$pagenr = $_GET['page'];
}
$slideshowhidden = '';
if (in_context(ZP_SEARCH)) {
$imagenumber = '';
$imagefile = '';
$albumnr = 0;
$slideshowlink = rewrite_path("/page/slideshow","index.php?p=slideshow");
$slideshowhidden = '';
} else {
if(in_context(ZP_IMAGE)) {
$imagenumber = imageNumber();
$imagefile = $_zp_current_image->filename;
} else {
$imagenumber = "";
$imagefile = "";
}
if (in_context(ZP_SEARCH_LINKED)) {
$albumnr = -getAlbumID();
} else {
$albumnr = getAlbumID();
}
$slideshowlink = rewrite_path(pathurlencode($_zp_current_album->getFolder())."/page/slideshow","index.php?p=slideshow&album=".urlencode($_zp_current_album->getFolder()));
}
$numberofimages = getNumImages();
if($numberofimages != 0) {
?>