How can I automatically have the current system date as "date added" when validating instead of the date when they submitted? Even though I validate links daily, I often find links the next moring that were submitted overnight, showing yesterday's date - I keep adjusting the "date added" manually, but would appreciate some tips how I can automatically use the actual date the link was added as "date added" and not the one it was applied on. Any ideas? Haven't seen a mod for this yet...
Apr 21, 2000, 7:32 AM
Veteran (17240 posts)
Apr 21, 2000, 7:32 AM
Post #2 of 7
Views: 1864
One thing you can try is the following...
Add the following codes in the sub build_html_record routine in the db_utils.pl file:
AFTER the following codes:
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Add the following codes in the sub build_html_record routine in the db_utils.pl file:
Code:
$rec{'Date'} = &get_date;AFTER the following codes:
Code:
my ($output, $field);Regards,
------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Apr 21, 2000, 10:48 AM
User (64 posts)
Apr 21, 2000, 10:48 AM
Post #3 of 7
Views: 1868
Thanks! That wasn't quite it, but it got me into the right direction. I think I got it to work by adding that to admin_html.pl instead, in sub html_modify_form_record (for modifying) and sub html_record_form_mult (for validating). Thank you for the code line and getting me in the right direction .
Apr 21, 2000, 12:41 PM
Veteran (17240 posts)
Apr 21, 2000, 12:41 PM
Post #4 of 7
Views: 1875
Did you check your codes with the adding new links via the add.cgi file?
Just to make sure there are no bugs.
But, I am glad you figured it out.
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Just to make sure there are no bugs.
But, I am glad you figured it out.
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Apr 21, 2000, 12:58 PM
Veteran (17240 posts)
Apr 21, 2000, 12:58 PM
Post #6 of 7
Views: 1861
For the benefit of others...please post the EXACT codes you used.
I am glad you figured it out...however, it is a disservice to other LINKS users to NOT post the codes you used to make it work.
I know that others will appreciate this code hack. Please post the codes you used.
Thank you.
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
I am glad you figured it out...however, it is a disservice to other LINKS users to NOT post the codes you used to make it work.
I know that others will appreciate this code hack. Please post the codes you used.
Thank you.
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Apr 21, 2000, 1:14 PM
User (64 posts)
Apr 21, 2000, 1:14 PM
Post #7 of 7
Views: 1868
Sure, no problem - I used your line,
in admin_html.pl, in sub html_modify_form_record (for modifying) below
and in sub html_record_form_mult (for validating) below
That's all...
Code:
$rec{'Date'} = &get_date;Code:
if (!%rec) { &html_modify_failure("unable to find record/no record specified: $in{'modify'}"); return; }Code:
my (%rec) = @_;