lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV A form + 2 cgi scripts to set Lynx options


From: --- Alvian ---
Subject: LYNX-DEV A form + 2 cgi scripts to set Lynx options
Date: Thu, 02 Oct 97 15:00:35 +1000

Dear all,

I have written a form and 2 scripts for the setting Lynx options.
My aim is to provide an alternative interface to OPTIONS.  I am no
expert in C so I took the HTML + CGI path.  The bad news is I am no
expert in script writing either.

I have reach the limit of my programming abilities and there are still 
many inadequacies in my scripts.  Please help me out with codes &/or
algorithms.  Also the design of the form may not be to your liking.
Please send me your criticisms and suggestions.

This is the first time I have written any CGI scripts.  This is also
the first time I have programmed in perl.  So please bear with me my
inefficient coding, bad algorithms and bugs.  I have little to no idea
about perl.  Many routines in my scripts are "stolen" from others.

I will post the form & scripts in 3 separate emails.

Here are the things you need to know before using:

READ ME ---- MOST IMPORTANT
============================

1. You will need cgi-lib.pl.  Get it at http://www.bio.cam.ac.uk/cgi-lib/

2. By default, my script *should not* destroy your .lynxrc.  But make a
   backup just in case. 

3. You can specify a file name to save your output.  For a final version
   of the script we probably need to save to $HOME/.lynxrc.  But I cannot
   get my perl cgi scripts to read $HOME!!!  (I know, use $ENV{'HOME'} but
   it didn't work for me.  And I have get lynx.cfg to pass $HOME.  HELP!!)

4. You probably need to enable "execute links for local files" in OPTIONS.

5. Is the cgistart.html really needed?  I read somewhere that you can roll
   the start form into the cgi script.  But I don't know how to do it yet.

6. If you take a look at cgi1.pl you will see how I read the old options
   into a table.  For textareas I just put in the relevant default (old
   values).  For options I use a switch-block on the old values to set
   <option selected ...> as the new default.  This is probably very
   inefficient.  Anyone has a better algorithm for perl?

7. The combination of the huge option-list for display character set and (6),
   means a switch-bock for the character_set will make the script very huge.  
   So I have only written that part as a simple <select> block.  This means 
   the script will always reset character_set to ISO Latin 1, if you do not
   change that selection.  Sorry, I am too stupid to solve this problem.
   Somebody help?

8. I have not analysed issues relating to security.  I have only used the
   script under my own user-id.  I don't know anything about file locking,
   sharing and collision.  I don't think my script requires it but you
   never know.  I don't even know if another user can execute my scripts
   successfully.

9. To install, save all 3 emails (forthcoming) under the appropriate file
   names in the same directory.  Then "lynx cgistart.html" to start.  Don't
   forget to set the appropriate file permissions and cgi-execution
   permissions.

10. This software is copyright under the GPL licence, blah, blah, blah.
    Please freely distribute and modify, but don't claim my idea as your 
    own.
 
11. Can't think of anything more to say except that I have reach my limit
    of perl programming.  If you want the above deficiencies to be fixed,
    then please write-your-own or help-me :-)

  Alvian Tam.
    address@hidden | http://www.phys.unsw.edu.au/~atm/
                      ________  ________
                     / ____  / / ____  /
                    / /   / / / /   / /      Start.
                   / /   / / / /   / /
                  / /___/ / / /___/ /    Start waiting.
                 /_______/ /_______/
                ________  ________       Start paying.
               / ____  / / ____  /
              / /   / / / /   / /       Start spending.
             / /   / / / /   / /
            / /___/ / / /___/ /        Start Windoze 95.
           /_______/ /_______/

         Start wondering.... How will you be fooled today?
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]