Bilder sortieren - andere Möglichkeit? - Page 2 Bilder sortieren - andere Möglichkeit? - Page 2
 

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

Bilder sortieren - andere Möglichkeit?

Started by Starlight, April 27, 2009, 09:57:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Αndré

Problem: in der Funktion get_pic_data in include/functions.inc.php steht folgendes:
        $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
          'da' => 'pid ASC',
          'dd' => 'pid DESC',

in
          '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.

Starlight

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

UserTier

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