Support > cpg1.4.x Deutsch (German)
Bilder sortieren - andere Möglichkeit?
Αndré:
Problem: in der Funktion get_pic_data in include/functions.inc.php steht folgendes:
--- Code: --- $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',
);
--- End code ---
Ändere
--- Code: --- 'da' => 'pid ASC',
'dd' => 'pid DESC',
--- End code ---
in
--- Code: --- 'da' => 'ctime ASC',
'dd' => 'ctime DESC',
--- End code ---
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
Navigation
[0] Message Index
[*] Previous page
Go to full version