Member
Member
jackdaw   2012-11-22, 20:41
#1

There is a setting for default ordering for images and albums, but not for search results. I think it can be done in the template with setOption() but I don't know how. I just added a new set of images, but now results from last year come before the new additions, like this: http://www.jacktummers.nl/collectie/page/search/?words=paardenmarkt+hedel

Member
Member
sbillard   2012-11-23, 01:02
#2

search results are ordered by "relevance" (the number of times the item is found) no default, but you can call the function passing a sotr order.

Member
Member
jackdaw   2012-11-24, 13:23
#3

Do I add this to the printSearchForm function? Perhaps you can tell me how.

Administrator
Administrator
acrylian   2012-11-24, 14:43
#4

No, on the loops on your theme's search.php (next_image/next_album).

Member
Member
jackdaw   2012-11-25, 13:05
#5

Ok, but I can't find what the options could be. I can find the $sortorder everywhere, but what values can it have???

I now have this:

while (next_image(false, id, desc))

Administrator
Administrator
acrylian   2012-11-25, 13:20
#6

You should be able to use all those that are listed on the backend options for images/albums sorting. Of course you also need to enclonse strings parameters in quotes.

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