forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: sharpo on December 05, 2005, 05:31:17 pm

Title: How do you order search results by title?
Post by: sharpo on December 05, 2005, 05:31:17 pm
I thought this option was to be included in 1.4.2 but I can't find where I read about it.

Can it be done, if so how, please?
Title: Re: How do you order search results by title?
Post by: sharpo on December 06, 2005, 07:55:59 pm
I've been searching through old topics to see if I can find an answer on this one. Seems it is something within include/search.inc.php that sets the order of thumbnails displayed, but I don't understand the settings. I did come across the topic that made me think it would be in 1.4.2 and it is at:-

http://forum.coppermine-gallery.net/index.php?topic=8186.msg36198#msg36198

Title: Re: How do you order search results by title?
Post by: sharpo on December 20, 2005, 01:45:05 am
Still no replies on this topic, any suggestions from anybody?
Title: Re: How do you order search results by title?
Post by: ecto on December 20, 2005, 01:53:57 am
Since the search results display in thumbnails.php, it uses the same sort order as you have set in your gallery's configuration, under "Thumbnails view" -> "Default sort order for files".
Title: Re: How do you order search results by title?
Post by: sharpo on December 20, 2005, 01:56:18 pm
Since the search results display in thumbnails.php, it uses the same sort order as you have set in your gallery's configuration, under "Thumbnails view" -> "Default sort order for files".

Thanks for the reply. I have just tried resetting the default sort order to title ascending, then "searched" for some photos, but they are displayed in filename order.

I was sure I had tried all possibilities before starting this topic, and the results are still the same. What I need to be able to do is have the default order set as filename ascending, but order after a search to be in title ascending order.
Title: Re: How do you order search results by title?
Post by: Joachim Müller on December 20, 2005, 01:57:13 pm
clear your cookies and cache as well.
Title: Re: How do you order search results by title?
Post by: sharpo on December 20, 2005, 02:02:20 pm
clear your cookies and cache as well.

Thanks Gau Gau,

I was just about to post that search results finally came out in correct order, and that was without clearing cookies & cache.

Looks like me being a bit stupid - blame it on my age!! Haven't quite found out where I went wrong in all my other attempts to get them in the right order, but at least I know it can be done.

Thanks again.

Title: Re: How do you order search results by title?
Post by: ecto on December 20, 2005, 02:26:23 pm
I was sure I had tried all possibilities before starting this topic, and the results are still the same. What I need to be able to do is have the default order set as filename ascending, but order after a search to be in title ascending order.
---
I was just about to post that search results finally came out in correct order, and that was without clearing cookies & cache.

So it works now? Uhm.. I didn't belive it was possible to have different default sort orders for displaying thumbnails regularly and after a search (without doing a hack). Have I missed something..?
Title: Re: How do you order search results by title?
Post by: sharpo on December 20, 2005, 03:00:51 pm
Ecto,

If it's any help (and this is obviously not from an expert) my default order is name ascending, but before doing a search, if the order is set to title ascending when viewing thumbnails in an album - then the results of the search are also in title order. For some unknown reason, when I first tried this after upgrading to 1.4.2, I could not get it to work. But I am pleased to say, it does now.
Title: Re: How do you order search results by title?
Post by: ecto on December 21, 2005, 01:07:50 am
Ah, yes. I guess the search function uses the sort order in the cookie then, if one exists.