home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / imagemap.zip / GoFilter.Add next >
Encoding:
Text File  |  1994-07-22  |  2.0 KB  |  63 lines

  1. /*  This file contains the necessary REXX code to be added to your GoServe's      */
  2. /*  GoFilter.## file, in order to allow the REXX ImageMap handler to be used.    */
  3.  
  4. /*    It assumes you are already using a derivative of the "GoFilter.80" crafted  */
  5. /*    to allow HTTP/0.9 services, distributed via the IBM Almaden Gopher Server.  */
  6.  
  7.  
  8. /* 1) First, add the following line somewhere in the file's variable initialization area,   */
  9. /*     Usually near the top of the file:            */
  10.  
  11. drive='F:'            /* Data drive */
  12. TempPath = '/public'        /* path for temp files, must have Read/Write/Create/Delete access */
  13.  
  14.  
  15. /* 2a) Locate the line in the GoFilter.## file that resembles the following line:      */
  16.  
  17. Parse Upper Value translate(selector,'/','\') With leftpart '/' .
  18.  
  19.  
  20. /* 2b) Change this line to read:                    */
  21.  
  22. Parse Upper Value translate(selector,'/','\') With leftpart '/' rightpart .
  23.  
  24. /*     Note the addition at the end...  */
  25.  
  26.  
  27. /* 3a) Immediately below this line in the file, you should see a compound 'SELECT'  */
  28. /*    statement.
  29.  
  30. Select
  31.    When ...
  32.    When ...
  33.    Otherwise ...
  34. End
  35.  
  36.  
  37. /* 3b) The following code excerpt should be inserted into the 'SELECT' statement    */
  38. /*     in the GoFilter.## file your server is using.      */
  39. /*       (Preferably, immediately following 'SELECT'... )    */
  40.  
  41.   When leftpart = 'WWW' then 
  42.     do 1
  43.       dir = drive||TempPath    /*  Sets drive & path for temporary files returned by ImageMap.##.  */
  44.       parse var rightpart ID '/' remainder
  45.       Select
  46.         When (ID = 'IMAGEMAP') then
  47.           do 
  48.             outfile = dir'/'transaction || '.script'
  49.             Parse var remainder fn '?' Parms
  50.             Parse var fn ScriptName '$' PathParms
  51.             Call ImageMap outfile, Parms, ScriptName, PathParms
  52.             return 'FILE ERASE NAME' outfile
  53.           end
  54.         Otherwise        /* The required "Otherwise" statement... */
  55.             /* Should fall through as a document for GoServe to retrieve. */
  56.           do
  57.           end
  58.       End  /* Select */
  59.     end
  60.  
  61.  
  62.  
  63.