hi, this script doesn't work anylonger, can you help me please ?
http://www.zenphoto.org/trac/ticket/555
i updated from zenphoto version 1.2.4 [3841] to 1.2.5 [4110]
thats the message i got
"Zenphoto Error
Bad gallery in album instantiation"
In case you trying to get the image from a dynamic album, please see: http://www.zenphoto.org/trac/ticket/1161
i copied the random.php from http://www.zenphoto.org/2008/01/hacks/#random-image-external-site to my zp-core - i didn't create a dynamic album - where should i find that .alb file if one exists ?
i'm also using this script
do have an other random script for me to use external ?
The bad album instantiation problem is fixed now. Just as a note, this error message is part of the development builds. It is intended to help us find places where the zenphoto code is not correctly passing a gallery object. If you get the error, it would help us if you change the DEBUG_ERROR define to true as it will give details on where the bad instantiation occurred.
i changed now to debug_error true and got this message
Zenphoto Error
Bad gallery in album instantiation
Backtrace:
in Album->Album (template-functions.php [3356])
in getRandomImages (zp-foto-random-script.php [18])
line 18 in zp-foto-random-script.php is
$randomImage = getRandomImages();
Ok, you are using zenphoto functions outside of the zenphoto gallery, aren't you? The varialbe $_zp_gallery is not set. You may run into any number of these. I suggest you include the following code in your script:
$_zp_gallery = new Gallery();
before you call any functions.
We will try to make a general solution to this as well.
thx stephen for your help now it works again in both scripts
I looked at the tickets listed above:
http://www.zenphoto.org/documentation-official/zenphoto/_template-functions.php.html#functiongetRandomImages
http://www.zenphoto.org/documentation-official/zenphoto/_template-functions.php.html#functiongetRandomImagesAlbum
Both have no info.
How can I display a random image IN zp? Also would like to replace code in gallery.php that currently shows thumbs of all my albums so that it instead shows the above selected random image.
The links are outdated as we changed the link. You could have found them easily by visting our user guide, there is a link to the documentation: http://www.zenphoto.org/category/User-Guide/......
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetRandomImages
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetRandomImagesAlbum