diff --git a/admin/controllers/admin_theme_options.php b/admin/controllers/admin_theme_options.php index 5ac51396..730ce3aa 100644 --- a/admin/controllers/admin_theme_options.php +++ b/admin/controllers/admin_theme_options.php @@ -82,6 +82,9 @@ class Admin_Theme_Options_Controller extends Admin_Controller { $group->input("appletouchicon") ->label(t("URL (or relative path) to your apple-touch-icon.png")) ->value(module::get_var("gallery", "appletouchicon_url")); + $group->input("slideshow_time") + ->label(t("Slideshow timeout (in ms)")) + ->value(module::get_var("th_pear4gallery3", "slideshow_time", "5000")); /* Advanced Options - General ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -218,7 +221,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller { protected function reset_theme() { // Default core theme settings - module::set_var("gallery", "page_size", 9); + module::set_var("gallery", "page_size", 50); module::set_var("gallery", "resize_size", 640); module::set_var("gallery", "thumb_size", 200); module::set_var("gallery", "header_text", ""); @@ -290,6 +293,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller { module::set_var("gallery", "appletouchicon_url", $form->edit_theme->appletouchicon->value); $this->save_item_state("logo_path", $form->edit_theme->logo_path->value, $form->edit_theme->logo_path->value); + $this->save_item_state("slideshow_time", $form->edit_theme->slideshow_time->value != "5000", filter_var($form->edit_theme->slideshow_time->value, FILTER_VALIDATE_INT, array('options' => array('default' => 5000, 'min_range' => 1000)))); // * Advanced Options - General ****************************************** diff --git a/js/pear.js b/js/pear.js index 50a0d680..d06aef1c 100644 --- a/js/pear.js +++ b/js/pear.js @@ -18,6 +18,7 @@ var hideHoverV = null; var hovering = false; var maxSize; var mosaicEffect = ""; +var slideshowTimeout = 5000; function thumbPadding() { var size, width, margin; @@ -317,7 +318,7 @@ function togglePlayPause() { if (slideShow === null) { $('#play_detail').hide(); $('#pause_detail').show(); - slideShow = setTimeout("slideShowUpdate()", 5000); + slideShow = setTimeout("slideShowUpdate()", slideshowTimeout); } else { //We are playing $('#pause_detail').hide(); $('#play_detail').show(); @@ -343,7 +344,7 @@ function slideShowUpdate() { slideShowId = 0; } swatchImg(slideShowId); - slideShow = setTimeout("slideShowUpdate()", 5000); + slideShow = setTimeout("slideShowUpdate()", slideshowTimeout); } function switchMode(mode) { diff --git a/views/album.html.php b/views/album.html.php index d2dff831..b912e149 100644 --- a/views/album.html.php +++ b/views/album.html.php @@ -2,6 +2,7 @@