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

NeilPorter’s picture

Berdir came out with a patch that I think covers your needs here.

Jackl85’s picture

Status: Active » Closed (duplicate)

Yes, sorry for duplicate.
Now I follow this topic #312323: Image sorting + Organize images