Possible bug with images per page?

I have just been playing around with my gallery and noticed that the images per page setting in the admin options doesn't seem to work? On the themes I have tested (Default Dark, light, sterile light & Dark, and Testing) they are all defaulting to 30 images despite setting a different number with that option.

Is it a problem with my install or can someone else confirm?

Comments

  • Some more testing seems to show that altering the number of images through the admin is having an effect but the count is wrong...

    setting 28 gives 30 images per page
    setting 29 gives 30
    setting 30 gives 30
    setting 31 gives 36
    setting 32 gives 36
    setting 37 gives 42
    setting 38 gives 42
    setting 40 gives 42
  • Steve, this is caused by normalizeColumns, and its by design. If you want it to listen to your exact number open up album.php and change <?php while (next_image(false, $firstPageImages)): ?> to <?php while (next_image()): ?>

    The reason for this is because there are two columns of albums and 6 of images. When you have an odd number of albums on a page it puts images next to the last album instead of the next line and it looks weird. Thank you for pointing this out though, it does need to expand to include situations when were are no subalbums.
  • I am not sure exactly what Mark means when he says "it does need to expand..."

    The normalize columns/$firstPageImages bit is to make the page where both images and albums are displayed contain the "right" number of images. Without this code, a new page will be started for the images, so you will get a page with the remaining subalbums on it, then a following page with the first of your images on it.

    As Mark said, though, if you don't want this feature, you can modify the theme. You can just change line 4 to `$firstPageImages = 0;` to do the disabling.
  • What I meant was say for example on a blank install the images-per-page is set to 15, it displays 18...maybe more of a communication thing than expanding the function..or removal of images_per_page from options..if the current them is using normalizeColumns
Sign In or Register to comment.