![]() |
|
Starter help with slideshow - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Starter help with slideshow (/thread-12744.html) |
Starter help with slideshow - patockaj - 2015-06-04 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? Starter help with slideshow - fretzl - 2015-06-04 You have to create an album object first. ` <?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. Starter help with slideshow - acrylian - 2015-06-04 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 theme`s`functions.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. Starter help with slideshow - jaxczech - 2015-10-05 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()" Starter help with slideshow - acrylian - 2015-10-05 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? `$randomImage`must be an image object for this to work. Starter help with slideshow - jaxczech - 2015-10-09 Hello, thank you for help but it is still crashing on PrintSlideshow. 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); Starter help with slideshow - acrylian - 2015-10-09 You need to be more specific what "crash" means. Please review your error log. Starter help with slideshow - jaxczech - 2015-10-09 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) Starter help with slideshow - acrylian - 2015-10-09 Well apparently the album does not exist. Sorry, can't help as I don't know your site. 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. Starter help with slideshow - fretzl - 2015-10-09 Let's start from the beginning ;-) Which theme are you using ? |