Gossamer Forum
Home : Products : DBMan : Customization :

Upload graphic file and validation mods

Quote Reply
Upload graphic file and validation mods
Bonjour,

I'm using upload graphic file mod (the old one) and the validation mods.

When an user adds a new record and a graphic file, for the first time, his record has to be validated by the admin to be visible by people visiting my website (that's what I want).

But if the same user doesn't modify his record (category, description, etc) except the graphic file, his record remains validated.

Is there a way in this last case that the record validation field switches from 'Yes' to 'No'?

I hope my question in a very bad english makes sense!

Quote Reply
Re: Upload graphic file and validation mods In reply to
I believe it would work to use:

In your db.cgi file:

In sub modify_record {
# --------------------------------------------------------
# This routine does the actual modification of a record.

my ($status, $line, @lines, @data, $output, $found, $restricted);

### (!$per_admin) and ($in{'Validated'} = "No"); ### validation - use only to re-validate after records are modified ####

Uncomment the line above. I think this is taken directly out of the validation mod if I'm not mistaken.


Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Upload graphic file and validation mods In reply to
Hi,

In my db.cgi file, I do have the line:

(!$per_admin) and ($in{'Validated'} = "No"); ### validation - use only to re-validate after records are modified

The above line allows to re-validate a record in which a field (category, date, description, email, country etc...) has been changed.

If a user only adds or modifies his graphic file via the old upload graphic file mod (without changing anything else.. (I mean category, country, description, etc...) his record remains validated and in consequence visible by everyone.

In this last case, I would like (a member adding or modifying only his graphic file) that the validation field of his record turns from 'Yes' to 'No'.

Thanks for your help.




Quote Reply
Re: Upload graphic file and validation mods In reply to
You're talking about the original file upload mod? The one that has the upload field appear only after a record is added?

I don't think you can do it with that one. You should change to the newer file upload mod.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Upload graphic file and validation mods In reply to
Thanks to Loic and Carol.

Now I understand why I spent the whole week-end trying to find out the solution and I did not find it.