First I begin with a question : what is the effect of $conf['order_by'] ? differences with $conf['order_by_inside_category'] ?
So I think this/these paremeters should be included in the admin configuration page, I don't really know how yet...
I thought of a drop-down menu with most used configurations, and a "Personalized" option that displays an input where users can enter their ORDER string as they do currently in LocalFilesEditor.
What's your opinion ?
Last edited by mistic100 (2011-05-30 19:03:50)
Offline
$conf['order_by_inside_category'] -> when you display the content of ONE category/album
$conf['order_by'] -> all the rest
I think it could be a good thing to have these options part of the configuration pages.
Offline
Zaphod wrote:
I think it could be a good thing to have these options part of the configuration pages.
yep ! because it's written "order by default" in the order management page for the thumbnails of an album, and it seems that many people want to change this config according to the posts on this English forum
Offline
I think this would be great, as long as it stays "easy to configure". But yes, definitely an order_by in [Administration > Configuration > Options] would be better.
One difficulty will be to migrate the existing configurations from local/config/config.inc.php to the database.
Offline
so what are the most used configuration ?
plg : if I just add a row 'order_by' in the conf table I suppose that it will be overwrited by the local config ?
so we can rename the parameters
'order_by' => 'order_global'
'order_by_inside_category' => 'order_inside_category'
or perhaps local files can be modified by the upgrade script ? (to delete the line)
Offline
just seen local conf is loaded before db conf, so I don't see any problem here
Offline
mistic100 and I have been working on this feature today (prior to 2.3.0beta2). After discussions (P@t and I also discussed about the new user interface), several changes were applied by mistic100:
1) we have the same ergonomy as on screen [Administration > Albums > Edit > Manage photo ranks]
2) we hide the order_by_inside_category, it can only confuse users, but it's still possible to edit it with the local configuration
3) it's still possible to have a custom value with $conf['order_by_custom'] and $conf['order_by_inside_category_custom']
4) if $conf['order_by'] is defined in the local configuration, an upgrade task tries to convert it into $conf['order_by_custom'] if the current value does not match the simple rules (if you have something like "order by lower(concat(name,file,comment))"). If the local configuration file is not writable, we display a warning in the administration saying that $conf['order_by'] is deprecated and should be replaced by $conf['order_by_custom'] in the local configuration.
5) the main difference between order_by and order_by_inside_category is that you can use the rank (ie "manual order") for order_by_inside_category. If you define $conf['order_by'] = 'order by rank asc, date_creation desc, id desc' then Piwigo will remove the "rank asc" when using $conf['order_by'] inside an album/category.
Great job mistic100, I think we have a good user interface now and the setting becomes much simpler for users!
Offline