Hi All,
I added this mod and seem to have a problem. I added a link last week and set the expire to 365 (for 1 year), now shouldn't the days be counting down? I'm running the nph-expired.cgi and it says that there are no expired links (of course, a year hasn't gone by) but nothing else changes. Here's the section from my links.def:
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 0, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
AltCategories => [5, 'alpha', 0, 500, 0, '', ''],
Description => [6, 'alpha', '40x3', 500, 0, '', ''],
'Contact Name' => [7, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [8, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [9, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [10, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [11, 'alpha', 0, 5, 0, 'No', ''],
Rating => [12, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [13, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [14, 'alpha', 10, 10, 1, 'Yes', 'No|Yes'],
Expire => [15, 'numer', 5, 8, 0, '', ''],
Graphic => [16, 'alpha', 40, 75, 0, '', ''],
Gwidth => [17, 'alpha', 5, 5, 0, '', ''],
Gheight => [18, 'alpha', 5, 5, 0, '', ''],
Priority => [19, 'alpha', 0, 5, 1, 'No', 'No|Yes'],
isLinked => [20, 'alpha', 0, 5, 0, 'No', 'No|Yes'],
DateAdded => [21, 'date', 15, 15, 1, \&get_date, ''],
Password => [22, 'alpha', 10, 10, 1, '', '']
);
# 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.
# Added #15 For Expire Mod
# Added #16-#19 For Priority and Logo Mod
# Added #20 For Turn Link On/Off Mod
# Added #21 For 3 New and Updated Mod
# Added #22 For Password Mod
# Added #5 For Multi-Category Mod
$db_category = 4; $db_modified = 3; $db_url = 2;
$db_hits = 9; $db_isnew = 10; $db_ispop = 11;
$db_contact_name = 7; $db_contact_email = 8; $db_title = 1;
$db_votes = 13; $db_rating = 12; $db_mail = 14;
$db_expire = 15; $db_priority = 19; $db_islinked = 20;
$db_dateadded = 21; $db_password = 22; $db_alt = 5;
and the nph-expired.cgi I got from widgetz's site. Any ideas?
Thanks!
Mike