I'd like to set my default sort order to Creation Date (ascending). How do I do that (in 2.2)?
Marc
Offline
i think piwigo will sort them on that order on creation process for (albums) or (pics)
but if u mean after creation process for a time , if they get mixed up and want to order them
i by that order u may that need a plugin (idk)
Offline
Use the LocalFiles Editor plugin to change the order.
This is the code:
$conf['order_by'] = ' ORDER BY date_creation ASC, file ASC, id ASC'; $conf['order_by_inside_category'] = $conf['order_by'];
It worked great in the previous version, but I'm having a problem in categories that have more than one day in them. I liked the idea having the most recent day be first and the pictures taken on that day in order (date_creation DESC, file ASC) of first to last but Piwigo V2.2 isn't following my direction and the file name is being ignored. It's either all ASC or all DESC. >:(
If there's only one day in the category, it works great.
Last edited by lisaviolet (2011-04-10 21:42:10)
Offline
acctually u can depend on the pic's for that order
but how if u wanna depend on the categories itself not pic's?
checked mysql table for that categories itself and no date for categories creation (categories not pic)
so order via categories it self not possible , else u gotta patch it ur self as i think
Offline
lisaviolet wrote:
Use the LocalFiles Editor plugin to change the order.
This is the code:Code:
$conf['order_by'] = ' ORDER BY date_creation ASC, file ASC, id ASC'; $conf['order_by_inside_category'] = $conf['order_by'];It worked great in the previous version, but I'm having a problem in categories that have more than one day in them. I liked the idea having the most recent day be first and the pictures taken on that day in order (date_creation DESC, file ASC) of first to last but Piwigo V2.2 isn't following my direction and the file name is being ignored. It's either all ASC or all DESC. >:(
If there's only one day in the category, it works great.
try instead of date_creation => date_available
Offline
bakir wrote:
try instead of date_creation => date_available
It doesn't change a thing. The pictures are still sorted in descending order, no matter if I use date_available or date_creation. It only sees the first option, disregards the others. Both ways appear as shown in the following screenshot.
http://piwigo.org/forum/postgallery.php … ryshot.jpg
Okay, now that's weird. It's working right on the images (using date_available, but not date_creation) uploaded since the upgrade, just not on the pre-upgraded images.
They got messed up after the metadata batch synch.
Added.....
It works when I re-upload the exact same images to the exact same folders, but I have to redo all descriptions. That's going to take some time. *sigh*
Last edited by lisaviolet (2011-04-11 02:41:37)
Offline
i give ya advice , never upgrade any software without backing up ur db
so i did , i backed up ma database , create fresh install of piwigo , restored the database
some extra work, restoring the database , everything works fine
Offline
I hear that. Hard lesson learned. Well, not hard, but I'll do better next time.
Offline
I think this is not normal.
We should investigate on what happend here
Last edited by flop25 (2011-04-11 21:05:11)
Offline
flop25 wrote:
I think this is not normal.
We should investigate on what happend here
If you're talking about my situation, I haven't done anything about re-uploading the pictures, I won't do anything right now. (Well, I'll upload new pictures, it's working with the new uploads, just not the ones that were there before the upgrade.)
Got stupid tax forms to fill out. That time of the year over here, so I'll be busy doing that for the next week.
Offline
lisaviolet wrote:
flop25 wrote:
I think this is not normal.
We should investigate on what happend hereIf you're talking about my situation, I haven't done anything about re-uploading the pictures, I won't do anything right now. (Well, I'll upload new pictures, it's working with the new uploads, just not the ones that were there before the upgrade.)
Got stupid tax forms to fill out. That time of the year over here, so I'll be busy doing that for the next week.
as i said u dont need to upload ur pic's just as u have access to the database , just try to manually tochange the data_available for those pic's annoying ya :D
gl
Offline
Never mind I figured it out!
Last edited by bjordan (2011-04-27 03:39:37)
Offline
bjordan wrote:
Never mind I figured it out!
bjordan - I'd like to set my albums to the same display function as well and the code hasn't worked for me either - what did you do that sorted it?
Thanks,
Anna
Offline
AnniEm wrote:
bjordan wrote:
Never mind I figured it out!
bjordan - I'd like to set my albums to the same display function as well and the code hasn't worked for me either - what did you do that sorted it?
Thanks,
Anna
Sorry for the late reply. I just saw your response. I basically used the same code mentioned above in the thread.
Install and enable plugin, "LocalFiles Editor" in the administration tool.
Then add the following code to the "Local Config" (local/config/config.inc.php) using the "LocalFiles Editor".
<?php # ================================ # Change default sort to ascending # ================================ $conf['order_by'] = ' ORDER BY date_creation ASC, file ASC, id ASC'; $conf['order_by_inside_category'] = $conf['order_by']; ?>
Offline
Thanks! I see what I did wrong - I left a comment tag in place, small wonder it wasn't working :)
Offline