Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [Solved]: sort order again ...  (Read 2033 times)

0 Members and 1 Guest are viewing this topic.

dwo

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 143
[Solved]: sort order again ...
« on: June 30, 2008, 01:32:11 pm »

Hello.

When I choose as admin "sort position ascending" or "sort position descending" the pics get sorted like the user sorts them himself ONLY if he does sort himself.


However, if the user does sort nothing, the default setting seems, that in thumbnail view, always the oldest pic stays at top left and the next ones are added afterwards.

Could anyone please tell me where one can change this default settings to the reverse order? In thumbnails.php?



Thank you, reagrds Dietmar
« Last Edit: June 30, 2008, 10:27:19 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: sort order again ...
« Reply #1 on: June 30, 2008, 04:20:40 pm »

Default sort order is a config setting. Clear cookies to revert any sorting done by the links in thumbnails page.
Logged

dwo

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 143
Re: sort order again ...
« Reply #2 on: June 30, 2008, 04:39:10 pm »

Hello.

The example above is with cleared cookies and with, for the user not visible, manual user sort settings - ... +
So the user cannot change that.


ok. I try to explain another way.

Basically I choose in the adminconfig "position ascending". So that when a user sorts manually, it will be displayed as he sorted. That function is ok, works.

But when a user does not sort manually, I would like as default setting sort by "upload date ascending"
So as if a user clicked on the "DATE +" which I hided. This should be the default.


Right now, "date -" is the default if you do nothing as user. I want that reversed.


Thank you.

(so I want to change the default sort order, before sort order is stored in the cookies though the user)

regards, Dietmar
Logged

Nibbler

  • Guest
Re: sort order again ...
« Reply #3 on: June 30, 2008, 04:45:55 pm »

include/functions.inc.php

change

Code: [Select]
'pa' => 'position ASC',
to

Code: [Select]
'pa' => 'position ASC, pid ASC',
Logged

dwo

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 143
Re: sort order again ...
« Reply #4 on: June 30, 2008, 05:04:06 pm »

I changed that line in function get_pic_data but that does not change anything.

Code: [Select]
$sort_array = array(
          'na' => 'filename ASC',
          'nd' => 'filename DESC',
          'ta'=>'title ASC',
          'td'=>'title DESC',
          'da' => 'pid ASC',
          'dd' => 'pid DESC',
          'pa' => 'position ASC, pid ASC',
          'pd' => 'position DESC',

I have set "position ascending" as admin, cleared cookies, clicked nowhere else, and any file i upload still gets at last position of the thumbnail view. I would like to see it at first position.

Thank you.

regards, Dietmar
Logged

Nibbler

  • Guest
Re: sort order again ...
« Reply #5 on: June 30, 2008, 05:06:21 pm »

If you want new pics to be first then that would be date descending, so:

Code: [Select]
'pa' => 'position ASC, pid DESC',
Logged

dwo

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 143
Re: sort order again ...
« Reply #6 on: June 30, 2008, 10:18:29 pm »

Works perfect. Thank you very much.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.