Show newest(most recent) Photo on Startpage

Yes, Hello!

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

lg

Leon

Comments

  • acrylian Administrator, Developer
    What index file? Zenphoto index or outside Zenphoto?
  • thebug Member
    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
  • acrylian Administrator, Developer
    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.
  • thebug Member
    i'll take a look at that.
    thanks
  • thebug Member
    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

    <?php printLatestImagesByMtime(($number=1),($width=630),($crop=false)); ?>

    thanks a lot

    cheers

    leon
  • acrylian Administrator, Developer
    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/
  • thebug Member
    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 '<img src="'.$myurl.'" width="630px">

    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
  • thebug Member
    -----------
    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
  • acrylian Administrator, Developer
    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.
  • thebug Member
    i'll see.
    thanks for your help.

    all the best

    leon
Sign In or Register to comment.