fix slideshow, web_path was not set correctly
authorAndreas Unterkircher <unki@netshadow.at>
Sun, 25 May 2008 07:11:55 +0000 (09:11 +0200)
committerAndreas Unterkircher <unki@netshadow.at>
Sun, 25 May 2008 08:02:09 +0000 (10:02 +0200)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
phpfspot.class.php
phpfspot.js
themes/default/templates/slideshow.tpl

index 3f06a8772c28de6e091d6a49e3f66f50558ffd12..9a1106961f61041980594481519d1f0679c54f76 100644 (file)
@@ -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':
index 8db1f651b132cbf964f6fe4ef06280a5f31c2d2e..19224483d4fdfcc1321c229156ec1e0f15a8dce4 100644 (file)
@@ -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();
index 9a8f1fe7adfca8d85e192ee8808568d29e5ad95a..1e64dbce5c60e2de778ece8f696fa757f73fffe5 100644 (file)
@@ -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>