Using slideshow on homepage fatal error

I'm trying to use slideshow on my homepage which is outside zenphoto. I have activated the slideshow plugin. I already included the following code in my homepage:
define('WEBPATH', 'zenphoto');
require_once(WEBPATH . "/zp-core/template-functions.php");

and

<?php printSlideShowJS(); ?>

and

$albumobj = new Album($_zp_gallery, "foldername");
$imageobj = newImage($albumobj, "filename");
printSlideShow(true,false,$albumobj, $imageobj, 400,400);

I keep getting this error message
Fatal error: Call to undefined function printSlideShowJS()

Comments

  • You will also have to load the slideshow plugin. Plugins are normally loaded when the zenphoto task goes throught index.php. Since you are not doing that you will have to load any needed plugins manually.
  • Can you give me an idea on how to do that?
  • acrylian Administrator, Developer
    It's actually the same as you already did with the themplate functions. You just have to add the plugin file as well.
  • Thanks! It already appears on the homepage. I have another problem though..it only displays all the images on the homepage and not actually as a "slideshow".
  • acrylian Administrator, Developer
    Well, you may need to include the required JS scripts manually as well since you are not in Zenphoto environment. Watch for errors in your log or browser js error log (Firefox' is quite handy).
  • Thanks! I finally figured it out. After looking at the page source, I noticed that the filepath for the javascript is wrong since i'm not in zenphoto environment. I just changed FULLWEBPATH . '/' . ZENFOLDER.'/'.PLUGIN_FOLDER inside slideshow.php. It works for me since i'm not using slideshow inside zenphoto.
Sign In or Register to comment.