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?
Comments
`
<?php
$albumobject = newAlbum('4.9.2011');
printSlideShow(true,false,$albumobject, '', 400,400);
?>
`
And don't forget to check the page on which you want the slideshow to be visible in the plugin options.
Also, the `echo` is not needed the function "prints" already.
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()"
`
$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? `$randomImage`must be an image object for this to work.
I got "slideshow" allowed in theme settings.
- randomAlt1 is ok now (dumps right names)
- albumobject prints "album (6)"
My code:
$randomAlbum = $randomImage->getAlbum();
$randomAlt1 = $randomAlbum->name;
$albumobject = newAlbum($randomAlt1);
printSlideShow(true,false,$albumobject, '', 1000,400);
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)
Btw, I would recommend to not have spaces etc in album names. URLs look nice and it possibly saves some issues although it is not a technical problem.
Which theme are you using ?