Gossamer Forum
Home : Products : DBMan : Discussions :

Re: [LoisC] Search tracking

Quote Reply
Re: [LoisC] Search tracking In reply to
I really appreciate all the time and effort you are spending with me trying to get this working, but I must be missing something (besides my brain...)

here is the keyword.cgi code:



#!/usr/local/bin/perl5
#
# Sort Routine was written by Alex Krohn ( thanx a million )
# This script is little more than the sort routine. It
# Just takes the Keyword Mod and makes a nice pretty table out of it.
# Thought this would be useful if you wanted to show it to your users, or just make it easier to read.
#
# This script uses The Search Log mod found at
# http://www.monster-submit.com/mods01.html Its easy to install and counts each search.
#
# Send Feedback to crowe@darkspiral.com
#
############################################################

print "Content-Type: text/html\n\n";
# If greater than this number the script will highlight those entries.
$targetnumba = 5 ;

# Print out the HTML that Appears BEFORE the sorting.

print "<HTML><HEAD><TITLE>Keyword List Html Build</TITLE></HEAD>\n";
print "<insert body tag here><center>\n";

print "<br><br><a href=keyword.cgi>Build Keywords</a><br><br>\n";
print "<font size=1>Currently Highlighting words greater than</font> <font color=RED>$targetnumba</font> <font size=1>searches.</font> <br><br>\n";
print "<table width=600 border=1 cellpadding=0 cellspacing=0><tr><td>Keyword</td><td>Number of Searches</td></tr>\n";

# Open The DB, Sorts and Print out the Results.
# I run mine from the same dir as my Keywords.txt file, change it to your full path if you want people to have access to it.

open (DB, "keywords.txt") or die $!;
while (<DB> ) {
chomp;
($name, $score) = split /:/;
$scores{$name} = $score;
}
close DB;
foreach $word (sort { $scores{$b} <=> $scores{$a} } keys %scores) {
if ($scores{$word} > $targetnumba)
{
print "<TR align=left><TH><$font><em>$word</font></em></TH><TH><$font><em>$scores{$word}</em></font></TH></TR>\n";
}
else {
print "<tr><td><$font>$word</font></td><td><$font>$scores{$word}</font></td></tr>\n";
}
}
# Prints the End of the HTML
print "</table><br><br><font size="1">Search Log Table-izer by Crowe\@darkspiral.com</font></center></BODY></HTML>\n";

---
and here is the line of code in default.cfg:

$kword_file = $db_script_path . "/keywords.txt";


I created a file called keywords.txt and placed a copy in the same dir as dbman, and also to be safe I placed a copy one level up from the dbman folder - i have run a few searches and it does not appear anything is getting written to the file
Subject Author Views Date
Thread Search tracking lookerjdc 6995 Oct 17, 2002, 7:03 PM
Thread Re: [lookerjdc] Search tracking
LoisC 6843 Oct 17, 2002, 7:22 PM
Thread Re: [LoisC] Search tracking
lookerjdc 6871 Oct 17, 2002, 7:35 PM
Thread Re: [lookerjdc] Search tracking
LoisC 6844 Oct 17, 2002, 7:52 PM
Thread Re: [LoisC] Search tracking
lookerjdc 6871 Oct 17, 2002, 9:31 PM
Thread Re: [lookerjdc] Search tracking
LoisC 6827 Oct 18, 2002, 10:37 AM
Thread Re: [LoisC] Search tracking
lookerjdc 6822 Oct 18, 2002, 11:43 AM
Thread Re: [lookerjdc] Search tracking
LoisC 6823 Oct 18, 2002, 1:07 PM
Thread Re: [LoisC] Search tracking
lookerjdc 6849 Oct 18, 2002, 3:16 PM
Thread Re: [lookerjdc] Search tracking
LoisC 6826 Oct 18, 2002, 6:20 PM
Thread Re: [LoisC] Search tracking
lookerjdc 6818 Oct 18, 2002, 7:58 PM
Thread Re: [lookerjdc] Search tracking
LoisC 6823 Oct 19, 2002, 8:48 AM
Post Re: [LoisC] Search tracking
LoisC 6809 Oct 19, 2002, 9:16 AM