Reverse Order Subalbums?!

My subalbums are appearing in the order that I upload them, oldest on top, newest on bottom.

I would like to have it be the opposite, with the oldest on the bottom, newest on top. Does anyone know how to accomplish this?

Comments

  • I retract my question! While applying some ticket patches to my code, one of them did the trick for me. Thanks to whoever read this anyways.
  • Subalbums don't get sorted in the current ZenPhoto versions. If you want to set the order of appearances you can, but it is a 'manual' process and you need to modify class-album.php around line 130. Change the code which reads:
    ` // Sort here?

    $this->subalbums = $subalbums;`
    to
    ` if (is_null($_zp_gallery)) {

    $sortedSubalbums = $subalbums;

    } else {

    $sortedSubalbums = $_zp_gallery->sortAlbumArray($subalbums);

    }

    $this->subalbums = $sortedSubalbums;`

    You have to use SQL queries to change the sort_order field in the database for each of the subalbums. I use phpMyAdmin for this.
  • sbillard, will this fall back on the old way if the subalbums are not sorted?
  • Here is what the comment says:

    ` * Sort the album array based on either a) the manual sort order as specified by the user,

    * or b) the reverse order of how they are returned from disk. This will thus give us the

    * album list in with the the ordered albums first, followed by the rest with the newest first.`

    Before, there was no sorting, so the albums came back in the order returned from disk.
Sign In or Register to comment.