I am new to Zenphoto and still trying to figure out how to configure it.
What I noticed is that sorting by file name produces unexpected results. I have 3 files in an album. When I sort them by filename in descending order I get:
20121001v
20101018c
2011v
When I sort by file name in ascending order I get:
2011v
20101018c
20121001v
Apparently sorting does work (since the order changes), but my guess it works in Windows 7 fashion, where it converts names to numbers first. As you can tell my files have year number in front and all I want to do is to sort them chronologically. Since a lot of my files are scans and do not have EXIF time stamps I tried to manage it through file names and when I run ls command on the server they do come up in the right order.
Is there a way to configure sorting to compare file name literally?
Comments
While it would be possible for you to get a different order (a pure ascii search seems what you wish) it will take a large amount of work.
You will have to replace the `next_image` loop with the appropriated code based on the object model. Where you retrieve the images you would specify the sort parameters fully.
Even then you will have other problems. For instance, pagination would have to be custom coded as well.
A really better approach would be to name your images in a way that gives you the order you want in the first place since you are doing that anyway. (e.g. be consistent in the number of digits you use.) Alternatively would be to set the date via an EXIF editor or the Zenphoto back-end and then use the date itself.