ZenphotoCMS Forum
Random images don't show - 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 images don't show (/thread-2065.html)



Random images don't show - MarcelSpijker - 2008-01-11

I use the printRandomImages() function but it wont put anything on my screen.
The printLatestImages() works perfectly.

Is this function not working or am i using it wrong?

I tried the following:

printRandomImages();
printRandomImages(4);
printRandomImages(4,,);
printRandomImages(4,null,all);
printRandomImages(4,null,"all");

You can see that is dousn't work at my web page: http://www.marcelspijker.nl/zenphoto
On the right side it should come up ...

Please forgive the layout problems under IE, still have to fix them, but this random function is just eating my time...




Random images don't show - sbillard - 2008-01-12

There is a bug in the routine. The corrected routine is:
`function printRandomImages($number, $class=null, $option='all') {

if (!is_null($class)) {

$class = 'class="' . $class . '";';

echo "";

}

for ($i=1; $i




Random images don't show - MarcelSpijker - 2008-01-14

Thanks this works!

Only there are two \ missing before the n.

`

echo "[*]n";

echo "n";

should be

echo "[*]\n";

echo "\n";

`




Random images don't show - sbillard - 2008-01-14

Yes, you are right. That's the forum software. Sorry for that, it "stole" the slash. The nightly build has it correct.