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 [2]   Go Down

Author Topic: Bilder sortieren - andere Möglichkeit?  (Read 24203 times)

0 Members and 1 Guest are viewing this topic.

Αndré

  • Administrator
  • Coppermine addict
  • ****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Bilder sortieren - andere Möglichkeit?
« Reply #20 on: April 27, 2009, 01:53:07 pm »

Problem: in der Funktion get_pic_data in include/functions.inc.php steht folgendes:
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',
          'pd' => 'position DESC',
        );
Ändere
Code: [Select]
          'da' => 'pid ASC',
          'dd' => 'pid DESC',
in
Code: [Select]
          'da' => 'ctime ASC',
          'dd' => 'ctime DESC',
dann sollte es gehen.

Ich bin leichtsinnigerweise davon ausgegangen, dass nach Datum sortiert wird. Standardmäßig wird aber auch hier nach der Picture-ID sortiert.
Logged

Starlight

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 161
    • Starlight's Graphics
Re: Bilder sortieren - andere Möglichkeit?
« Reply #21 on: April 27, 2009, 01:56:49 pm »

Vielen lieben Dank für deine Mühe! :) So klappt es.
Logged

UserTier

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Bilder sortieren - andere Möglichkeit?
« Reply #22 on: August 06, 2013, 05:35:57 pm »

Für 1.5:

{  // thumb = 0
                // last uploaded file from album
                $keyword = ($row['keyword'] ? "OR (keywords like '%".addslashes($row['keyword'])."%' $forbidden_set_string )" : '');
                $query = "SELECT pid FROM {$CONFIG['TABLE_PICTURES']} WHERE ((aid = '{$row['aid']}' $forbidden_set_string) $keyword) $approved ORDER BY ctime DESC LIMIT 0,1";
                $result = cpg_db_query($query);
                list($ctime_lastup) = mysql_fetch_row($result);
                mysql_free_result($result);
                $album_thumbs[] = $ctime_lastup;
                $rowset_aid[$index]['thumb'] = $ctime_lastup;
            }

in include/functions.inc.php

sortiert die lastups nach ctime     
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.027 seconds with 19 queries.