home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 September / PCWorld_2000-09_cd.bin / Software / Vyzkuste / cofee / CoffeeHTML85.exe / %MAINDIR% / cgi-bin / guestbook / guestbook.txt < prev    next >
Encoding:
Text File  |  2000-07-07  |  12.7 KB  |  225 lines

  1. This is the Readme.txt to help you.  The actual CGI script is the file named:
  2. 'guestbook.pl'.
  3.  
  4. ##############################################################################
  5. # Guestbook                     Version 2.3.1                                #
  6. # Copyright 1996 Matt Wright    mattw@worldwidemart.com                      #
  7. # Created 4/21/95               Last Modified 10/29/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. There are five files included in the Guestbook package.  Below is a brief 
  22. summary of them:
  23.         1) README.TXT - This file.
  24.         2) guestbook.pl - The Perl Script.
  25.         3) guestbook.html - The actual guestbook file.
  26.         4) addguest.html - The fill-out form for a guestbook entry.
  27.         5) guestlog.html - A short log of those who have added.
  28.  
  29. Below is a more detailed explanation of each file and what to do with it!
  30. ____________________
  31.  
  32. GUESTBOOK.PL - This is the Perl script that actually writes new entries to 
  33. files and returns the entry to the user.  This file will need to be placed
  34. in the cgi-bin of your server and chmoded to a+rx.  There are a few things 
  35. that need to be changed in this file:
  36.         # Set Variables
  37.         $guestbookurl - The url address of your guestbook.html file
  38.         $guestbookreal - The system location of your guestbook.html file
  39.         $guestlog - The system location of your guestlog.html file
  40.         $cgiurl - The url portion of the address to the guestbook.pl file
  41.      The file guestbook.pl needs to be placed in your server's cgi-bin and 
  42. chmoded read/execute for users of your httpd. (chmod a+rx)
  43.  
  44.     NEW IN 2.1:
  45.                 There are now several options that you have to decide whether
  46.     or not to use.  Below is a brief description of what each one does.  
  47.     While choosing what options you want to have on keep in mind that a '1' 
  48.     will turn them on and a '0' will turn them off.
  49.         Option 1:  $mail - This option will allow you to be notified via 
  50.            an E-Mail address when a new entry arrives in your guestbook.  
  51.            The entry will be mailed to you as a notification.  If you should 
  52.            choose to turn this variable on you will need to fill in the 2 
  53.            variables that go along with it:
  54.                 $recipient - Your E-Mail address, so that the mailing 
  55.                     program will know who to mail the entry to.
  56.                 $mailprog - The location of your sendmail program on your 
  57.                     host machine.
  58.         Option 2:  $uselog - This will allow you the ability to use my 
  59.            short log feature.  It is already turned on so you will have to 
  60.            change it to 0 if you do not wish to use it. I have implemented 
  61.            this feature, since there are probably many people who feel no need
  62.            to have a log when people are making entries to a file anyway.  
  63.            Keep in mind it will show errors which is one nice aspect about it.
  64.         Option 3:  $linkmail - Turning this option on will make the 
  65.            address links in your guestbook become hyperlinked.  So instead of
  66.            simply having (name@some.host) it will put 
  67.            (<a href="mailto:name@some.host">name@some.host</a>) so that anyone 
  68.            can simply click on the address to email them.
  69.         Option 4:  $separator - While looking at many other guestbooks 
  70.            I noticed that many people prefer to separate entries with 
  71.            a Horizontal Rule <hr> instead of a Paragraph Separator <p>, which 
  72.            I used in my old scripts.  I have now given you the option to 
  73.            choose.  By changing the 0 in the script to a 1 you will turn on 
  74.            the <hr> separator and turn off the <p> separator.  The 0 option 
  75.            will do the reverse of that; turn on <p> and turn off <hr>.
  76.         Option 5: $redirection - Although Netscape and other browsers handle 
  77.            the auto-redirection that I have implemented quite nicely, I have
  78.            noticed that it does not work with lynx (a text based browser). 
  79.            I have given you the option of using auto-redirection or not.  
  80.            Lynx can still add to your guestbook with it, they will just get an 
  81.            error message when they do.  This may not be true for all systems 
  82.            though.  It seemed that when we upgraded to httpd 1.4 this problem 
  83.            started occurring.  By choosing 1 you will enable auto redirection 
  84.            and 0 will return a page to the user telling them their entry has 
  85.            been received and click here to get back to the guestbook.
  86.  
  87.     NEW IN 2.2:
  88.                 There are a couple new options in version 2.2, which you will
  89.            need to configure, or leave as default.
  90.  
  91.         Option 6: $entry_order - When this script was first written, entries 
  92.            were always added next to the top, so you and other users did not
  93.            have to always see the same guestbook entry when they visited your
  94.            pages.  The rest of the enties scrolled beneath the newest, from
  95.            newest to oldest.  I have had requests that I make an option
  96.            available so that people can have a guestbook which would read
  97.            from oldest to newest.  This is how you would go about doing that.
  98.            Set this option to '0' and the newest entries will be added below
  99.            the rest of the entries.  Keep this option at '1' and the guestbook
  100.            will act like previous versions, adding the newest entry to the top.
  101.         Option 7: $remote_mail - Many users of the guestbook have requested 
  102.            that a form letter be automatically sent to the remote user when
  103.            they fill in the guestbook.  Turning this option on will tell the
  104.            script to automatically mail any user who leaves an email address.
  105.            You can specify the contents of the mail mesage by editing the
  106.            section of the script that sends mail to the remote user.  By 
  107.            default it sends a message that says, "Thank you for adding to my 
  108.            guestbook." and then shows them their entry.  If you should
  109.            choose to turn this variable on you will need to fill in the 2
  110.            variables that go along with it:
  111.                 $recipient - Your E-Mail address, so that the mailing
  112.                     program will know who to mail the entry to.
  113.                 $mailprog - The location of your sendmail program on your
  114.                     host machine.
  115.  
  116.         NEW IN 2.3!
  117.                 There is one new configurable option in version 2.3 of the 
  118.            guestbook.
  119.  
  120.         Option 8: $allow_html = "";
  121.            This option allows you to turn on or off the use of HTML tags by 
  122.            users of your guestbook.  Setting this variable to '1' allows 
  123.            users to imbed html tags such as <b> or <H1> or <a href=""></a> 
  124.            into your html document.  Setting this variable to '0' will not 
  125.            allow them to use any html syntax in their comments or any other 
  126.            field.  You can still link to their email address by turning 
  127.            $link_mail to '1'.
  128.  
  129.         Also new in version 2.3 is the ability for users to add their own url 
  130.         and then their name is referenced to their URL in the guestbook.html 
  131.         file.  This helps to eliminate the need for allow_html to be turned 
  132.         on, and lets users point you to a spot that will tell you more about 
  133.         them. Several users of the guestbook script have asked for this 
  134.         option.  If you wish to disable the option, simply delete the 
  135.         following line from your addguest.html file:
  136.        
  137.                 URL: <input type=text name=url size=50><br>
  138.  
  139.  
  140.     NEW IN 2.3.1!
  141.  
  142.     Option 9: $line_breaks - This option allows you to decide whether 
  143.        or not you want line breaks in the comment field to be turned into 
  144.        <br>'s in the html thing to retain the look of the guestbook entry.  
  145.        Common setting would be off, because sometimes people accidentally 
  146.        put in extra line breaks.
  147.  
  148. ____________________
  149.  
  150.  
  151. GUESTBOOK.HTML - This is the file that you will link to that will contain the 
  152. Guestbook Entries.  You will need to have this set at write/read permission 
  153. for the users (chmod a+rw).  You will probably need to edit the url for the 
  154. link to the addguest.html file and edit the url at the end of this page to 
  155. point back to your home page.  You will also want to edit the title and 
  156. heading spaces.  Do not delete the line <!--begin--> from this 
  157. guestbook, or else the script will have no way of knowing where to begin the 
  158. editing.  The <!--begin--> line is the only necessary line in your 
  159. guestbook.html file, but the link to the addguest.html file is also a good 
  160. idea.  :)
  161. ____________________
  162.  
  163. ADDGUEST.HTML - This is a fill-out form to add a new entry into the 
  164. guestbook.  You will need to edit parts of it to correct urls and 
  165. names of things, but leave the basic field names in place in the form.  You 
  166. will also need to change the action of the form to point to the guestbook.pl 
  167. file you placed in your cgi-bin.  The action of the form should be the same 
  168. as the $cgiurl variable you configured in your guestbook.pl file.
  169. ____________________
  170.  
  171. GUESTLOG.HTML - This is a short log that lists domains and times that entries 
  172. were created.  Much easier to browse and it will point out those failed entries 
  173. when users did not specify a name or comments.  This file will also need 
  174. read/write permission given to it.  To avoid long scripting (call me lazy if 
  175. you want :-) ) I left the log file so that newest entries are added at the 
  176. bottom.  This should be apparent though since the entries all come with a 
  177. short date added.  You can get around using this by changing the option 
  178. $uselog in the guestbook.pl file.
  179. ____________________
  180.  
  181. Bug Fixes in Version 2.1:
  182.         1) I changed the guestbook script so that the subroutines now work.
  183.            I guess I really messed up in Version 2.0, since I didn't test it
  184.            well, so I tried to be extra careful this time.
  185.         2) In the subroutines I added a complete new form so that people 
  186.            who forget to put their name in can simply fill it in, while the 
  187.            script retains the rest of the information and it will them be 
  188.            added.  This means that they don't have to first return to the 
  189.            guestbook add form to fill out the entry all over again.
  190.  
  191. Bug Fixes in Version 2.2:
  192.         1) I seemed to have a huge parenthesis problem in version 2.1. I 
  193.            messed up twice in the mail option and also in the guestbook
  194.            printing, when the ')' was put inside the <a href> mailto tag, 
  195.            instead of outside like the first one.  The mail option was
  196.            missing two parenthesis which caused it not to work on many 
  197.            machines.  These have both been fixed.
  198.         2) <>'s were used instead of () in the guestbook email addresses.
  199.  
  200. Bud fixes in Version 2.3:
  201.         1) Fixed Server Side Includes Security whole in script.
  202.  
  203. -------------------------------------------------------------------------------
  204.  
  205. Distribute this freely, but please leave my name and address somewhere in it.  
  206. Not necessarily in the Guestbook, but somewhere in the script.  I cannot 
  207. guarantee the safety or integrity of this package, I only did my best.  It is 
  208. being used many places and people seem to like it.
  209.  
  210. I would love to see improvements on this and if you happen to have an idea or 
  211. make the changes, please let me know or send me a copy.  If you have any 
  212. comments or suggestions you can reach me at the email address at the top of 
  213. this document.  I would appreciate any feedback or info you have for me.  
  214. Thanks.
  215.  
  216. One thing that I do ask is that you let me know the url of where this is being 
  217. used.  I won't be mad if I don't, but it is nice to see my work on the WWW.  
  218. Also by letting me know this and your email address I guess this is all I need 
  219. to know to consider you registered and then I will be able to let you know of 
  220. updates to the scripts, etc...
  221.  
  222. ______________________________________________________________________________
  223. Matt Wright - mattw@worldwidemart.com - http://www.worldwidemart.com/scripts/
  224.  
  225.