ZenphotoCMS Forum
Slideshow error - 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: Slideshow error (/thread-9339.html)



Slideshow error - chabusse - 02-12-2011

Hi Guys,

First of all thanks in advance for your help, and congrats for those of you working on this magnificent piece of online software.

I'm building a photography website for someone, and am trying to display a slideshow of each album automatically (do not want or need thumbs).

I added this code in the body of my album.php

`

`
The result is the two first images of the album, in a row, with an error message saying :

[b]Warning: Invalid argument supplied for foreach() in /homez.56/instantdg/www/zenphoto/zp-core/template-functions.php on line 1012[/b]

Any idea on what it could be ? Again thanks a lot for your help.




Slideshow error - acrylian - 02-12-2011

Is the slideshow plugin enabled? How does the album.php look like? Do you maybe have an album without images?

(Not using thumbs or individual image pages makes them virtually invisble for search engines and not linkable btw but maybe that is the reason?)




Slideshow error - chabusse - 02-12-2011

Thanks for repyling so quickly.

The slideshow plugin is activated and works fine if i dont modify album.php and click on the slideshow link.

You can see it following this link :

http://instantdeviephoto.com/zenphoto/instantdeviephoto/mariage/

In both sub albums, it displays to two first images then the error displays




Slideshow error - acrylian - 02-12-2011

Ok, I think you need to reset the context right after the slideshow call. Try:
set_context(ZP_ALBUM);




Slideshow error - chabusse - 02-12-2011

Thanks ! Did as you said,

Now the error message is gone but imagewise its the same. Two first pictures one after another, but no slideshow...




Slideshow error - acrylian - 02-12-2011

Hm, actually that should work. I will try myself and get back to you.




Slideshow error - acrylian - 02-12-2011

I could not reproduce the error regarding context but to get the slideshow to work you need to add to the of the page. It is not loaded automatically as the slideshow is normally displayed on the slideshow.php page (or if using the colorbox mode using that).




Slideshow error - chabusse - 04-12-2011

Hello,

It's already at the head of the page.




Slideshow error - acrylian - 04-12-2011

I am sorry then, when I added that and called the slideshow all worked for me. Even without resetting the context, btw.




Slideshow error - chabusse - 04-12-2011

Hello again,

I found the problem. The had to be put at the end of the, and not at the beginning.

Thanks a lot for your help, acrylian !




Slideshow error - acrylian - 04-12-2011

I assumed somehow that was clear, sorry. It has to go after the theme_head filter because that loads the main jQuery script the slideshow depends on.




Slideshow error - chabusse - 04-12-2011

Now i realize i have to figure out how to display thumbnails for subalbums (which i will use), and none in the final albums that are actually containing images to display as a slideshow. Since it's the same album.php file for both, what do you think could be the trick ?




Slideshow error - acrylian - 04-12-2011

I don't understand what you mean with thumnials of subalbums. Instead of the album thumb? Then you will have to modify the theme and probably use the object model. See the user guide.

Also, the slideshow can only display images from one album. If you need a kind of collector you would have to use a dynamci album (see user guide as well). Otherwise you will have to adapt the plugin or use the jQuery Cycle script directly to build your own custom slideshow.