When going to flat mode, Piwigo doesn't follow the expected sort orders.
Let's imagine you have defined this manual order (for albums and for photos inside the 3 albums)
```
* album A
** album A2
*** photo A2c
*** photo A2d
*** photo A2b
*** photo A2a
** album A1
*** photo A1b
*** photo A1a
*** photo A1c
** album A3
*** photo A3a
*** photo A3b
*** photo A3c
```
If "album A" is configured to sort on manual order, then a flat "album A" should display:
```
* album A
*** photo A2c
*** photo A2d
*** photo A2b
*** photo A2a
*** photo A1b
*** photo A1a
*** photo A1c
*** photo A3a
*** photo A3b
*** photo A3c
```
<!-- github-sync-id:156266594 -->
To be able to sort photos this way, we would have to have a "global rank" for photos as <album global rank>.<photo rank>. MySQL can't sort on such value, with a natural case sort. It means Piwigo would have to fetch all images from database, natcasesort them and array_slice them.
To be able to sort photos this way, we would have to have a "global rank" for photos as `<album global rank>.<photo rank>`. MySQL can't sort on such value, with a natural case sort. It means Piwigo would have to fetch all images from database, natcasesort them and array_slice them.
<!-- github-comment-id:220964384 -->
@modus75 actually, I think a photo should always have an image_category.rank (be it defined by hand or by a sorting criterium). It would mean that if you configure your album to sort by "date posted", it will update the image_category.rank accordingly. This is a bit what the plugin "reset manual order" http://piwigo.org/ext/extension_view.php?eid=620 tries to do.
@modus75 actually, I think a photo should always have an image_category.rank (be it defined by hand or by a sorting criterium). It would mean that if you configure your album to sort by "date posted", it will update the image_category.rank accordingly. This is a bit what the plugin "reset manual order" http://piwigo.org/ext/extension_view.php?eid=620 tries to do.
<!-- github-comment-id:220966380 -->
Thanks to Perrick for filing this. If it helps any, Menalto Gallery 1 supported this feature (http://codex.galleryproject.org/Downloads). It treated subalbums and pictures the same, letting you order them together. Then the slideshow would go through them in order, going into subalbums as needed.
Thanks to Perrick for filing this. If it helps any, Menalto Gallery 1 supported this feature (http://codex.galleryproject.org/Downloads). It treated subalbums and pictures the same, letting you order them together. Then the slideshow would go through them in order, going into subalbums as needed.
<!-- github-comment-id:220969675 -->
When I worked on plugin Menalto2Piwigo I realized how different was the database model of Menalto compared to Piwigo (by the way, I understand why they had to redesign it from scratch afterwards... ;-). In this specific case, it makes the feature more complex to implement in Piwigo.
When I worked on plugin Menalto2Piwigo I realized how different was the database model of Menalto compared to Piwigo (by the way, I understand why they had to redesign it from scratch afterwards... ;-). In this specific case, it makes the feature more complex to implement in Piwigo.
<!-- github-comment-id:220970808 -->
I guess they did, because Gallery 2 no longer supported the feature. Haven't been able to get Gallery 3 to install correctly, not sure what it does with this.
I guess they did, because Gallery 2 no longer supported the feature. Haven't been able to get Gallery 3 to install correctly, not sure what it does with this.
<!-- github-comment-id:220974801 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
When going to flat mode, Piwigo doesn't follow the expected sort orders.
Let's imagine you have defined this manual order (for albums and for photos inside the 3 albums)
If "album A" is configured to sort on manual order, then a flat "album A" should display:
To be able to sort photos this way, we would have to have a "global rank" for photos as
<album global rank>.<photo rank>. MySQL can't sort on such value, with a natural case sort. It means Piwigo would have to fetch all images from database, natcasesort them and array_slice them.That's tough. What if A1, A2 and A3 have a mix of manual /automatic sort order?
@modus75 actually, I think a photo should always have an image_category.rank (be it defined by hand or by a sorting criterium). It would mean that if you configure your album to sort by "date posted", it will update the image_category.rank accordingly. This is a bit what the plugin "reset manual order" http://piwigo.org/ext/extension_view.php?eid=620 tries to do.
Thanks to Perrick for filing this. If it helps any, Menalto Gallery 1 supported this feature (http://codex.galleryproject.org/Downloads). It treated subalbums and pictures the same, letting you order them together. Then the slideshow would go through them in order, going into subalbums as needed.
When I worked on plugin Menalto2Piwigo I realized how different was the database model of Menalto compared to Piwigo (by the way, I understand why they had to redesign it from scratch afterwards... ;-). In this specific case, it makes the feature more complex to implement in Piwigo.
I guess they did, because Gallery 2 no longer supported the feature. Haven't been able to get Gallery 3 to install correctly, not sure what it does with this.