forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: dimangelid on January 27, 2019, 10:14:00 pm
-
Hello,
I have installed version 1.5.46 at my website. We have setup some custom fields and our users complete them when uploading any photo.
Now we want to ascending sort thumbnails on all albums by one of these fields, which is numeric. Such option is not available at gallery settings.
Is anyone aware how can i achieve that?
-
Hello,
I have installed version 1.5.46 at my website. We have setup some custom fields and our users complete them when uploading any photo.
Now we want to ascending sort thumbnails on all albums by one of these fields, which is numeric. Such option is not available at gallery settings.
Is anyone aware how can i achieve that?
Hello again,
Is anybody aware on how to achieve that?
-
Not quite sure what you are asking. Maybe this thread will help https://forum.coppermine-gallery.net/index.php/topic,63706.msg375149/topicseen.html#msg375149
-
I assume you're talking about that option: https://documentation.coppermine-gallery.net/en/configuration.htm#admin_thumbnail_default_sortorder
The probably easiest way would be to set that value to "Position ascending" and create a small script that updates the value of the position field with the value of your custom field (I can provide such a script, if you cannot create it yourself). Of course this script needs to be run regularely (e.g. with a cronjob) to update any changes in the custom fields or if new files are added to your gallery. Alternatively you could modify the Coppermine code to use the custom field instead of the position field, but modifying core files is not recommended.