I've gotta preface this by saying: thanks, Tristan, for this fantastic program! Even in beta, I like it MUCH better than everything else I've tried.
On to the question:
Per the ZenPhoto web page, I already know that sorting is planned for a future release. Until then, is there a way to manually "force" the sorting of albums on the index page? Such as modifying the album creation date, or something?
Sort of... the way PHP returns the array of files is based on creation time. So upload in the reverse order you want them (first uploaded files will be last).
There's not really a way to modify this after you've uploaded, so it's not really good for sorting. I'll try to get that in the next version...
Me too.
One idea: Could ZP respect the order the files are numbered in, as in 1.jpg, 2.jpg...etc, or 2003.jpg, 2345, jpg.
If that could be done, one could rearrange them via ftp renaming. For now...
This would make it possible to have a photo that stays at the bottom, 9999999.jpg for example, and one that stays at the top of a gallery.
sorting would be amaaazing. doesn't even have to be AJAX, just anything.
Yeah, natcasesort is probably a better bet. Stick this in at line 311 of classes.php:
natcasesort($images);
This'll give you basic natural alphabetical sorting, which works pretty well for most image names. Especially if you have just pulled them off a digital camera.
It may be the indexing in the array... it's pretty hacky how it's done, but essentially, the entire album is an array which is loaded each time, and the next/prev just use the index of the current in that array. So make sure it's always sorted the same way I guess.
Yeah, that was it. Since we're using the numerical index of the array to get the next/prev images, we need to store the new array values, without the previous keys. So, after the while loop in getImages, insert this:
natcasesort($images);
// Store the result so we don't have to traverse the dir again.
$this->images = array_values($images);
Note: the last line replaces the previous storing of the array. That'll solve the next/prev links problem.
Check out my post in the Status topic for some good news on manual sorting!