Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Allow Modification before Validation

Quote Reply
Allow Modification before Validation
Hi-

Would it be possible to modify Links SQL so that users can modify their links before they are validated? Our users have several additional custom fields for their links, and it is helpful if they can view how their listing will look (which I can easily set this up on the add_success.html page), and then immediately make any quick changes, rather than waiting for us to validate. Does anyone know which files would need to be changed to accomplish this? Would it just be the isValidated part on the modify files, or is this something more complex?

--FrankM
Quote Reply
Re: [FrankM] Allow Modification before Validation In reply to
I could find the following code in the modify.cgi (Links SQL 2.0.4)

Code

Code:
my $sth = $link_db->select ( { LinkOwner => $USER->{Username}, isValidated => 'Yes' });


When I changed that to:

Code:
my $sth = $link_db->select ( { LinkOwner => $USER->{Username}, isValidated => 'No' });
it seemed to let me modify the unvalidated link. But, I don't know how to take out the condition so that it doesn't distinguish whether the link is validated or not. I tried:

Code:
my $sth = $link_db->select ( { LinkOwner => $USER->{Username}});
and

Code:
my $sth = $link_db->select ( { LinkOwner => $USER->{Username});
but those kept giving Internal Server Errors. Does anyone see how it should be written? Any help would be greatly appreciated!

--Frank
Quote Reply
Re: [FrankM] Allow Modification before Validation In reply to
Your first solution should be fine.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [FrankM] Allow Modification before Validation In reply to
The Internal Server Error is because you missed a bracket.
Quote:
my $sth = $link_db->select ( { LinkOwner => $USER->{Username} } );
The red one.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Allow Modification before Validation In reply to
As I said, his first solution (which contains the bracket) should be fine.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Allow Modification before Validation In reply to
Just showed for him what was the error in the syntax.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Jan 26, 2003, 4:17 AM
Quote Reply
Re: [yogi] Allow Modification before Validation In reply to
Thanks very much for both of your help. I did try that first solution again, but it still gave me the Internal Server Error. I finally just made a field called "Active" and set the default value to "Yes", then I used this code:

Code:


my $sth = $link_db->select ( { LinkOwner => $USER->{Username}, Active => 'Yes' });


That isn't very efficient, but it works for now. Thanks again.

--Frank
Quote Reply
Re: [FrankM] Allow Modification before Validation In reply to
Before I got sidetracked by life, I had made modifications to my upload/attach system that would let a user modify their pending links. After all, why not?

The rules changed between subsequent versions of Links, but the basic idea is to find where the search is limited/restricted by "isValidated" and simply remove that.

You might find some ideas in the forum if you search on my username and "isvalidated" as the key word, but I'm not sure what exactly :)

As I bring my sites up to date, I hope to have loads of code like this to release, and highlite different display concepts. Inside Links is a lot of interesting stuff, but many of the features were hard coded in originally, and just left that way as "default" behavior. The Build_Ratings routine is one that can easily be updated to use some extra flags to modify the behavior. It's a good one to play with, since it's relatively harmless if you screw it up -- as it only affects that page.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.