home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 September / PCWorld_2000-09_cd.bin / Software / Vyzkuste / cofee / CoffeeHTML85.exe / %MAINDIR% / cgi-bin / animation / nph-anim.txt < prev   
Encoding:
Text File  |  2000-07-07  |  6.4 KB  |  151 lines

  1. This is the Readme.txt to help you.  The actual CGI script is the file named:
  2. 'nph-anim.pl'.
  3.  
  4. ##############################################################################
  5. # Animation                     Version 1.2                                  #
  6. # Copyright 1996 Matt Wright    mattw@worldwidemart.com                      #
  7. # Created 9/28/95               Last Modified 11/21/95                       #
  8. # Scripts Archive at:           http://www.scriptarchive.com                 #
  9. ##############################################################################
  10. # If you run into any problems while trying to configure this scripts, help
  11. # is available.  The steps you should take to get the fastest results, are:
  12. #    1) Read this file thoroughly
  13. #    2) Consult the Matt's Script Archive Frequently Asked Questions if you
  14. #    are having any problems:
  15. #        http://www.worldwidemart.com/scripts/faq/
  16. #
  17. # Hopefully we will be able to help you solve your problems.  Thank you.
  18. ##############################################################################
  19.  
  20.  
  21. This script allows you to implement animations in-lined into your HTML pages.  
  22. It uses the idea of server push, where images are pushed down by the server to 
  23. the client one after the other, which creates the look of an animation.  There 
  24. is not much to this script and it should not be hard to install onto your 
  25. system.  You will need to have Perl installed on your system and have access 
  26. to execute CGI scripts either through a cgi-bin or a .cgi extension.  Check 
  27. with your system administrator to see if they allows either of these.
  28.  
  29. There are two files included with this script:
  30.         1) README.TXT - This file; includes detailed installation instructions.
  31.         2) nph-anim.pl - The Perl script which generates the headers and 
  32.                           pushes your images to the client.
  33.  
  34. The only file that needs to be edited for this script to work is the 
  35. nph-anim.pl script.  Below is a set of instructions for setting it up 
  36. on your system.
  37.  
  38. NPH-ANIM.PL -
  39.  
  40.         There are three variables that must be set in this script for it to 
  41. work correctly:
  42.  
  43. $times = "1";
  44.  
  45.         This is the number of times you want the script to cycle through your 
  46. entire animation.  Most of the time this will be set to "1", but you may wish 
  47. for it to loop several times.
  48.  
  49. $basefile = "/path/to/images/";
  50.  
  51.         This is the base filename where all of your images are kept.  When the 
  52. script chooses the images, the filenames from @files are appended to this to 
  53. form a complete path to the image.  Realize that this path must be an absolute 
  54. path on the system and should not be relative to the WWW pages.
  55.  
  56. @files = ("begin.gif","second.gif","third.gif","last.gif");
  57.  
  58.         These are the filenames, put into an array separated by commas, that 
  59. will be appended to $basefile.  Put the images in the order that you want the 
  60. animation sequence to run, with the first image as the first element of the 
  61. array and the last image of the animation as your last element of the array.
  62.  
  63. $con_type = "gif";
  64.  
  65.     This should be set to the type of image you are planning on 
  66. sending to the browser.  Values can be one of the following:
  67.        VALUE           IMAGE EXTENSION
  68.     gif                      gif
  69.     jpeg                     jpeg jpg jpe
  70.     ief                      ief
  71.     tiff                     tiff tif
  72.     x-cmu-raster             ras
  73.     x-portable-anymap        pnm
  74.     x-portable-bitmap        pbm
  75.     x-portable-graymap       pgm
  76.     x-portable-pixmap        ppm
  77.     x-rgb                    rgb
  78.     x-xbitmap                xbm
  79.     x-xpixmap                xpm
  80.     x-xwindowdump            xwd
  81.  
  82. For instance, if you want to use a jpg image, you would put in 'jpeg' for 
  83. this variable.  Use the values on the right in this variable, and you can 
  84. identify the proper values by looking at the extension on your image and 
  85. then looking for it in the right column and trace it over to the value in 
  86. the left.  Keep in mind that not all of the values will display in all 
  87. browsers.
  88.  
  89. _____________________________________________________________
  90.  
  91. Calling your animation from your HTML file.
  92.  
  93. Calling this animation script is as easy as in-lining an image.  If your 
  94. animation script is located at the url:
  95.  
  96. http://your.host.xxx/cgi-bin/nph-anim.pl
  97.  
  98. Then you would call the animation simply by doing:
  99.  
  100. <img src="http://your.host.xxx/cgi-bin/nph-anim.pl">
  101.  
  102. Any other attribute to the image or animation can be added as normal, such as 
  103. align, border, alt, etc... so that it would look like:
  104.  
  105. <img src="http://your.host.xxx/cgi-bin/nph-anim.pl" align=left border=0 
  106.          alt="Animation!">
  107. ___________________________________________________________________________
  108.  
  109. FAQ:
  110.  
  111. Can I change the name of nph-anim.pl?  Why does it have nph- in front of it?
  112.  
  113. Good question.  If you change the name of the script from nph-anim.pl to 
  114. something without nph- on the front of it, you will need to comment out 
  115. the line:
  116.  
  117. print "HTTP/1.0 200 OK\n";
  118.  
  119. The nph- means non-parsed header file, which makes the server execute it 
  120. instead of parsing the script.
  121.  
  122. You may also want to try commenting out the line if the script is giving 
  123. you problems.
  124. _________________________________________________________________________
  125. HISTORY
  126.    Version 1.0    - 9/18/95    - First Version Released
  127.    Version 1.1  - 11/4/95    - Version 1.1 Released with a minor fix 
  128.                   explaining the nph- and header outputs.
  129.    Version 1.2  - 11/21/95    - A small fix, suggested by Robert Wood 
  130.                   <wood@nexen.com> helped improve the 
  131.                   buffering of the output of the images.
  132. _________________________________________________________________________
  133.  
  134. This script is provided as is and comes with no warranties, expressed or 
  135. implied.  It was written to be useful and fun, so by all means, enjoy it!  You 
  136. have permission to edit/modify/whatever this script and I ask only two things 
  137. in return:
  138.  
  139. 1) If you implement it on a page, please let me know the URL of where it is 
  140.    implemented so I can see my work
  141.  
  142. and
  143.  
  144. 2) Please keep my name and url in the script itself somewhere, and if you 
  145. would like you could even add it to your page, but that is not necessary.
  146.  
  147. If you have any questions, let me know and I will try and help!
  148. ____________________________________________________________________________
  149. Matt Wright - mattw@worldwidemart.com  http://www.worldwidemart.com/scripts/
  150.  
  151.