diff options
author | Andreas Unterkircher <unki@netshadow.at> | 2007-07-22 07:31:40 +0000 |
---|---|---|
committer | Andreas Unterkircher <unki@netshadow.at> | 2007-07-22 07:31:40 +0000 |
commit | a36bd6f4555cf410712611b5efcb82fdf5898551 (patch) | |
tree | c0a48ea6b1b8150000bbed758c23814b9b85a164 /phpfspot.class.php | |
parent | 168f6243a42314347bf385c9f79ccf0fdd7729c2 (diff) |
issue46, slideshow control (rew, pause/play/stop, fwd)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@239 fa6a889d-dae6-447d-9e79-4ba9a3039384
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r-- | phpfspot.class.php | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php index 825f92d..2a28135 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -105,6 +105,7 @@ class PHPFSPOT { $this->tmpl->assign('searchfor', $_SESSION['searchfor']); $this->tmpl->assign('page_title', $this->cfg->page_title); $this->tmpl->assign('current_condition', $_SESSION['tag_condition']); + $this->tmpl->assign('template_path', 'themes/'. $this->cfg->theme_name); $_SESSION['start_action'] = $_GET['mode']; @@ -150,7 +151,6 @@ class PHPFSPOT { $this->tmpl->assign('to_date', $this->get_calendar('to')); $this->tmpl->assign('sort_field', $this->get_sort_field()); $this->tmpl->assign('content_page', 'welcome.tpl'); - $this->tmpl->assign('template_path', 'themes/'. $this->cfg->theme_name); $this->tmpl->show("index.tpl"); @@ -1666,6 +1666,12 @@ class PHPFSPOT { } // get_sort_order() + /*** + * return the next to be shown slide show image + * + * this function returns the URL of the next image + * in the slideshow sequence. + */ public function getNextSlideShowImage() { $all_photos = $this->getPhotoSelection(); @@ -1683,6 +1689,29 @@ class PHPFSPOT { } // getNextSlideShowImage() + /*** + * return the previous to be shown slide show image + * + * this function returns the URL of the previous image + * in the slideshow sequence. + */ + public function getPrevSlideShowImage() + { + $all_photos = $this->getPhotoSelection(); + + if(!isset($_SESSION['slideshow_img']) || $_SESSION['slideshow_img'] == 0) + $_SESSION['slideshow_img'] = 0; + else + $_SESSION['slideshow_img']--; + + $server_name = $_SERVER['SERVER_NAME']; + if(!isset($_SERVER['HTTPS'])) $protocol = "http"; + else $protocol = "https"; + + return $protocol ."://". $server_name . $this->cfg->web_path ."phpfspot_img.php?idx=". $all_photos[$_SESSION['slideshow_img']] ."&width=". $this->cfg->photo_width; + + } // getPrevSlideShowImage() + public function resetSlideShow() { if(isset($_SESSION['slideshow_img'])) |