zenphoto forums » General Zenphoto Discussion

Losing two images in the gallery

(9 posts)
  • Started 3 years ago by diogocosta
  • Latest reply from acrylian

Tags:

  1. diogocosta

    Apprentice
    Joined: Sep '09
    Posts: 4

    hi

    In my application with ZenPhoto, I have a problem. In galleries, two images are lost. Have tried to solve the normalizeColumns but not sure if the problem is this. Could anyone help me?

    Two Examples
    http://msonnen.com/v2/portifolio/arquitetura
    It should show 21 pictures, but shows only 19

    and http://msonnen.com/v2/portifolio/arquitetura
    should show 32 pictures, but shows only 30

    Thank's

    Posted 3 years ago #
  2. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,767

    The normalizeColumns() function controls only the number of thumbnails that will appear upon one page. So if some images are not appearing at all that is not the cause.

    Both your links are the same, by the way.

    Anyway, from the looks of your site the normalize columns parameters should be <sometning>, 5. (If you are using the same size for album thumbs the parameters would be 5,5.

    Which images are missing? That might provide a clue to what is wrong.

    Don't forget to read the Forum rules and usage resources
    Posted 3 years ago #
  3. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,351

    Additionally: Have you checked if these images are maybe set to invisible accidentally?

    Don't forget to read the Forum rules and usage resources
    Posted 3 years ago #
  4. diogocosta

    Apprentice
    Joined: Sep '09
    Posts: 4

    Thank you all, but I found out what is happening!

    I'm using a large thumb on the left, which should show the thumb of the album.

    It turns out the gallery on the right is counting on the presence of the thumb, and takes a picture.

    Now, how can I fix this?

    I did this thumb as follows:

    <?php while (next_image(false, $firstPageImages)): ?> 
    
    			<div class="thumb_image">
    				<h3><a href="<?php echo htmlspecialchars(getAlbumLinkURL());?>" title="<?php echo gettext('View album:'); ?> <?php echo getBareAlbumTitle();?>"><?php printAlbumTitle(); ?></a></h3>
    
    				<a href="<?php echo htmlspecialchars(getAlbumLinkURL());?>" title="<?php echo gettext('View album:'); ?> <?php getBareAlbumTitle();?>"><?php printCustomAlbumThumbImage(getBareAlbumTitle(), NULL, 233, 159,233, 159); ?></a>
    			</div>
    
    			<?php break;  ?>
    			<?php endwhile; ?>

    Is it correct? Is there another way to do this?

    Posted 3 years ago #
  5. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,351

    So you did you the next image loop twice? Well, that loop is for the thumbnails only and should be only once per page.

    To get the album thumnail there are other functions available. Please see the documentation for "albumthumb" functions:
    http://www.zenphoto.org/documentation/elementindex.html

    Don't forget to read the Forum rules and usage resources
    Posted 3 years ago #
  6. diogocosta

    Apprentice
    Joined: Sep '09
    Posts: 4

    Yes, it works.

    The problem is that the image appears in the main album:
    http://msonnen.com/v2/portifolio/

    What understand is that this next_images makes content disappear when the albums are displayed ...

    Any way to fix this?

    Posted 3 years ago #
  7. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,351

    I think I don't understand the problem.

    Again, the next_image loop is to be used to display the thumnails of the images within an album and to be used once per page. if you use it twice the loop gets confused. If you want to show also the album thumb of the current album you are in use the album thumb functions.

    Don't forget to read the Forum rules and usage resources
    Posted 3 years ago #
  8. diogocosta

    Apprentice
    Joined: Sep '09
    Posts: 4

    What happens is:

    A while next_image, has a working interest. Everything happens in the same file album.php. When the albums are shown, it hides the gallery and when the gallery is shown, it hides the album.

    That's why I put the thumb in while, so it does not was shown on page albums, just in the galleries.

    The problem is that I do not know how to solve it. Not found no javascript script that does this, I think it is right in function next_image.

    Can you help?

    Posted 3 years ago #
  9. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,351

    Please stay within the Zenphoto terms "Gallery" refers to the installation ifself, "albums" are what we are talking about.

    As said the next_image loop is not to be used for this. If you don't want the album thumb to be shown you have to use the album thumb function and put in a check if you are in a toplevel album, either by the album name directly or with the partent album function (please search the doc for that).

    Don't forget to read the Forum rules and usage resources
    Posted 3 years ago #

RSS feed for this topic

Reply

You must log in to post.