Advanced search  

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

Pages: [1]   Go Down

Author Topic: Sorting linked files by position  (Read 4619 times)

0 Members and 1 Guest are viewing this topic.

nambroque

  • Coppermine regular visitor
  • **
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 85
    • Galería Fotometeo
Sorting linked files by position
« on: April 20, 2016, 11:06:31 pm »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Sorting linked files by position
« Reply #1 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.


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?
Logged

nambroque

  • Coppermine regular visitor
  • **
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 85
    • Galería Fotometeo
Re: Re: Sorting linked files by position
« Reply #2 on: April 25, 2016, 10:17:50 pm »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Sorting linked files by position
« Reply #3 on: April 26, 2016, 09:21:39 am »

Okay, now I got what you mean.

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?
Logged

nambroque

  • Coppermine regular visitor
  • **
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 85
    • Galería Fotometeo
Re: Re: Sorting linked files by position
« Reply #4 on: April 26, 2016, 09:55:38 am »

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...
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Sorting linked files by position
« Reply #5 on: April 27, 2016, 09:57:35 am »

Open js/thumbnails.js, find
Code: [Select]
    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.
Logged

nambroque

  • Coppermine regular visitor
  • **
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 85
    • Galería Fotometeo
Re: Sorting linked files by position
« Reply #6 on: April 27, 2016, 10:13:49 am »

Thanks, solved  :)
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.