Gossamer Forum
Home : Products : Links 2.0 : Customization :

100terms.cgi

Quote Reply
100terms.cgi
Hi all I have well I think a simple question.

In my 100terms.cgi I have to define the following:

$kword_file = "/usr/local/apache/virtualhosts/sport.kc.ru/data/l25/admin/data/keywords.txt";

The question I have, is that I want all my variables just to be in links.cfg, as I am considering a server move and editting just the one file suits me.

The orignal header of 100terms.cgi looks like this
Code:
#!/usr/bin/perl
#####################################
# 100 Terms Log Analyser for Links 2 version 1.01
# by Sergey Shestopalov
# shestopalov@mail.ru
# Updated: Jan 7, 2001
# URL: http://sport.lc.ru/Links
#####################################
# WARNING! Please if you use this script write me location of you
# site. Its needed me! Its best recommendation for my workgiver!
#
# Begin variables
# Path to log file of search.cgi

$kword_file = "/usr/local/apache/virtualhosts/sport.kc.ru/data/l25/admin/data/keywords.txt";

# Number query
$tlimit = 100;

I have tried a few things to link to links.cfg but not all worked, I tried this but with no joy,

Code:
# Required Librariers
# --------------------------------------------------------
eval {
($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX /
($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1"); # Get the script location: Windows \

require "admin/links.cfg";
};
if ($@) {
print "Content-type: text/plain\n\n";
print "Error including libraries: $@\n";
print "Make sure they exist, permissions are set properly, and paths are set correctly.";
exit;
}

and I placed

$kword_file = "/usr/local/apache/virtualhosts/sport.kc.ru/data/l25/admin/data/keywords.txt";

Into my links.cfg when I run 100terms.cgi it just prints my header and footer not the Kword txt file.

Is there an easy solution to this.

Stu2000