Gossamer Forum
Home : Products : Links 2.0 : Customization :

Expired Links.. (free)

Quote Reply
Expired Links.. (free)
 http://www.widgetz.com/..._mods/expired_links/

hopefully you guys will be able to install that..

jerry
Quote Reply
Re: Expired Links.. (free) In reply to
Very cool widgetz, is this the same one that cost $10 before?

------------------
LookHard Search
http://lookhard.hypermart.net
Lavon Russell
Quote Reply
Re: Expired Links.. (free) In reply to
$5..

i don't give support.. that's the difference Smile

i'm just getting rid of my Links 2 things..

jerry
Quote Reply
Re: Expired Links.. (free) In reply to
Very nice, Widgetz...It will definitely help those people who manage directories or portals with links that are active for a limited period of time (like classified ads).

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Expired Links.. (free) In reply to
Hi Widgetz,

How do I run this script from cron to automatically delete the expired links for set number of days?

Thanks for the script.
Quote Reply
Re: Expired Links.. (free) In reply to
socrates.. this version isn't the one that does that..

http://www.widgetz.com/...ph-expired(cron).txt

however.. this version is really skim.. it doesn't return anything.. well.. except for
Done! [Start date time / Finish date time]

cron usually emails that to you.. it doesn't email the users.. it's quite easy to mod.. i wish you guys would try..

i've never used this version myself.. but set it up with cron like how you set up any other cgi script..

jerry
Quote Reply
Re: Expired Links.. (free) In reply to
hi jerry,

i was just looking for an answer regarding links expirator.. great script.

now i wanna ask u something regarding ur hypermart echo banner addon in ur script:
is that ok if i erase it the part.. without screwing the script..?

thanks for ur time Wink
Quote Reply
Re: Expired Links.. (free) In reply to
err... yea Smile

if i feel like it.. i'm going to combine this script so you can run it in telnet..

jerry
Quote Reply
Re: Expired Links.. (free) In reply to
Jerry,

Thanks. That's good enough for now. I will see if I can mod it when I have some time or if it becomes necessary, to send email to users or may be someone can.

PS I sent you an email a couple of moths ago cause I wanted to buy this script but never heard from you. Guess it does not matter now, I got the script and I will still send you money :-)
Quote Reply
Re: Expired Links.. (free) In reply to
a couple months ago... i had a pile of like 500 emails unread.. i replied to like 5.. and deleted the rest .. Smile

------------------
Jerry Su
Quote Reply
Re: Expired Links.. (free) In reply to
Hi !!!

I installed this mod properly, but when I run it ... I only get this return ...


Links Manager: Expirator

Expirator
Pages checked on 11-Abr-2000 at 02:22:48
--------------------------------------------------------


No expired records found.


What's wrong ???

Please, any ideas ???

Marco Aurélio
Quote Reply
Re: Expired Links.. (free) In reply to
Marco,

Did you add the Expired date field in your existing database file?? And have you put a date in this field to test the script?

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Quote Reply
Re: Expired Links.. (free) In reply to
Yes, Eliot !!!

I added this line in my links.def :

Expiracao => [25, 'numer', 2, 2, 1, '30', '']

and this:

$db_expiration = 25;


I taken this mod in the Resource Center ...

Can you help me ???

Regards,

Marco Aurélio
Quote Reply
Re: Expired Links.. (free) In reply to
Uh...NO! That was not my question...Look again at my question....

Quote:
Did you add the Expired date field in your existing database file?? And have you put a
date in this field to test the script?

existing database file = links.db NOT links.def

Wink

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Quote Reply
Re: Expired Links.. (free) In reply to
Oh yeah !!!

This is one of the lines in my links.db :

1|Teste|http://www.teste.com|10-Abr-2000|Classificados| |teste|teste|teste|este|AL|Brasil|teste|marcoa@uol.com.br|0123456|teste|0|Yes|No|No|0 |0|Yes|No|http://www.uol.com.br/default.gif|1

I don't put a date in my last field ("1"), but I put a number of the days to expire ...


Ok ???

Quote Reply
Re: Expired Links.. (free) In reply to
Eliot,

Look this code in my nph-expirator.cgi :

code:
_____________________________________________

### LDN MODIFY START - Expire for no. of days old instead of by date
if ($rec[$db_expiration]) { # let's check if the link have an expiration field
if ($days > $rec[$db_expiration]){ # if this page is expired add the link to the expire.db
push(@hits, @rec);
push(@num_days, ($days));
$totalexp++;
}
}
### LDN MODIFY END

_____________________________________________


Is it ok ???

Help me
Quote Reply
Re: Expired Links.. (free) In reply to
The problem is that you record would be deleted a day after it was added. I would try the script again today and see if it works.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Quote Reply
Re: Expired Links.. (free) In reply to
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



Quote Reply
Re: Expired Links.. (free) In reply to
That is HOW the MOD works...if there are NO links that have expired, then you will get the following message:

Code:

no expired links


IF there are links that have Expired, then they will be listed in the result table.

no means no! Smile
yes means yes! Wink

Regards,

Eliot Lee
Quote Reply
Re: Expired Links.. (free) In reply to
But shouldn't the # of days count down? How do you know that the expiration date is coming up or how much time is left before it expires if the expire field never changes?

Thanks

Mike

Quote Reply
Re: Expired Links.. (free) In reply to
The only thing that should print out if there are no Links to delete is the following:

Code:
Expired Links
Date Time
It does not print out the # of days.....

Look at HTML codes and the if clauses in the sub main routine in the nph-expire.cgi file more carefully.

Regards,

Eliot Lee