Uh....actually no one did answer that question. If you read the whole forum the question was never answered. Partly due to my fault because I have not posted my variables yet.....the solutions that were given referenced the links.def file and the site_template.html.pl file. The rating system did work, and I didn't change either of those files, the only thing that was changed was the rate.html template and I already posted that....so I really don't think posting those files would have made a difference. But, maybe I did miss something, here are the files:
This is the relevant part of links.def
# 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,''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],
'Contact Name' => [6, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [8, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [9, 'alpha', 0, 5, 0, 'Yes', ''],
isPopular => [10, 'alpha', 0, 5, 0, 'No', ''],
Rating => [11, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [12, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [13, 'alpha', 10, 10, 1, 'Yes', 'No|Yes'],
Graphic => [14, 'alpha', 40, 75, 0, '', ''],
Gwidth => [15, 'alpha', 5, 5, 0, '', ''],
Gheight => [16, 'alpha', 5, 5, 0, '', ''],
Priority => [17, 'alpha', 0, 5, 1, 'No', 'No|Yes'],
Key => [18, 'alpha', 40, 500, 1, '', ''],
isBest => [19, 'alpha', 0, 5, 0, 'No', '']
);
# Database file to use -- defined in links.cfg.
$db_file_name = $db_links_name;
# Counter file to use -- defined in links.cfg.
$db_id_file_name = $db_links_id_file_name;
# The column name for the database key.
$db_key = 'ID';
# Database delimeter.
$db_delim = '|';
# Title used in admin output.
$html_title = 'Links Database';
$html_object = 'Link';
# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.
$db_alt = 5; $db_priority = 17; $db_url = 2;
$db_category = 4; $db_modified = 3; $db_isbest = 19;
$db_hits = 8; $db_isnew = 9; $db_ispop = 10;
$db_contact_name = 6; $db_contact_email = 7; $db_title = 1;
$db_votes = 12; $db_rating = 11; $db_mail = 13;
# Field number to sort links by:
$db_sort_links = 1;
This is the relevant part of site_html_temp:
# You can put variables here that you would like to use in any
# of your templates.
%globals = (
date => &get_date,
time => &get_time,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title,
css => $build_css_url,
banner => ''
);
-------------------------------------
sub site_html_ratings {
# --------------------------------------------------------
# This routine determines how the top rated page will look like.
return &load_template ( 'rate_top.html', {
top_rated => $top_rated,
top_votes => $top_votes,
%globals
});
-------------------------------------
sub site_html_rate_form {
# --------------------------------------------------------
# This routine determines how the rate form page will look like.
#
my %rec = @_;
&html_print_headers;
print &load_template ('rate.html', {
%rec,
%globals
});
}
sub site_html_rate_success {
# --------------------------------------------------------
# This routine determines how the rate success page will look like.
&html_print_headers;
print &load_template ('rate_success.html', {
%in,
%globals
});
}
sub site_html_rate_failure {
# --------------------------------------------------------
# This routine determines how the rate failure page will look like.
my ($errormsg) = shift;
&html_print_headers;
print &load_template ('rate_error.html', {
error => $errormsg,
%in,
%globals
});
I obviosly only posted the relevant sections that I could find, maybe I'm missing something??
Thanks to all!