Closed (duplicate)
Project:
Album Photos
Version:
6.x-2.5-beta4
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2009 at 19:09 UTC
Updated:
31 Jan 2009 at 14:04 UTC
Is possible to add "ascendent order" to to album's picture?
I don't want to see newer photo at first. Thanks :)
I think I can change something in photos.module at function _photos_sql, probably in lines 1302-1324:
function _photos_sql($type, $sql, $num = 10, $element = 0){
switch ($type) {
case 'album':
$result = pager_query('SELECT * FROM {x_album} '.$sql.' ORDER BY pid DESC',$num, $element);
break;
case 'node':
$result = pager_query('SELECT * FROM {files} f INNER JOIN {x_image} i ON f.fid = i.fid WHERE '.$sql.' ORDER BY i.wid ASC,i.fid DESC',$num, $element);
break;
case 'xml':
$result = db_query('SELECT f.filepath, f.timestamp, p.* FROM {files} f INNER JOIN {x_image} p ON f.fid = p.fid WHERE '.$sql.' ORDER BY p.wid ASC, p.fid DESC');
break;
case 'allimage':
$result = pager_query('SELECT f.timestamp, f.filepath, p.* FROM {files} f INNER JOIN {x_image} p ON f.fid = p.fid '.$sql.' ORDER BY p.wid ASC, p.fid DESC', $num, $element);
break;
case 'numimage':
$result = db_query_range('SELECT f.timestamp, f.filepath, p.* FROM {files} f INNER JOIN {x_image} p ON f.fid = p.fid '.$sql.' ORDER BY p.wid ASC, p.fid DESC', 0, $num);
break;
}
while ($a = db_fetch_object($result)) {
$t[] = $a;
};
return $t;
}Very nice module ^^
Comments
Comment #1
NeilPorter commentedBerdir came out with a patch that I think covers your needs here.
Comment #2
Jackl85 commentedYes, sorry for duplicate.
Now I follow this topic #312323: Image sorting + Organize images