From 9ebbaf7dfd6c8c967cb03b92dc944a31f0dee708 Mon Sep 17 00:00:00 2001
From: Andreas Unterkircher <unki@netshadow.at>
Date: Sun, 25 May 2008 09:11:55 +0200
Subject: fix slideshow, web_path was not set correctly

Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
---
 phpfspot.class.php                     | 4 +++-
 phpfspot.js                            | 7 ++++++-
 themes/default/templates/slideshow.tpl | 2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/phpfspot.class.php b/phpfspot.class.php
index 3f06a87..9a11069 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -303,7 +303,9 @@ class PHPFSPOT {
                return;
                break;
             case 'slideshow':
-               $this->tmpl->show("slideshow.tpl");
+               /* fetch slideshow template */
+               print $this->tmpl->show("slideshow.tpl");
+               /* no further execution necessary. */
                return;
                break;
             case 'rss':
diff --git a/phpfspot.js b/phpfspot.js
index 8db1f65..1922448 100644
--- a/phpfspot.js
+++ b/phpfspot.js
@@ -678,8 +678,13 @@ function noop() {}
 /**
  * start slideshow
  */
-function startSlideShow()
+function startSlideShow(srv_webpath)
 {
+   if(srv_webpath != undefined)
+      web_path = srv_webpath;
+   else
+      web_path = '';
+
    if(!sliding) {
       HTML_AJAX.grab(encodeURI(web_path + '/rpc.php?action=reset_slideshow'));
       nextSlide();
diff --git a/themes/default/templates/slideshow.tpl b/themes/default/templates/slideshow.tpl
index 9a8f1fe..1e64dbc 100644
--- a/themes/default/templates/slideshow.tpl
+++ b/themes/default/templates/slideshow.tpl
@@ -3,7 +3,7 @@
  <script type="text/javascript" src="{$web_path}/slider/js/timer.js"></script>
  <script type="text/javascript" src="{$web_path}/slider/js/slider.js"></script>
  <link type="text/css" rel="StyleSheet" href="{$web_path}/slider/css/bluecurve/bluecurve.css" />
- <body onload="startSlideShow();" class="slideshow">
+ <body onload="startSlideShow('{$web_path}');" class="slideshow">
   <div id="slide_navigation">
    <a href="javascript:prevSlide();" onclick="click(this);" title="slive to previous photo"><img id="rew_ico" src="{$web_path}/resources/32_rew.png" /></a>
    <a href="javascript:pauseSlideShow();" onclick="click(this);"><img id="pause_ico" src="{$web_path}/resources/32_pause.png" /></a>
-- 
cgit v1.2.3-18-g5258