Looking at the forums it appears that the Gallery Sort should determine the sort of search returns.
This is not the behavior I get. My images are sorted by a custom sequential number in the location field within each album, but this does not seem to have any bearing on the sort either.
So when a user clicks on a Tag that returns 500 images the sort seems completely random.
Tried various custom sorts in the gallery settings, with nothing seeming to effect the search returns.
Wouldn't mind being able to set a custom sort like "date,filename" Ascending - for searches while retaining custom sort for albums.
Comments
http://www.zenphoto.org/support/topic.php?id=9728
Do I need to pass the sort order from my theme? Searching entire form for example of this concept & can't get exactly how to accomplish this.
`
<?php printf(ngettext('%1$u Hit for <em>%2$s', '%1$u Hits for %2$s', $total), $total, html_encode($searchwords)); ?>
<?php if ($total == 0 ) { ?><?php echo gettext("Sorry, no matches found. Try refining your search."); ?>
<?php } ?><?php
if (getOption('search_no_albums')) {
if ($numimages > 0) {
echo'
- '; printf(gettext('Images (%s)'), $numimages); echo'
';}
} else {
if (getOption('search_no_images')) {
if ($numalbums > 0) {
echo'
- '; printf(gettext('Albums (%s)'), $numalbums); echo'
';}
} else {
if ($total1 > 0) {
echo'
- '; printf(gettext('Albums (%1$s) & Images (%2$s)'), $numalbums, $numimages); echo'
';}
}
}
?>
<?php if (function_exists('printSlideShowLink')) { ?>
<?php printSlideShowLink(gettext('Slideshow')); ?>
<?php } ?>
<?php printPageListWithNav(' « ', ' » ', false, true, 'clearfix', NULL, true, 7); ?>
<?php
if (getNumAlbums() > 0) {
include('inc_print_album_thumb.php');
}
if (getNumImages() > 0) {
include('inc_print_image_thumb.php');
}
?>
`
But the following call to next_image() will output search results in date order, with the newest items at the top.
`next_image(false, NULL, 'date', 'desc')`
Older versions of Zenphoto used to sort the search results in the above way - my old install of version 1.4.1.6 did just that.