Sorting linked files by position Sorting linked files by position
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Sorting linked files by position

Started by nambroque, April 20, 2016, 11:06:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nambroque

At the moment, if you have an album which "contains" only linked files, it is not possible to establish their position in the album.
Would that be possible?
In case not, then I would like to know if it maybe be possible to hide the option of sorting files by position in those albums which contain no photo (or which "contain" only linked files), as that option has no sense in them.
Thanks in advance
My gallery:
Galería Fotometeo

Αndré

Some background information to understand how Coppermine sorts files. When you sort files in their "regular" album (i.e. the album you actually uploaded them to) Coppermine adds an ascending value in the database, according to your sorting. Now, if you view an album with linked files, the same values will be used to order the pictures in that album. There's no way to change that without code modification.


Quote from: nambroque on April 20, 2016, 11:06:31 PM
In case not, then I would like to know if it maybe be possible to hide the option of sorting files by position in those albums which contain no photo (or which "contain" only linked files), as that option has no sense in them.

As I personally don't use that feature, I need to ask where/how exactly you want to disable that feature. As far as I know the only way to sort pictures is to use the "Sort my pictures" button in the main menu. On the "Picture Manager" you need to select the album. Do you want to hide albums without pictures in the picture manager?

nambroque

Quote from: Αndré on April 22, 2016, 10:19:45 AM
Some background information to understand how Coppermine sorts files. When you sort files in their "regular" album (i.e. the album you actually uploaded them to) Coppermine adds an ascending value in the database, according to your sorting. Now, if you view an album with linked files, the same values will be used to order the pictures in that album. There's no way to change that without code modification.


As I personally don't use that feature, I need to ask where/how exactly you want to disable that feature. As far as I know the only way to sort pictures is to use the "Sort my pictures" button in the main menu. On the "Picture Manager" you need to select the album. Do you want to hide albums without pictures in the picture manager?

Thanks for your reply André
I'll try to explain better what I mean: At the moment, if someone is looking at an album which contains only linked files, and he/she arranges the pictures by "date" (of upload) or by "position", it is the same.
So, what I mean is that if an album contains no files (only linked ones) the option of arranging them by position (when you are seeing the album. not in the picture manager) is not useful.
For instance, you can see any of the albums of this category, and arrange them by date and then by position, and you will see that nothing will change
So, what I was asking is if it may be possible that if an album contains no files (only linked ones) the option of arrange the files by position when you are seeing the album does not appear.
My gallery:
Galería Fotometeo

Αndré

Okay, now I got what you mean.

Quote from: nambroque on April 25, 2016, 10:17:50 PM
if someone is looking at an album which contains only linked files, and he/she arranges the pictures by "date" (of upload) or by "position", it is the same.
This also applies to the rest of the albums in your gallery, if you don't manually sort your pictures (which is probably the case, as it would also affect albums with only linked files). I suggest to disable that sort option for your whole gallery. Do you agree?

nambroque

Quote from: Αndré
Okay, now I got what you mean.
This also applies to the rest of the albums in your gallery, if you don't manually sort your pictures (which is probably the case, as it would also affect albums with only linked files). I suggest to disable that sort option for your whole gallery. Do you agree?

Yes, that would be good...
My gallery:
Galería Fotometeo

Αndré

Open js/thumbnails.js, find
    sortable += separator;
   
    sortable += '<span class="sortorder_options">';
    sortable += js_vars.sort_vars.sort_position;
    sortable += '</span>';
    sortable += '&nbsp;';
    sortable += '<span class="statlink">';
    sortable += '<a href="thumbnails.php?album=' + js_vars.sort_vars.aid + '&amp;page=' + js_vars.sort_vars.page + '&amp;sort=pa" title="' + js_vars.sort_vars.sort_pa + '"><img src="images/ascending.png" width="9" height="9" border="0" alt="+" /></a>';
    sortable += '</span>';
    sortable += '&nbsp;';
    sortable += '<span class="statlink">';
    sortable += '<a href="thumbnails.php?album=' + js_vars.sort_vars.aid + '&amp;page=' + js_vars.sort_vars.page + '&amp;sort=pd" title="' + js_vars.sort_vars.sort_pd + '"><img src="images/descending.png" width="9" height="9" border="0" alt="-" /></a>';
    sortable += '</span>';
   

and delete or comment it out.

nambroque

My gallery:
Galería Fotometeo