Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

A list of fields to check when a visitor adds/modi

Quote Reply
A list of fields to check when a visitor adds/modi
I have a lot of new fields inside our links; some of them are for commenting a links tru us. Everytime someone modifies his entree, our comment, internal rating and value for position in listing and search is set to zero.

With links.pm we could set fields so that a user cant modify them; but i dont want a fix value there, instead i need the old value for taht fields. Is there a way to do that?
Robert

Quote Reply
Re: A list of fields to check when a visitor adds/modi In reply to
Seems it goes with

field=>0

cause this is the syntax for Hits and they will be stored right after a modify.
???!

Quote Reply
Re: A list of fields to check when a visitor adds/modi In reply to
I'm not exactly sure what you are asking.

But, I think the problem may be that you didn't add the same fields to the "Validate" table that you did to the Links table.

Give that a try.

Quote Reply
Re: A list of fields to check when a visitor adds/modi In reply to
No, no, everything its ok. We have a field named "comment".
With this field we comment every link inside our database after watching the site. Till now it was a problem, cause if somewhere modifies his entree the field was erased and we have to visit the site again. Now i have set in the links.pm to the list of fields that couldnt changed tru a modify our comments stay. All ok so far.
Robert

Quote Reply
Re: A list of fields to check when a visitor adds/modi In reply to
Hi Robert,

you can change modify.cgi to look for the comment field and add its value to the modified record.

regards, alexander

Quote Reply
Re: A list of fields to check when a visitor adds/modi In reply to
Yes, your are right; i could sent the comment field as an hidden value to the modify.html, but it is easier to set the the field in links.pm like:

# A list of fields to check when a visitor adds/modifies a record. When a
# visitor adds a record, these field/values will be forced into the new record.
# When a visitor modifies an existing record, they will not be able to change
# any of these values.
$LINKS{add_system_fields} = { isTop => 0, Top=>0, Comment =>0, Hits => 0, isNew => 'No', isPopular => 'No', isChanged => 'No', Status => 0, Rating => 0, Votes => 0, ReceiveMail => 'Yes' };