Hi,
I am using ZenPhoto for first time. I want to implement a slideshow on my home screen (of ZenPhoto) instead of gallery picture.
I am trying to put it into functions.php (in one of basic themes) where I am trying "echo printSlideShow(true,false,'4.9.2011', "", 400,400);" where 4.9.2011 is name of my album.
Cans omeone help me how do I correctly call slideshow on my ZenPhotos page please?
Quote:I am trying to put it into functions.php (in one of basic themes) where I am trying "echo printSlideShow(true,false,'4.9.2011', "", 400,400);" where 4.9.2011 is name of my album.
You need to put it on the theme page where you want it to appear – in this case the theme's index.php – and not the themesfunctions.php`. If you haven't take a look here: http://zenphoto.org/news/theming-tutorial
Also, the echo is not needed the function "prints" already.
Hello,
I tried to put something like this:
$randomAlbum = $randomImage->getAlbum();
$randomAlt1 = $randomAlbum->getTitle();
$albumobject = newAlbum($randomAlt1);
printSlideShow(true,false,$albumobject, '', 1000,400);
To each theme, each file and each folder but it isnt working anywhere. For example I tried to put it into "printHeadingImage()" in Effervescence theme or into "indexpage" in ZenPage theme and it is still not working. All it can do is to broke whole gallery. I am not even able to dump it, the last avible dump is on "getTitle()" but there is going something wrong on "newAlbum()"
Well, in any case you are using the object model wrong:
$randomAlt1 = $randomAlbum->getTitle(); $albumobject = newAlbum($randomAlt1);
You use the title but you have to use the name (or filename, titlelink for other item types):
$randomAlt1 = $randomAlbum->getFolder(); // alternatively: $randomAlbum->name; $albumobject = newAlbum($randomAlt1);
http://www.zenphoto.org/news/zenphotos-object-model-framework
Where is $randomImage->getAlbum() coming from? $randomImagemust be an image object for this to work.
Hello, thank you for help but it is still crashing on PrintSlideshow.
I got "slideshow" allowed in theme settings.
My code:
$randomAlbum = $randomImage->getAlbum();
$randomAlt1 = $randomAlbum->name;
$albumobject = newAlbum($randomAlt1);
printSlideShow(true,false,$albumobject, '', 1000,400);
There is nothing about slideshow in the log.
There is only this:
USER ERROR: Invalid album instantiation: Rhodos 8-15.9.2015 does not exist. in /../class-album.php on line 1215
trigger_error called from Album->_albumCheck (class-album.php [1215])
(and that album exists)