Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Search Sort Order and Category Sort Order

Quote Reply
Search Sort Order and Category Sort Order
Is it possible for the user to decide which field they want to sort on? For example, to sort by date, name, hits, votes, by passing in an argument to page.cgi as such : http://server/...Date&AscDesc=ASC



Thanks for your time.
Quote Reply
Re: [Donald Rumsfeld] Search Sort Order and Category Sort Order In reply to
I am not sure if this is what you mean?

Quote:
You can pass in to search.cgi, sb=ColumName to sort by ColumnName, and so=ASC or so=DESC to sort it ascending or descending order.
http://www.gossamer-threads.com/...i?post=186195#186195


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] Search Sort Order and Category Sort Order In reply to
Fantastic Ian, that is exactly what I am looking for. Cool.

Thanks.
Quote Reply
Re: [Donald Rumsfeld] Search Sort Order and Category Sort Order In reply to
I was looking to do it in page.cgi, but I guess I can pass the catid to search.cgi to achieve this.
Quote Reply
Re: [Donald Rumsfeld] Search Sort Order and Category Sort Order In reply to
Actually, I don't think that I can. It needs a query, which is exclusive, and I can't use * [or for that matter the or and.



Any ideas anyone?
Quote Reply
Re: [Donald Rumsfeld] Search Sort Order and Category Sort Order In reply to
Hello,

i have the same problem ;-)

I've found the part where page.cgi is sort the Links in Build.pm (sub build_category):

OLD : $catlink_db->select_options ("ORDER BY $CFG->{build_sort_order_category}") if ($CFG->{build_sort_order_category});

What can I do to transfer a parameter like "sb=Hits" through page.cgi ?

NEW: $catlink_db->select_options ("ORDER BY $sb");

e.g. http://..../cgi-bin/page.cgi?g=misc%2F&d=1&sb=Hits

Thanks, Oliver
Quote Reply
Re: [flasi] Search Sort Order and Category Sort Order In reply to
Did you ever get this to work? I too would like to do sorting using the page.cgi file. I get a blank page when I try your code.

Last edited by:

Katana Man: Oct 23, 2002, 5:37 PM
Quote Reply
Re: [Katana Man] Search Sort Order and Category Sort Order In reply to
In my http://slashdemocracy.org/links I use:

.../search.cgi?query=*&sb=ID&so=DESC&catid=58

.../search.cgi?query=*&sb=ID&so=ASC&catid=58

It would be nicer to be able to use page.cgi, but this does the job.

John
Quote Reply
Re: [gotze] Search Sort Order and Category Sort Order In reply to
I think this depends on the indexing scheme you are using - at least, I'm using internal indexing and I can't get any results with query=* so I assume that's what the problem is. Rather annoying.

Laura.
The UK High Street
Quote Reply
Re: [afinlr] Search Sort Order and Category Sort Order In reply to
Mine is currently NONINDEXED and search.cgi?query=*&sb=ID&so=ASC&catid=58 will work, but I can't change the sort order to DESC. It ignores me :(
Quote Reply
Re: [Katana Man] Search Sort Order and Category Sort Order In reply to
Well I just had a look at the link you gave and it seems to work Wink.
Quote Reply
Re: [afinlr] Search Sort Order and Category Sort Order In reply to
Yeah, it does on his site, but not mine. I wonder if the Indexing Schemes is the difference.