Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Adding Geographical Location

Quote Reply
Adding Geographical Location
I have just installed links and it is working fine. I want to add a geographical location to my database where I can specify where the website is located. I also want to be able to search by this field but it doesn't need to apear in the results outputted. I also would like to do this for products that the website sells. So if someone was looking for a certain product within a certain area they could find it. Can someone tell me the appropriate attributes to add these two categories to my links table and what the HTML search code would look like. thanks any help much appreciated.
Quote Reply
Re: Adding Geographical Location In reply to
Well, you need to add a field to the LINKS table, and to the VALIDATE table if you want people to be able to enter the value.

You need to give it a "weight" if you want to be able to search on it.

You would need to set a flag for the search routine, so that if location was set, it would add a "and Location=<%location%>" to the search query.

It would just be a parameter/field added to your search box and form that would get passed to search.cgi. Search.cgi would then need to know what to do with it - ie: add the qualification to the search above.

For ideas on how to do this, look up the "letter" mod and search for "search.cgi" here and in the FAQ

It won't show up on the output unless you add the field to the "link.html" file.





------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/