Gossamer Forum
Home : Products : Links 2.0 : Customization :

How to make "is this what you want" page before submitting Resource Detail

Quote Reply
How to make "is this what you want" page before submitting Resource Detail
Anyone have any idea on how to make add.cgi show the submission for verification (first) so the submitter can go back and make changes or click submit to release the resource to the validate.db. (I am using the Resource templates and Mods)

Basically I want the writer to see their submitted article in a WYSIWYG format before the final submit takes place. So they can do a back to make changes and try again.
Thanks
Tim Ryan


[This message has been edited by timryan (edited July 25, 1999).]
Quote Reply
Re: How to make "is this what you want" page before submitting Resource Detail In reply to
Check out the Add Confirmation mod in the Resource Center:

http://www.gossamer-threads.com/...es/Detailed/173.html
Quote Reply
Re: How to make "is this what you want" page before submitting Resource Detail In reply to
Thanks for that speedy reply. Sure looks like what I am looking for. Smile
Quote Reply
Re: How to make "is this what you want" page before submitting Resource Detail In reply to
You guys got to go and plow through the Resource Center. Smile There are a lot of hidden treasures there.
Quote Reply
Re: How to make "is this what you want" page before submitting Resource Detail In reply to
That above idea at:http://www.gossamer-threads.com/scripts/resources/Detailed/173.html
may be ok for some but I really want a "what they see is what they get". The latter idea passes hidden fields soooo... nuff said there.
What I need is a way to make my submitters Detail page actually look like what it will after Links2 builds it (I mean close).

Now, I know that on the surface is impossible because one must do a build to see that results. But, I am sure there must be a way to take all the changes the build makes into account (like the fact that db_utils.pl and site_html_templates.pl changes the \n and \r to `` and I added a routine in (I think site_html_templates.pl) that changes the \n to <br> if it is not a web page). Taking this all into account, any ideas to make it a bit more like a "what you see is really what you get". Maybe a way to pass all this add.cgi stuff through some of the original subroutines in db_utils.pl and site_html_templates.pl. Or something like that. Then display the page.

Do not get me wrong.. the latter thread is good and close of coures... but I will go back and see what I can come up with and keep checking this thread incase someone has any added ideas (for this slow starter of a brain). Smile

OK.. UPdate here:I just notice that add.cgi already calls the 2 important libraries (db_utils.pl and site_html_templates.pl) That I would guess would be enough to pass the latter data through (hidden fields etc.) so. Question is whizkids... how to go about this. Smile I think this would be an important addition to this mod for everyone as I have seen quite a few threads on not getting a true WYSIWYG!
Thanks
TimRyan



[This message has been edited by timryan (edited July 25, 1999).]
Quote Reply
Re: How to make "is this what you want" page before submitting Resource Detail In reply to
Update! So far I have come up with this code mod to simulate a WYSIWYG but, I would rather know how to pipe through the same stream of code that add.cgi really does to write to record to validate.db (it puts the `` inplace of \n, etc.) and the stream of nph-build.cgi does (in db_utils.pl to change it back to \n or what ever). This would be more of a cleaner way of doing this so that one does not have to maintain different areas of the code.
________________ code is:
sub site_html_add_confirm {
# -------------ADDED THIS ROUTINE 7/99 FOR SUCCESS-------------------------------------------
# This routine determines how the add success page will look like.

&html_print_headers;
#Start of -Try this to make deail wsiwsg
#site_html_detailed
if ($in{'Details'} !~ /<([p|P]|(br|BR))>/)
{
#$in{'Details'} =~ s/\r\r/<p>/g;
#$in{'Details'} =~ s/\r\n/<p>/g;
$in{'Details'} =~ s/\n/<br>/g;
}
##END of -Try this to make deail wsiwsg
print &load_template ('add_confirm.html', {
# print &load_template ('detailed.html', {
%in,
%globals
});

}
The # are just where I was debuging.

To have better control over submits is important because I have found some characters used in html will mess up the links.db and validate.db to a point that will cause a corrupted file(s). Thereby messing up ID's , etc. in the begining of the records (to name a few).

I like the idea here... the WYSIWYG (what you see is what you get) add-confirm step/mod is great to help keep things straight.

Thanks t_dog for putting me on this track. ( http://www.gossamer-threads.com/scripts/resources/Detailed/173.html ). It is not totally what I need but it is a great (95%) start on the right direction on what we need. Smile

TimRyan


[This message has been edited by timryan (edited July 30, 1999).]
Quote Reply
Re: How to make "is this what you want" page before submitting Resource Detail In reply to
hi tim,
just have a look at the following script,
this i guess could be integrated for your
project. http://www.perlguy.com/perl/pgen.htm
love
klaus

------------------
###################
The S-mart Links Project
integrate full Shopping
Functionality into Links
http://smartlinks.i-go.to/
##################