Gossamer Forum
Home : Products : Links 2.0 : Customization :

I think I've made a mess......

Quote Reply
I think I've made a mess......
Well not really, but I know now to label what mods I have added!! I seem to have replaced some with others without knowing it.... So a word of advice to anyone who plans on adding mods in the future, make sure to label them. Anyway, on to my question. I'm using the redirection code provided by Bmxer and I'm also using a mod for keywords. Well, I just noticed that after I added the redirection codes, I replaced this section:

# Word is too common, don't try and sort it, can cause problems.
if (($numhits > 50) and (($grand_total * 0.75) < $numhits)) {
return "Search term is too common.";
}
&log2;

with the proper redirection code. I just noticed that I also had &log2; to this above to check the keyword mod. My question is, where should I now put &log2;?

Thanks for any advice.
Quote Reply
Re: I think I've made a mess...... In reply to
Put the sub log2 at the bottom of the search.cgi script. It should be a copy of the main log routine, but with a different log file.

BTW: In addition to labeling Mods in scripts, it is wise to spend a few minutes after installing each Mod to write a history file of all changes.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: I think I've made a mess...... In reply to
Thanks Eliot...I'll give it a shot. I'm sorry, when you said the main log routine did you mean to put an exact copy of all of this?

# Word is too common, don't try and sort it, can cause problems.
if (($numhits > 50) and (($grand_total * 0.75) < $numhits)) {
return "Search term is too common.";
}
&log2;

Or just add &log2; to the bottom?

Thanks Again.
Quote Reply
Re: I think I've made a mess...... In reply to
The call to the sub-routine means that you have two log routines, right? Why would you have &log and &log2?

So, yes, you need to have a second log-routine called sub log2.

Does this answer your question?

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: I think I've made a mess...... In reply to
Oh, yeah I didn't even realize! Ok, I've got it....thank you. I just need to be hit in the head every once in a while. ;-)