any ideas why photos in an album don't appear on "Page 1" and appear in a Page 2 that shouldn't exist, given the number of images in :
http://www.frenchguys.com/gallery/Others/LinkedTo
Does it have to do with:
I used to just use next_image() but it doesn't work anymore either.
This is because of the way your theme is handling albums with both subalbums and images in it. There is a function named normalizeColumns which, in conjunction with next_image, controls how images and albums are displayed together.
call the function somewhere before you display anything:
$firstPageImages = normalizeColumns(ALBUMCOLUMNS, IMAGECOLUMNS);
Put in the correct values for the two parameters.
Then where you have next_image() change to next_image(false, $firstPageImages)
This will allow zenphoto to display both albums and images on a single page. The default (presumably in your theme) uses separate pages for subalbums and images since it has no idea how many of each will fit.
I understand the concept but I don't understand the parameters I am afraid. Is it really the max number of each entity displayed (could be 40 for images for example) or does it have anything to do with columns ?
Using: $firstPageImages = normalizeColumns('6', '5');
Why does http://www.frenchguys.com/gallery/Portfolio%202007/Rassain (which has no subalbums) display 15 images now ?
(also how do you get a count of the sub albums for this page so as to not execute the loop if there are none)
By the way, I really appreciate your dedication to this sbillard, thanks much for your help.
if your rows of 3 album thumbnails, then the first parameter is 3
if your rows of 6 image thumbnails, then the second parameter is 6
This is what I would guess from visiting your gallery. So, you would have
$firstPageImages = normalizeColumns(3, 6);
A side effect of the function call is that the albums_per_page and images_per_page options are rounded out to be a multiple of the number that go in a row. This is a dynamic, not permanant change. Because of this, you should put the function call at the top of image.php, album.php, and index.php or your pagination may come out wrong.
getNumSubalbums() will give you the count of subalbums. However, I don't recommend you use this for controlling the loop. Instead there is a couple of functions: isAlbumPage() and isImagePage() which will tell you if albums (or images) are beign displayed on the page.