printLatestImages not working

Hi,
Zen photo was working great till a few weeks ago from May, so I took it down, did a fresh install into a different directory. I'm having troubles pulling out the latest photo uploaded - it used to display a thumbnail and link to that image with printLatestImages the front page of my web site. I have looked around posts and documentation and can't understand how this has changed since previous version. Can anyone help?

thanks, carol

Comments

  • http://www.zenphoto.org/support/topic.php?id=3760

    What version were you running?
    What version did you install fresh?

    Is the front page of your WEB site a zenphoto page or someting else where you are using one of the hacks to get zenphoto objects?
  • Hi,

    Thanks so much for getting back to me, The version I installed in April was 1.15, the version I installed today is 1.2.2. I want to check a backup tomorrow with the code I was using on the page - just want to make sure I have the exact code. The way it was configured was I put some php code with the path in the header and then the printlatestimage 1 code where I wanted the thumbnail to be positiioned.
    Thanks, I'll post more tomorrow.
  • acrylian Administrator, Developer
    Please try the nightly, we had some trouble with the thumb generation in that plugin (if I recall correctly).
  • Oh, forgot to answer, just a standard php page outside of the directory - I believe I was using one of the hacks, but I had trouble finding documentation about that so that is why I wonderered if there was a different approach. I'll try the nightly build later. But if there is a new way, can you guide me instructions? Thanks so much.
  • acrylian Administrator, Developer
    You were surely looking for this then: http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin
  • Hi, thanks to both of you. I just put in the build from the l1th and tried using the code above as well as code from before. This is what I had used in previous versions - in header
    <?php
    define('ZENFOLDER', 'zp-core');
    define('WEBPATH', 'today');
    require_once(WEBPATH . "/" . ZENFOLDER . "/template-functions.php");
    header ('Content-Type: text/html; charset=' . getOption('charset'));
    ?>

    and then where the photo would appear:
    <?php
    printLatestImages(1);
    ?></p>

    So today I used the code in the link above (for trying a random picture) and am getting mySQL errors. I am considering upgrading mySQL to 5 since I have read that is ideal, but still wondering if this feature that I want is still possible.

    Thanks so much
  • acrylian Administrator, Developer
    The function is what you are looking for. But you probably need to include the plugin like the template functions to make use of that function.
  • sorry for bothering you, I am not sure what you are saying include the plugin like the template functions. Any chance you can give me a direction in terms of the code?

    thanks!
  • acrylian Administrator, Developer
    I mean this: `require_once(WEBPATH . "/" . ZENFOLDER . "/plugins/image_album_statistics.php");
Sign In or Register to comment.