ZenphotoCMS Forum
Show newest(most recent) Photo on Startpage - 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: Show newest(most recent) Photo on Startpage (/thread-5002.html)



Show newest(most recent) Photo on Startpage - thebug - 2009-05-07

Yes, Hello!

Has anyone any idea how i can puplish the newest Photo on my Index Page???

lg

Leon




Show newest(most recent) Photo on Startpage - acrylian - 2009-05-07

What index file? Zenphoto index or outside Zenphoto?




Show newest(most recent) Photo on Startpage - thebug - 2009-05-07

Zenphooto Index.

I build myself a new Theme. -> noneacademy.leonreindl.de

on the first page i would like to always show the most recent uploaded photo.

lg

Leon




Show newest(most recent) Photo on Startpage - acrylian - 2009-05-07

Then take a look at the image_album_statistics plugin. You of course have to add the function to your theme's index.php manually.




Show newest(most recent) Photo on Startpage - thebug - 2009-05-07

i'll take a look at that.
thanks




Show newest(most recent) Photo on Startpage - thebug - 2009-05-07

Ok, i checked that.
My Problems are:
I want the "hole" image, not a thumb.
and it's always presented in a list style wich i also doesn't want.

i tried with that code but i just won't work

thanks a lot

cheers

leon




Show newest(most recent) Photo on Startpage - acrylian - 2009-05-07

First your usage of the function is wrong. You can 't leave out parameters inbetween. If you want to set the last one you have to set all others before, too. Only if you want only the first one(s) you can leave out the others.

Example for your example: printLatestImages(1, "", false, false,false,40,"", 630, 630, false);

Please take also a look at http://www.zenphoto.org/2008/04/how-to-read-the-zenphoto-functions-guide/




Show newest(most recent) Photo on Startpage - thebug - 2009-05-07

ok, i'm tried it with that and it's kinda workin that far:

$images = getImageStatistic($number ='1', $option ='latest');

    foreach ($images as $image) {

        $myurl= $image->webpath;
        $myname =$image->album->name;
        $myname = ucwords(str_replace('-',' ',$myname));
        echo '

by '.$myname;

    }

But, how can i check if it's an image or a video/mp3?
I tried some stuff but it's not working.

lg

leon




Show newest(most recent) Photo on Startpage - thebug - 2009-05-07


Example for your example: printLatestImages(1, "", false, false,false,40,"", 630, 630, false);


ok, that's much easier
thanks.
but the same problem with videos or songs...hmmm




Show newest(most recent) Photo on Startpage - acrylian - 2009-05-07

Do you want the song/video to be played? That is not possible unless you want to write a new function. Although you can add a thumbnail to a video/audio item, too, that would behave like every other thumb. How is describe on our troubleshooting guide.




Show newest(most recent) Photo on Startpage - thebug - 2009-05-08

i'll see.
thanks for your help.

all the best

leon