Member
Member
annabanana   2011-06-12, 23:26
#1

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

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()

Member
Member
sbillard   2011-06-13, 01:16
#2

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.

Member
Member
annabanana   2011-06-13, 07:59
#3

Can you give me an idea on how to do that?

Administrator
Administrator
acrylian   2011-06-13, 08:12
#4

It's actually the same as you already did with the themplate functions. You just have to add the plugin file as well.

Member
Member
annabanana   2011-06-13, 08:26
#5

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".

Administrator
Administrator
acrylian   2011-06-13, 10:11
#6

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).

Member
Member
annabanana   2011-06-13, 11:12
#7

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.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.