•  » Engine
  •  » $conf['order_by'] in a form

#1 2011-05-30 19:00:48

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

$conf['order_by'] in a form

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

 

#2 2011-05-30 20:32:09

Zaphod
Former Piwigo Team
2006-11-13
441

Re: $conf['order_by'] in a form

$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

 

#3 2011-05-30 20:47:54

flop25
Piwigo Team
2006-07-06
7038

Re: $conf['order_by'] in a form

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


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#4 2011-05-30 21:19:29

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14093

Re: $conf['order_by'] in a form

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

 

#5 2011-05-31 13:53:44

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: $conf['order_by'] in a form

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

 

#6 2011-05-31 19:24:34

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: $conf['order_by'] in a form

just seen local conf is loaded before db conf, so I don't see any problem here

Offline

 

#7 2011-07-01 21:16:07

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14093

Re: $conf['order_by'] in a form

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:

http://piwigo.org/forum/showimage.php?pid=123201&filename=default_sort_order_user_interface.png

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

 
  •  » Engine
  •  » $conf['order_by'] in a form

Board footer

Powered by FluxBB