Thumbnail list when viewing images from search page

gjr Member
Hello,
First off - awesome program!!
I am creating my own theme. When one goes to the image.php view from the album.php view, I am able to display all of the thumbnails of the album in a sidebar to ease navigation between the photos in the album.
However, when I go to an image from the search/archive page, my thungnails for the "dynamic" album do not show. I can click through the images spanning across multiple albums created by the search though by using the previous/next links. So, the image (array?) is there, how do I show the thumbs for this dynamic album?
I am currently using:
`

<?php while (next_image(false, $firstPageImages)): ?>



<?php endwhile; ?>

`
Do I need to modify this somehow to be able to show the thumbs when coming from the search/archive page?
I hope this all make sense, and again - thanks a bunch - I love ZenPhoto!

Comments

  • gjr Member
    `

    <?php while (next_image(false, $firstPageImages)): ?>



    <?php endwhile; ?>

    `

    It got cut off - sorry - trying again..
  • Dynamic albums are funny beasts. They don't really exist, so when you are viewing the image page, its album is the physical album within which it resides.

    To find the dynamic album you will have to use code like is found in `printAlbumBreadcrumb() to establish an album object for the dynamic album.
  • I used code below to show the thumbs for the search on the image page while in search context.
    `<?php if (!is_null($_zp_current_search)) {<br />
    $images = $_zp_current_search->getSearchImages();

    $x=0;foreach( $images as $image ){

    $current=$_zp_current_search->getImage($x);

    $x=$x+1;

    $_zp_current_image=$current;

    printCustomSizedImage('', null, 26, 20); }

    }?>`
  • gjr Member
    BertSimmons: Thanks that is exactly what I needed! I wrapped the photo links around the printImage and it works good except for one thing:

    Lets say I have two galleries with 4 photos in each, both created in April 2008. When I click on the archive for April 2008, I get photo 1,2,3,4 from gallery 1 and a,b,c,d from gallery 2 in that order. When I click on photo 1, it takes me to the image.php view showing photo 1 with the thumbnails in the same order 1,2,3,4,a,b,c,d. When I click on photo A, the order of the photos changes to 4,3,2,1,d,c,b,a. Any ideas how to correct this so the images stay in the same order?

    Thanks!
  • Same problem for me "gir". How can I fix it.
    This order is really appromative and I can't see all of the images of the search, when I use "prev / next" buttons.

    Also, I've created a link on the full image view, which is leading on the album page.
    It works generally, but not for the dynamic albums (in "search mode ^^").
    sbillard, I don't understand your method, I'm sorry, I'm french and a little bit newbie ^^

    Vincent
  • gjr

    as for the sort order.. are you using the lates nightly build?

    gjr+vincent;

    my complete code for thumbs on the image page both in an dynamic album context as in a normal alnum context is:

    `<?php <br />
    $remember=$_zp_current_image;

    if (!is_null($_zp_current_search)) {

    $images = $_zp_current_search->getSearchImages();

    $x=0;foreach( $images as $image ){

    $current=$_zp_current_search->getImage($x);$x=$x+1;

    $_zp_current_image=$current;

    ?>

    " ><?php printCustomSizedImage('', null, <br />
    26, 20); ?>


    <?php }} <br />
    if (is_null($_zp_current_search)) {

    $images=$_zp_current_album->getImages();

    while (next_image(true)): ?>

    " ><?php printCustomSizedImage('', null, <br />
    26, 20); ?>


    <?php endwhile;<br />
    $_zp_current_image=$remember;

    }?>`

    I used the `$_zp_current_image=$remember;` part to recall the $_zp_current_image to default sized image that is in view to be able to use functions on that after the thumblist
  • gjr Member
    No, I am not using the latest nightly build - a little nervous using that for a production site. But if it will fix this problem I may try...

    Thanks for helping me!
  • gjr Member
    Yes - this problem is solved using nightly build - THANKS!
  • Oh my God !

    I would like to install the latest update but I will loose all of my custom modification...

    Is it possible to know what are the additions to paste them into my code ?

    I'm sorry I'm not really good.

    Vincent
  • acrylian Administrator, Developer
    It's of course impossible to tell you all the changes, we change things all the time. That is why we don't recommend hacking core files.:-)
    If you get problems depends on your modifications. If you only modified your theme you probably will not have that much problems.
  • I've also modified some core files... to change the administrating interface.

    BoooOOh... it's my error, too bad for me ^^

    Forgiveness for trouble ;)
  • It is quite possible to tell the changes. All you need is a good file comparator program. If you are running a PC, I would recommend "Beyond Compare 2" www.scootersoftware.com/

    Then you make a comparison of your customized files and the release. You can also browse http://www.zenphoto.org/trac/log/ where the changes are noted.

    But the best thing would be not to modify the zenphoto core if at all possible. You can create your own custom functions--many of the themes have customfunction.php files. If you are making a customized theme, create a copy of the distributed one under a different name then make modifications to it.
  • Thanks a lot for theses answers.. The website is now on the web, we will work on the bugs later ;)

    www.boutsdeplanete.com

    Vincent
  • Your site looks good.
  • acrylian Administrator, Developer
    Nice site. You should submit it to the showcase...;-)

    PS: Is it on purpose that you don't have next/prev image links on the image page? I always have to go back to the thumbnails for the next image.
  • Vincent: went to the link <www.boutsdeplanete.com>. Nice gallery!! Aside from language barrier, there wasn't enough contrast for the type colour against the black background to be readable.
Sign In or Register to comment.