Gossamer Forum
Quote Reply
keywords
Is there a possibility to add keywords to urls in the database which the searchengine will search through, but not display like it does with the description?
Quote Reply
Re: keywords In reply to
yeah, easy, i have this. Just add a field called keywords, put it in the add form, have them fill it out. From what i can see, if you specify it in links.def to let them search it, it really works great. It doesn't even matter if they put commas or not, because alot of people would or wouldn't.

------------------
-----------------
Lavon Russell
LookHard! Search
www.lh.yi.org
webmaster@lh.yi.org


Quote Reply
Re: keywords In reply to
Ok, here we go....

1.download links.def from your cgi-bin and make a copy as backup, just for the case Wink

2.Open it and directly below the header you'll find:
Code:
# Database Definition: LINKS
# --------------------------------------------------------
# Definition of your database file.
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 1, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],

...and so on! That's a list of fields that will show up in the database... I'm sure some of them sound quite familiar to you after editing your templates?!
Go to the end of this listing and just add your new field "Keyword", and replace the "16" with the next available number.

Code:
Keywords => [16, 'alpha', '40x2', 200, 0, '', '']

3.Then save and upload it to cgi-bin, next start your browser and go to admin.cgi ! Just click some of the links-related links (sounds stupid Smile) and there you'll se the new field.

4.If you do also want to enable your linkowners to add keywords (sure you will), you have to add a field to add.html and modifiy.html forms.

Tell me if it works, otherwise I will go more in detail.

If you need more info on additional fields, just check the following:

Here I received alot of help...
www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/002723.html

and also don't miss "How do I add fields" inthe ressources section:
www.gossamer-threads.com/scripts/resources/Detailed/162.html

Good luck....

Kodak




[This message has been edited by Kodak (edited August 22, 1999).]
Quote Reply
Re: keywords In reply to
Hey Bmxer,

is it really that easy? I tried to implement the three Sevastoloph Mods, also nown as "The Russian Mods" here in the forum, but I failed Frown

If you could tell us, how to update search.cgi - that'll be grat!

Thanx in advance

Kodak
Quote Reply
Re: keywords In reply to
you don't need to update search.cgi, just make the new field, have people fill it in with keywords either like this keyword, keyword, or keyword keyword and it should work, but also change links.def so that the field names you allow people to search part reads something like this
Code:
# Field names you want to allow visitors to search on:
@search_fields = (1,2,5,14);
14 or whatever you would have it as would be keywords, so then whatever word they search, if that word is in the database in that delimeter, it will work. Thats all.

------------------
-----------------
Lavon Russell
LookHard! Search
www.lh.yi.org
webmaster@lh.yi.org


Quote Reply
Re: keywords In reply to
Just one question.

Will this slow a searching in database with lot's of links (over 1,000) a lot ?

Tnx.

------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~
UnReal 'Net - The Ultimate Portal Site
http://www.unreal-net.com
~~~~~~~~~~~~~~~~~~~~~~~~~~
Quote Reply
Re: keywords In reply to
Bmxer,

you're right, that sounds to be logic. Will try it out right now...

Thanx for your help

Kodak
Quote Reply
Re: keywords In reply to
Mrtvac,
It possibly could if you had many records +1000, and also maybe a bunch of keywords for each, but you should set it so they can only add so many. So set it for maybe 20 - 120 characters

------------------
-----------------
Lavon Russell
LookHard! Search
www.lh.yi.org
webmaster@lh.yi.org


Quote Reply
Re: keywords In reply to
Bmxer,

it works like a charme....! Thanks alot!
Hope it won't slow down the search too much, when my database will be stuffed as I planed it.

Kodak
Quote Reply
Re: keywords In reply to
could you explain exactly how you did it? I am a new to Links....
It will not show up in the search result these keywords?

Million thanks, KL
Quote Reply
Re: keywords In reply to
The keywords won't show up but when someone types on of the keywords, that link will be brought up. So it brings more of a chance of the url coming up. Search for two different words before you do this, and you will get no matching records, but if you do this , and you put those two words as keywords, even in simple search it will bring the link back. Kodak can explain it to you since he just did it.

------------------
-----------------
Lavon Russell
LookHard! Search
www.lh.yi.org
webmaster@lh.yi.org


Quote Reply
Re: keywords In reply to
First of all kodak, thanks you very much for taking some time.

Well, I added the field saw it in the admin.cgi, added a keyword to a link, klicked "build all" Went to my search engine and searched for the keyword with no result...

Any clues?
Quote Reply
Re: keywords In reply to
Ok, just to let you know, when you deal with cgi's, add.cgi - search.cgi. etc... you don't have to build. I wouldn't build until i was sure it works, but you can still find the updated stuff the search. 1- are you sure you typed in the right word? 2- Kodak didn't say this but did you change the the part in links.def that says which fields to let people search on. If not, add the number for keywords.

------------------
-----------------
Lavon Russell
LookHard! Search
www.lh.yi.org
webmaster@lh.yi.org


Quote Reply
Re: keywords In reply to
Uuaaaaaaaaaghhhhh !!!

Shame on you, Kodak! How could you forget...?! Frown

Well, lindm, I feel very sorry that I forgot to tell you to add a very elementary thing. Frown

OK, so there's an addition to No.2 of the above description:

in links.def search where it reads

Quote:
# Field names you want to allow visitors to search on:
@search_fields = (1,2,5);

and change it to read

Quote:
# Field names you want to allow visitors to search on:
@search_fields = (1,2,5,16);

If you used another field name for "Keyword" than 16, set your number.

Ah, and by the way, make sure that in %db_def the line with the last field (here the line for "keyword") doesn't end with an ","!

Hope you get it running now... and sorry again! Smile

Kodak


[This message has been edited by Kodak (edited August 22, 1999).]
Quote Reply
Re: keywords In reply to
That did the trick. You cgi experts are great!

/KL
Quote Reply
Re: keywords In reply to
Hey lindm,

just thought a little bit of the Keyword stuff, and what you've been asking for...

Well, if you want the keywords to show up in the results page, it shouldn't be a prop if you modify links.html.

You know, just add one of those if tags that you also use for calling the links description... You may copy one of those if-endifs within your links.html and replace for example <%Description%> with <%Keyword%>. I think that should work...

I don't know now how to get the search term highlighted within the keyword-listing, but maybe there's someone out there willing to help?

Is this actually what you've been looking for?

Kodak
Quote Reply
Re: keywords In reply to
Hi kodak.

Well, I was looking for a way for me to add invisible words attached to certain urls which users can search for, but won't show up in the search results.

I have gotten everything I was hoping for.

Thanks again
Quote Reply
Re: keywords In reply to
Lindm,
did i answer that question for you before, because i thought i told someone that sometime. I told someone how to make keywords go straight to urls if they are searched like if someone searches Yahoo, take them straight to Yahoo.com

------------------
-----------------
Lavon Russell
LookHard! Search
www.lh.yi.org
webmaster@lh.yi.org




[This message has been edited by Bmxer (edited August 23, 1999).]