Gossamer Forum
Home : Products : DBMan : Customization :

Two questions. About keyword search and Sorting

Quote Reply
Two questions. About keyword search and Sorting
Hello,

Once again I need some help here, Is there a way to make sb=1 default in every search, some change inside db.cgi?

And, When searching with keyword, dbman check in the field type is date, if so, it ignores. Is it possible to make dbman ignore a certain field, like field 16??

Thanks in adv.

Quote Reply
Re: Two questions. About keyword search and Sorting In reply to
1) All you have to do is add a hidden field to your search form codes, like the following:

Code:
<input type="hidden" name="sb" value="1">

2) The sub query routine would have to be dramatically hacked...at this time, there is no clean method of ignoring fields when searching using keywords.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Two questions. About keyword search and Sorting In reply to
Thanks for the reply, about the hidden field, that what I am using, but I was thinking of something like a global variable, like that I wouldnt have to change all my pages, and the parameter &sb=1 wouldnt be on the Url
Quote Reply
Re: Two questions. About keyword search and Sorting In reply to
I had an ideia, maybe you can help. There are 5 occurencies of $in{'sb'} inside the query sub.

I created a global variable $sb = 1; and replaced the 5 $in{'sb'} to $sb. It didnt work, I think the problem is the syntax.

Elliot, can you help me on this one??
Quote Reply
Re: Two questions. About keyword search and Sorting In reply to
What you have will not work.

Quote:
There are 5 occurencies of $in{'sb'} inside the query sub.

Why do you want to change the sub query? And if you are sorting by the same field, why do you need to change the hidden codes that I gave you.

It will take you less time to add the hidden field and also add the argument to your List All query string, then to re-code the sub query. And to re-code the sub query to always sort by field 1, you will lose flexibility in using other fields to sortby in the future.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums