home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-09-01 | 3.6 KB | 112 lines | [TEXT/ALFA] |
-
- Read Me for Quote 1.1
- =====================
-
-
- Quote is a CGI application for use with MacHTTP. It responds to the
- `sdoc' AppleEvent and returns a string containing a random quote read
- from a file.
-
- This program is written in Pocket Forth 6.3 for the Macintosh. See the
- file `quote.4th' for the source code. Thanks to Chris Heilman for help
- with the AppleEvent handling. And for making a neat little Forth
- available to everyone!
-
-
- How to use it
- =============
-
- Well, you need MacHTTP of course (or WebStar).
-
- In addition you need the application `Quote.cgi' (do not change the name,
- or keep the .cgi extension if you do). You also need a text file that
- contains the quotations. This file must be in the following format:
-
- 1. Each quotation must be on one line! You can put HTML commands in the
- quote, etc. but it must be on one line. Most text editors let you make a
- line as long as you like. The upper limit is some ~2000 characters.
-
- 2. The first line of the file contains the number of quotes in the file.
- It must be a 4 digit number with leading zeros if necessary. (This was
- to make it easy for me to write the code -- call me lazy)
-
- 3. The second line of the file contains the string to which the quote is
- appended. This string could be used to create a title or header for the
- page.
-
- 4. The third line of the file contains a string that is appended to the
- end of each quote. I use this string to jump back to my home page.
-
- Note that it is entirely feasible to put *any* HTML commands in place of
- the quotes so that you could have randomly chosen pictures displayed if
- you wished.
-
- NOTE!!!!! The program *must* be running before MacHTTP tries to call
- it. When first run the program presents a standard Mac open dialog and
- waits for you to chose the database file. It then is ready to be used.
- It will count the number of accesses since startup and has a small
- window, but it can be hidden as well.
-
-
- An example quote file
- =====================
-
- 0003
- <h2>The Quote...</h2><hr>
- <hr><a href="default.html"><i>Go back</i></a>
- <i>A stitch in time saves nine</i><br><b>-- Ben Franklin</b>
- <i>Fish and visitors smell in three days</i><br><b>-- Ben Franklin</b>
- <i>A penny saved is a penny earned</i><br><b>-- Ben Franklin(?)</b>
-
-
- This file has 3 quotes in it. A randomly chosen quote would be returned
- by the application as:
-
- <html><h2>The Quote...</h2><hr><i>A stitch in time saves
- nine</i><br><b>-- Ben Franklin</b><hr><a href="default.html"><i>Go
- back</i></a></html>
-
- The initial <html> and final </html> are added by the program.
-
-
- How to setup your web page
- ==========================
-
- The application is called by placing the following HTML code in your web
- page:
-
- <FORM method=POST action="Quote.cgi">
- <INPUT type=submit value="A random quotation">
- </FORM>
-
- Where "A random quotation" can be replaced with more meaningful text.
-
-
- Modifying the program
- =====================
-
- First get Pocket Forth 6.3 off the net. You will need a clean version of
- the Pocket Forth application. Rename it and drag the `quote.4th' file
- onto it. When loaded type save bye to save the program. Open ResEdit
- and copy all the resources from `quote.rsrc' into the application.
- Change the file type from p4th to quot
-
-
- Contact information
- ===================
-
- If you have questions or comments contact me at the address below. If
- you use the program I would appreciate you sending me the link so I can
- see how it is working and what people are doing with it.
-
- Ron Kneusel
- 8725 West Burdick Ave
- Milwaukee, WI 53227 USA
-
- email: rkneusel@post.its.mcw.edu
- http://www.intmed.mcw.edu/rtk/
-
- September 1995
-
- AMDG
-