Gossamer Forum
Home : Products : Links 2.0 : Customization :

Search Log Mod + 2 questions...

Quote Reply
Search Log Mod + 2 questions...
 
Hi!

I am new in Links, but I think that I have a good mod of Search Log.
Search Log write every searched keyword and some details in special file. But, we still dont know was he satisfied. So, I makeed a new txt file in data directory (named badwords.txt) and
if there is no Category and no Links founded, script write that keyword to badkeywords.
So, you can see what kind of links missing in your database, and add it.

Here is how to make it works:

In links.cfg after:
# PATH of keyword log file:
$kword_file_name ="$db_script_path/data/keywords.txt";

add:
# PATH of bad keywords log file:
$badkword_file_name ="$db_script_path/data/badkeywords.txt";

In sitehtml.pl, somewhere add:

sub logbad {
open (KEYWORDS, ">>$badkword_file_name") or &cgierr("error in search. cannot open badkeyword file");
print KEYWORDS $in{'query'};
print KEYWORDS "\|";
print KEYWORDS $ENV{'HTTP_HOST'};
print KEYWORDS "\|";
print KEYWORDS &get_date;
print KEYWORDS "\|";
print KEYWORDS &get_time;
print KEYWORDS "\n";
close (DB);
}

In the same file, in sub site_html_search_failure {
after (begining of the sub)after:
&html_print_headers;

add:

&logbad;


That is it!
Bad keywords you can view from Administrator area by adding a link in Nav.html, (like for Search Log)
I hope to say something interesting.

I have two question too.
1. If I use Search in Category, how can I show message like Search Results for Category XYZ:
Anybody know? I realy need this message...

2. Does anybody have any idea about how to import search resoults from WebFerret (search many search engines in the same time and gives META descriptions!!!)

And thanks for so good support. It is amazing :-))

Vladan Zirojevic
Quote Reply
Re: Search Log Mod + 2 questions... In reply to
"I have two question too.
1. If I use Search in Category, how can I show message like Search Results for Category XYZ:
Anybody know? I realy need this message..." Open your site_html.pl file go to the search form(where you want the keyword searched for to be placed) and put @search_terms this will so their keyword enrted.
Thanks
Joey Bost
jbost@sheltonbbs.com