Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Allow Auto update of Modified Resource?

Quote Reply
Allow Auto update of Modified Resource?
I've tried to search in the forum but have no luck.
Is there a way to actually Auto Update
users own Resource without having the need to verify the links?
Does anyone know how?

------------------
Be Dynamic nOt Static......

Quote Reply
Re: Allow Auto update of Modified Resource? In reply to
Look for Auto Validate. I just answered your duplicate question in the Modification Forum.

Wink

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.


Quote Reply
Re: Allow Auto update of Modified Resource? In reply to
The most I can find is this code.
Code:
open (VAL, ">>$db_valid_name") or &cgierr("error in add_record. unable to open validate file: $db_valid_name. Reason: $!");
flock(VAL, 2) unless (!$db_use_flock);
print VAL &join_encode(%in);
close VAL;
# automatically removes file lock

Change to New
Code:
# Print out the validate input to a "validation database" where it is stored until
# the admin decides to add it into the real database.
open (VAL, ">>$db_links_name") or &cgierr("error in add_record. unable to open validate file: $db_links_name. Reason: $!");
flock(VAL, 2) unless (!$db_use_flock);
print VAL &join_encode(%in);
close VAL;
# automatically removes file lock
# Print out the validate input to a "validation database" where it is stored until
# the admin decides to add it into the real database.
open (VAL, ">>$db_links_name") or &cgierr("error in add_record. unable to open validate file: $db_links_name. Reason: $!");
flock(VAL, 2) unless (!$db_use_flock);
print VAL &join_encode(%in);
close VAL;
# automatically removes file lock
How can I apply this code for the modify.cgi ??

thanks in advance... Smile


[This message has been edited by rynax (edited May 08, 2000).]
Quote Reply
Re: Allow Auto update of Modified Resource? In reply to
Change the following codes:

Code:
# Print out the modified record to a "modified database" where it is stored until
# the admin decides to add it into the real database.
open (MOD, ">>$db_modified_name") or &cgierr("error in modify.cgi. unable to open modification database: $db_modified_name. Reason: $!");
flock(MOD, $LOCK_EX) unless (!$db_use_flock);
print MOD &join_encode(%in);
close MOD; # automatically removes file lock

with the following codes:

Code:
# Print out the validate input to a "modification database" where it is stored until
# the admin decides to add it into the real database.

open (MOD, ">>$db_links_name") or &cgierr("error in modify_record. unable to open validate file: $db_links_name. Reason: $!");
flock(MOD, 2) unless (!$db_use_flock);
print MOD &join_encode(%in);
close MOD;

# automatically removes file lock
# Print out the MODidate input to a "MODidation database" where it is stored until
# the admin decides to add it into the real database.

open (MOD, ">>$db_links_name") or &cgierr("error in add_record. unable to open MODidate file: $db_links_name. Reason: $!");
flock(MOD, 2) unless (!$db_use_flock);
print MOD &join_encode(%in);
close MOD;

# automatically removes file lock

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.