Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How do I add extra search fields....

Quote Reply
How do I add extra search fields....
I am searching for a mod or way to add extra search fields to a Links search query.

I have a use for Links as an Internal links system only (no external links) but want to add extra search options in the way of pulldown menus etc. More specifically, as an example, I have added a field to the DB called "Price" and would like to add a pulldown menu (perhaps) that contains price ranges e.g. 100,000-200,000 that would limit the search to records in that Price range.

I would probably need to add a couple of other fields like this. e.g. another would be "Area" and I would need to provide a form field to take an integer that the area should be less than or greater than.

Does anyone know of such a mod or how to go about implementing it.

Many thank in advance.

--

Lou S (a.k.a. romulus)
Quote Reply
Re: [romulus] How do I add extra search fields.... In reply to
The main way to get to it is Database > Links (dropdown) > Properties (dropdown). You will then find a link called 'Add Column' which you need to click on to add a new field. Its all pretty simple.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] How do I add extra search fields.... In reply to
Errrr.....Yes you are absolutely correct...adding a column to the DB is "pretty simple"....that wasn't what I was looking for an answer too Wink

As I said I have already added the fields I want to search on....the answer I am looking for pertains to the bit that says-

"More specifically, as an example, I have added a field to the DB called "Price" and would like to add a pulldown menu (perhaps) that contains price ranges e.g. 100,000-200,000 that would limit the search to records in that Price range."

I am guessing I may need to modify the Search.pm and of course the Search template itself so that the search could take $query and the other fields I want to use in narrowing the search. I just wanna do it in a way that doesn't break anything for future updates.

Or am I missing this as a feature already lurking somewhere in Links?

--
Lou S (a.k.a. romulus)
Quote Reply
Re: [romulus] How do I add extra search fields.... In reply to
I believe that this feature already exists. For example, if you called search.cgi?query=test, you could narrow it further by adding something like search.cgi?query=test&Price=10000. This would narrow the search down to only matches with 10000 as the 'Price' field, and something in the title/description with 'test' in it Wink Hope im right this time with what you are asking...lol

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] How do I add extra search fields.... In reply to
Yep kewl...but is there a way to do a relational search...that is really what I need.

e.g. search.cgi?query=test&Price>10000

???

Damn difficult aren't I LOL! Wink

--
Lou S
Quote Reply
Re: [romulus] How do I add extra search fields.... In reply to
Try it. May work ;) I know its possible, but I'm not sure of the format.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [romulus] How do I add extra search fields.... In reply to
the format is search.cgi?Field=>3000

e.g. search.cgi?ID=>3000


edit: or indeed search.cgi?Field=<3000

and as you are aware search.cgi?Field=3000
------------------
Dorg Hurgler Van Schongleur,
NordHein Van Resetelem, Belgium.
Eck SchekeBuugler Technologies.

Last edited by:

searchposts: May 31, 2002, 5:58 AM