Gossamer Forum
Home : Products : Links 2.0 : Customization :

Sorting Search Results.. :)

Quote Reply
Sorting Search Results.. :)
Lookey Here!! Smile

I was doing this last night.. and I happened to get it to work easily.. but I basically added some stuff to it to make it sort more correctly..

anyways.. go to:

http://www.widgetz.com/index.htm (excuse the mess please)

enter "test" and select all Widgetz! or in Software and look at the results! Smile sort it in anyway you want..

Just wanted to know if you guys want this as a mod.. it can have Categories as results.. (i took it out of mine)

but it can't have category title links.. ie:

CATEGORY
link1 in CATEGORY
link2 in CATEGORY

it gets rid of that.. cause it basically sorted each category Smile

What do you think?
Jerry
Quote Reply
Re: Sorting Search Results.. :) In reply to
widgetz,

Brilliant! I am interested in your code. If possible, please send it by email (to john.gotze@statskontoret.se) or upload it somewhere.

I specifically see a solution for the issue I raised in the thread at http://www.gossamer-threads.com/...um3/HTML/002294.html .

Thanx!
John
Quote Reply
Re: Sorting Search Results.. :) In reply to
Wow! Very, very useful. I would love to see this posted as a mod. Great work!!!

Best,
Kate Smile

------------------
www.floor42.com
Floor 42 - Fans of Douglas Adams

Quote Reply
Re: Sorting Search Results.. :) In reply to
Very Nice! Yes, a mod would be nice!

Please share if you have the time!

Thanks for the hard work and wonderful results!

Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Sorting Search Results.. :) In reply to
i'll share it.. (i guess)

but first i want to know how legal it is to charge a small fee.... Smile j/k

before i do that.. i want to make it sort categories too... i'm not sure if i should use cgi to do it or just make like 10 html files..

jerry
Quote Reply
Re: Sorting Search Results.. :) In reply to
I hate paying for stuff, so I figured it out myself. Open search.cgi:

Find the line:
%in = &parse_form();
add:
$sortnum = $in{'sort'};

find:
push (@{$link_results{$values[$db_category]}}, @values);

change to:
push (@{$link_results{$values[$sortnum]}}, @values);

That's it. In the search.cgi url for the search, just add the field number you want to search by. for example:

search.cgi?query=test&sort=1

Enjoy.


------------------
Quote Reply
Re: Sorting Search Results.. :) In reply to
if that works.. that is scary.. try to sort numbers.. lol

try again..

jerry
Quote Reply
Re: Sorting Search Results.. :) In reply to
plus.. did you notice the "j/k" after that line Smile

i didn't mean it.. it will be free.. GEEEZ

hehe
jerry
Quote Reply
Re: Sorting Search Results.. :) In reply to
hmm.. i do not understand that code..

first.. you save it to a hash..
when $sortnum = 1 then the hash equals
%link_results{'Title of Link'}

then you sort EACH link.. 1 by 1.. err.. it's called.. SLOW Smile

the only reason that works.. is cause it thinks TITLE of LINK is a category.. then it sorts it in that order.. do you understand ? Smile

three things about that code..

1. too slow..
2. makes half the search.cgi unusable.. (categories)
Quote Reply
Re: Sorting Search Results.. :) In reply to
Sorry. I didn't see the j/k. Please accept my appologies.

I look forward to your MOD,

Nicholas

------------------
Quote Reply
Re: Sorting Search Results.. :) In reply to
ok nicholas is the only one that has my mod now.. i gave it to him through icq after he waited a whole hour for me to finalize it.. hehe Smile

i also added descend and ascend.. Smile

i'll make instructions in a few days
Quote Reply
Re: Sorting Search Results.. :) In reply to
Ok.. I am done with it... COMPLETELY Smile

but now i am off to do category sorting Smile hahah! Smile

i decided to do it this way:

category.cgi

category.cgi?category=Software/P-PC/Games/Arcade_Style&order=a&sort=1

any complaints?
i don't like the idea of building so many html pages..

it will take lots of bandwidth.. maybe i can make 2 versions.. 1 this way and way the other.. what do you think?

jerry
Quote Reply
Re: Sorting Search Results.. :) In reply to
Hi:

Some time ago Widgetz commented something about ' Sorting Search Results'.

But I have looked for in the FAQ, the the Forum and in the center of resources, but I have not found anything.

I have seen work that idea in Anthrotech.com, in the results you can search by votes, hits, date, etc.

Somebody knows like I can get that mod and their instructions.

Thanks in advance.

Carlos
Quote Reply
Re: Sorting Search Results.. :) In reply to
Go here:

http://www.gossamer-threads.com/...um3/HTML/003409.html

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Quote Reply
Re: Sorting Search Results.. :) In reply to
Thaks Eliot but Widgetz.com site is down. And in the

www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/003409.html

there are references of files to their place.

Can you help me?


[This message has been edited by Nomada (edited April 09, 2000).]
Quote Reply
Re: Sorting Search Results.. :) In reply to
GD!!! Frown

Quote:
Thaks Eliot but Widgetz.com site is down.

I AM WELL AWARE OF THAT AS I HAVE STATED MORE THAN ONCE IN THE PAST THREE DAYS...THAT IS THE ONLY PLACE WHERE THERE ARE LINKS TO FILES AND INSTRUCTIONS!

Wink

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Quote Reply
Re: Sorting Search Results.. :) In reply to
Yes Eliot, but Anthrotech has that installed mod and I thought that your you could facilitate me that information. Frown

If it is not this way, thank you for everything and to wait that Widgetz.com works again. Wink

Greetings,

Carlos
Quote Reply
Re: Sorting Search Results.. :) In reply to
I cannot do that...The Mod is written by Widgetz...I cannot simply take his Mod and post it somewhere else without his permission.

So, you will have to wait for his server to come back online.

Sorry.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.