ZenphotoCMS Forum
Random Photo Plug-In - 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: Random Photo Plug-In (/thread-238.html)

Pages: 1 2


Random Photo Plug-In - vidisad - 2008-07-02

I did replace it as you advised but I got the following error:

Parse error: syntax error, unexpected T_ECHO in /home/da_mja_nac/public_html/da_mja_nci/zen/zp-core/random.php on line 36




Random Photo Plug-In - acrylian - 2008-07-02

Sorry, I just did a quick look/guess and please note I actually never tried this script...




Random Photo Plug-In - michaelsam - 2009-06-22

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]




Random Photo Plug-In - michaelsam - 2009-06-22

thats the message i got
"Zenphoto Error
Bad gallery in album instantiation"




Random Photo Plug-In - acrylian - 2009-06-22

In case you trying to get the image from a dynamic album, please see: http://www.zenphoto.org/trac/ticket/1161




Random Photo Plug-In - michaelsam - 2009-06-22

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




Random Photo Plug-In - acrylian - 2009-06-22

.alb files are dynamic albums and therefor within the albums folders like normal albums.

Sorry, I can't help with that random addon as I did not write it. Try to contact its developer or maybe he will still visit this forum.




Random Photo Plug-In - michaelsam - 2009-06-22

do have an other random script for me to use external ?




Random Photo Plug-In - sbillard - 2009-06-23

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.




Random Photo Plug-In - michaelsam - 2009-06-23

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();




Random Photo Plug-In - sbillard - 2009-06-23

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.




Random Photo Plug-In - michaelsam - 2009-06-24

thx stephen for your help now it works again in both scripts




Random Photo Plug-In - Photoxite - 2009-07-09

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.




Random Photo Plug-In - acrylian - 2009-07-09

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