ZenphotoCMS Forum
printDownloadAlbumZipURL ? - 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: printDownloadAlbumZipURL ? (/thread-11825.html)



printDownloadAlbumZipURL ? - flu - 2014-06-05

Hi,
I'm trying to use the function printDownloadAlbumZipURL from the Downloadlist plugin which I've enabled, so I wrote this in my image.php theme :

but all I get is this message :
Fatal error: Call to a member function isDynamic() on a non-object in /home/xxx/public_html/zp-core/zp-extensions/downloadList.php on line 556

Do you know how to make it work ?

I use Zenphoto 1.4.6
theme : Zpbase
PHP : 5.3.28
MySQL : 5.1.67

Thanks.




printDownloadAlbumZipURL ? - fretzl - 2014-06-05

You forgot to set the $albumobj parameter.
This should work:
``




printDownloadAlbumZipURL ? - acrylian - 2014-06-05

Basically the 2nd parameter needs to be an album object like fretzl said or NULL to use the current album directly. You set it to '' which is in fact an invalid album :-)




printDownloadAlbumZipURL ? - flu - 2014-06-05

Thank you guys, Ididn't manage to find this function in the documentation.

$_zp_current_album did the trick.




printDownloadAlbumZipURL ? - acrylian - 2014-06-05

I didn't get to update the documentation yet, will soon follow. You can always look into the plugin file directly. The documentation just uses the documentation within, too.