Member
Member
NaturalEnquirer   2011-09-05, 21:24
#1

How is the default sort order set for images found by a tag search? E.g. galleries/page/search/tags/searchitem . I'd like images to be sorted by title, e.g.

Member
Member
sbillard   2011-09-05, 23:17
#2

The default for a search is the gallery sort order.

Member
Member
NaturalEnquirer   2011-09-06, 21:11
#3

Thank you.

Member
Member
tplowe56   2013-02-25, 03:18
#4

Is the statement above documented as fact or is there a bug?

I asked the same question in a different post and was given a different answer than the poster above.

My testing of approved themes does not show that searches can be sorted by the gallery order. Or by the custom options offered in gallery sort order.

I tried "filename,date" or "date,filename" as parameters for gallery sort, but it seemed to have no effect at all on the the search returned.

Actually....when I use custom sort "date,filename" I get a MySQL error when I initiate a search.

Administrator
Administrator
acrylian   2013-02-25, 10:36
#5

This topic is very old from a time the search engine was in its early state.

As noted on the other topic: Search order is by relevance (you don't expect another order for results, do you?). If you wish another you need to do that in the loops on your theme directly.

The only "search" results you can sort via the backend are dynamic albums (=saved searches).

Member
Member
zubizuri   2013-03-25, 16:35
#6

Same Problem here,
i'm trying to sort my results in my search.php

$sorttype = 'title';
$sortdirection = "asc";
while (next_album(true, $sorttype, $sortdirection)):
...

But whatever value i use for $sorttype it does not change the order.
Same code is working flawless on my index/album.php.

Ideas? Is it a bug? There has to be a way to order the results. I'm using tags as a part of the navigation, so ordering by relevance does not make sense here.

Member
Member
sbillard   2013-03-26, 02:25
#7

Yes, it is a bug.

Member
Member
zubizuri   2013-03-26, 15:13
#8

Well okay.
finally i did a workaround by collecting and sorting the albums in an array.
So do i have to open a ticket or something for this bug??

Thanks for your reply!

Member
Member
sbillard   2013-03-26, 18:41
#9

Ideally you would open a ticket so the fix could be tracked. But since the fix is now in the support build there is no need.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.