Number of thumbs per page

Images size is longest size: YES
Allow upscale: YES
Thumb size: 125
Crop: YES
Crop thumbnail width: 125
Crop thumbnail height: 96
Albums per page: 3 (I only have 2 published so not sure yet)
Images per page: 40
<THESE SETTINGS WERE SET IN ORDER TO ACHIEVE 4 IMAGES PER **UNIFORM** ROWS>

I've got 42 thumbs on page 1 and 29 on page 2 x 4 per row (71 total) -- why is there more than 40 on page 1? And even so, why not divisible by 4? Why is there a row with only 2 images?

I'm not logged in as Admin so viewing as my visitors will.

Comments

  • There are more than 40 on the page because somehow your theme has told zp to do that. I think we have had this converstion before. Perhaps you missed the point then. If a theme "normalizes" its albums/images rows, the number on the page will be a multiple of the number of rows on the page. If you normalize the rows differently than the theme displays them, things do not work out the way you might wish.
  • It's not the number, it's that it didn't fill the last line with 4 pictures but carried them over to page 2 which looks strange and gives the appearance at first-glance of being a 1 page album. So long as all the rows fill up, that's what I was writing about :)

    I played extensively last night with various settings and none gave me even rows. They were so far out-of-whack it would be embarrassing to publish! I couldn't find anyway of evening off the portrait/landscape bottoms so that the rows are even. As you can see, I don't have settings as square although they do appear that way when viewing.
  • Ah, but it is the number. If it started a new page that is because it had filled the first page with the alotted number of images and still had some left over. You really need to listen to the advice your are being given.
  • No, I'm listening, just get confused easily <SMILE>. Because, I either expected exactly the 40 I asked for or full 4 per line rows on the page, not bottom row left at 2 when there were more images available.

    What I seemed to have read from your reply is that my theme, Default, is set to override my preference setting of 40. That surprised me because it _is_ the Default theme.

    Number per page is an awkward setting to set in the first place. How do I know how many I want per page for my album when one has 270 images and the other 71 and the other.... (being a global setting). I tend to think of how many images I want per row then let the number of rows it takes work out.
  • trisweb Administrator
    The theme controls this via the 2nd argument to `next_image()` -- in the case of the default theme, that's figured out by the `normalizeColumns()` function.

    The solution is to find `normalizeColumns('2', '6');` (or something similar) and change it to `normalizeColumns('2', '4');` since the width of your image is different. The 2nd number is the number of columns to use.

    Once again, change `normalizeColumns('2', '6');` TO `normalizeColumns('2', '4');`

    The reason we have to do this is because Subalbums might exist in the albums, and they may not line up with the images the same way, so the theme has to tell Zenphoto how many columns for subalbums and how many columns for images.

    What you did was change the number of columns used for your images by changing their size, but then did not update the theme to reflect that. So, one more time...

    Find `normalizeColumns('2', '6');` and change it to `normalizeColumns('2', '4');`
  • What you did was change the number of columns used for your images by changing their size, but then did not update the theme to reflect that. So, one more time...

    I'll do that but want to clarify: I'm not knowingly changing the number of columns so how would I ever know about this code? That's two different levels of users. Even as Admin, doesn't mean I'd know how to code as most is via your GUI interface. Maybe it's a question of and/or -- either you set the size of the image OR you set the number of columns/images per? Just "thinking out loud" as I can see this tripping people up. The sizing I used was from a manual photo album I did (not sure of origins). I set Photoshop for the thumbsize I wanted then I decided I wanted to see 4 per column. I added rows until I had them all placed, having no idea how many I'd end up with on one page. That too is a catch: how do I know what to put in that parameter? I picked 40 as that's what I used.

    When I had all the thumbs, row after row, on one page, I saw there were too pany so created a page 2. A lot of work. In essence Zenphoto is somewhat recreating visually my album by guys who know a lot more coding (PHP, AJAX, etc) than I do <LOL!>

    PS: What are backticks? I used <> and </> for blockquote but doesn't look different.
  • trisweb Administrator
    Backticks are the down-right facing ( sort of like a small `` ) apostrophes, on my PC keyboard the key is shared with the tilde `~`, so I hit "Shift+~" to get a backtick. Could be different on Mac.

    `Things in backticks look like this on the board`

    I understand your problem with the image rows/columns better now - you didn't change the code, only the image size in the admin.

    I'm thinking there must be a better way to calculate this without changing the code, we will look into it.
  • `okay` I'm sending this to try backticks. hope they're not cousins to ticks <LOL!>
  • acrylian Administrator, Developer
    On the Mac they are directly left to the backspace key.

    Regarding blockquote, I noticed too that it does not show up here on the board, but it does in the RSS feed though.

    PS. Backticks are even worse...:-)
  • I have just had this problem also, as my thumbnails are larger than default I have only 5 columns, and the fact that there was 18 photos per page showing made it look at first like there are only 18 photos in the album, as the last row had spaces in it.

    I have made the change suggested successfully, but it would be nice if in a future version this is handled a bit better (add a columns option next to the number of images option maybe).
  • What's "misleading" is you have to remember to log out as Admin to view the album as a visitor wil see it. In Admin mode, ALL images will show.

    I'm just viewing Album1 in "Admin" (all images show) view and I have 5 images on row 1, 2 on row 2 and back to 5 per row for the 9 remaining rows on page 1. (I've modified the settings from the original posting to make the thumbnails longer vs wider)

    Logout and viewed as "Visitor" (some marked not to show): I have 8 rows of 5 images each, ONE on row 9 aligned to the right and ONE on row 10 aigned to the LEFT! Then, link to move to page 2.
  • I had issues with this when I first installed ZenPhoto as well. Has a user friendly fix been discussed by the developers at all since then?
  • acrylian Administrator, Developer
    If you change the thumb size to a smaller than the default more thumbs fit into a a row (there are no columns in HTML/CSS!!!). It's floating. you have then either adjust the thumbs per page options. If you have set to 15 for example and change the thumbs so that 6 fit per row it of course does not work. You need then of course 18 per page.

    As to the thumbs and album thumbs together that has been discussed many times. Search the forum and doc for `normalizeColumns`.

    Remember the real flexibility/strenght of Zenphoto lies actually in the theming.
  • I spent a couple of hours on this problem yesterday, knowing nothing about normalise column. Can I suggest an addition to the text in the themes (Effervesence+ in my case) where you can define "Images per page:". The narrative says "Controls the number of images on a page. You might need to change this after switching themes to make it look better." Suggest adding "Use in conjunction with settings for `normalizeColumns` in the theme pages."
  • What about the text that says that those options may not be honored by all themes for design reasons?
  • acrylian Administrator, Developer
    And there is also a troubleshooting entry...;-)
  • True, but it doesn't help us find the solution if you don't know what to look for. By experiment I worked out that no. cols per row was coming out at a multiple of 5 despite wanting a 6 x 4 layout (24 per page). I had no clue as to where to start looking, and assumed that it was something in the core overriding this theme option (after all it's on the tab headed them options). Only when reading this post do I see the link to `normalizeColumns`, and now my layout is just as I want it. It's only a suggestion ...
  • acrylian Administrator, Developer
    And we of course appreciate suggestions. The normalizeColumns function is actually only needed if you mix thumbs and images to equal the colums (actually its rows as there are no colums in HTML). If you have either subalbums or thumbs listed it is actually not needed at all.
  • Now that does puzzle me. My album page is thumbs only, no subalbums. Set number of images per page to 24, but until I changed `IMAGECOLUMNS` from 5 to 6, I was getting 25 images per page. Don't worry to come back, I'll go read `normalizeColumns` in more detail.
  • acrylian Administrator, Developer
    That is actuallly related ot the `$firstimages` parameter that is set to the `next_image` loop in the standard themes and generated by the `normalizeColumns` function.
Sign In or Register to comment.