|
Putting A Guestbook On My Page.
Follow the steps below and you will have your own guestbook on your site.
Please note.. Two programs are required for this job, EditPad (or another ASCII text editor) and WS-FTP .
- First you'll need to create a file for the "header" of the guestbook. This file will have all the text and html tags you want at the beginning of your guestbook page. Take a look at this gb-hd.htm as an example. Using EditPad (or another ASCII text editor) create a header file, call it gb-hd.htm. You can add any extra HTML tags you would like in your own guestbook header.
<html>
<head>
<title>Sprocket's Guest Book</title>
</head>
<body bgcolor="#FFFFFF">
<h2>My Guestbook</h2>
Please leave your comments in the form below.
- Repeat this step for the "middle" file. This is the text/HTML you want your guestbook to show after the guestbook submission form but before the entry listing in your guestbook page. Call it "guestbook-middle.htm".
<p>
<table border = 0 cellpadding = 1 cellspacing = 1 >
<tr><td><center><h2>My Visitors</h2><br>
</center>
</td></tr></table>
- Now the footer file using the same method as above. Call it "guestbook-footer.htm".
<hr2> Thank You Please come again</h2>
<a href = "http://www.storm.ca" > Back to main page
</a>
</body>
</html>
Now comes the interesting part. You must create a configuration file, call it guestbook-conf.txt". This file will contain exactly 15 lines, with each line containing the value for one configuration item. Here's an example you should look at. Using EditPad (or another ASCII text editor) edit the file guestbook-conf following the instruction below.
/home/yourloginid/public_html/guestbook
/home/yourloginids/public_html/guestbook.header.htm
/home/yourloginid/public_html/guestbook.middle.htm
/home/yourloginid/public_html/guestbook.footer.htm
Your email address please:
Your comments please:
Preview your entry!
</td></tr><tr><td>Here's your preview.
Change it.
Submit your entry.
</td></tr><tr><td>You've
No
Images are not permitted in this guestbook. Please try again.
yes
50
Here's a list of what they are:
- The first line should be the location of the file that will be used for storing entries. That's the "guestbook" file. Bear in mind that you must specify the location of the file within the UNIX file system, not the World Wide Web URL. eg /home/yourloginid/public_html/guestbook.
- The second line is the location of the "header" file you created. Remember, UNIX file system, not URL.
- The third line is the location of the "middle" file for your guestbook configuration.
- The fourth line is the location of the "footer" file to use.
- Okay, enough file locations. The fifth line is the text to use as a prompt for the email address of the person submitting an entry to your guestbook.
- The sixth line is the prompt for the message itself.
- The seventh line is the text you want to show up on the button that will produce a preview of the entry. Usually "Preview" or "Show Preview" is most appropriate for this line.
- The eighth line is for the message you want to use to indicate that the entry is being previewed. It will show up on the page right below the preview itself.
- The ninth line is for the message you want to be displayed on the button that clears out the whole form.
- The tenth line is for the text you want to show up on the button that will submit the entry to the guestbook.
- The eleventh line is for the message you want to show up when a user has attempted to submit the same message twice. This usually happens when someone is using your guestbook and they hit "Reload" then answer "Yes" to "Repost form Data?". This guestbook script will not allow the same message to be posted twice.
- The twelvth line is a flag for whether you want to eliminate images being posted to your guestbook or not. Put "no" if you like huge images bogging down guestbook access. Put "yes" if you want to stymie the dorks who like to post huge GIFs in every guestbook they come across.
- The thirteenth line is for the message you want displayed when a dork has been stymied. To be fair, sometimes a ***small*** image is rather nice in a guestbook entry, though...
- The fourteenth line is a flag for whether you want to allow previews or not. I can't think of a good reason why not, so just put "yes" on this line and call me silly for implementing this "feature".
- The fifteenth line is for the maximum number of entries you want retained in your guestbook. Once this limit is reached, the oldest message will be discarded when someone submits a new one. Don't make this number too big, since you don't want your guestbook eating into your disk quota.
- Now all this files have to be upload to the server. We recommed you use WS-FTP for this job.
- VERY IMPORTANT PART: The guestbook file needs some special attention on your part. This file once loaded to the server much be giving a special attribute.
- Once you've got the configuration file created, all you have to do is call up the script and tell it to use your configuration file. Just make sure that you have exactly fifteen lines in your configuration file and that all the values are correct. If one of your lines gets to long, the text editor may automatically "wrap" it to two lines. Watch out for this - its a big no no. That is where VI comes in handy!
- Fire up your browser and type in:
http://www.storm.ca/cgi-bin/gb.pl?config=/home/yourloginid/public_html/guestbook.cnf as the URL to go to, replacing the "loginid" part with YOUR user ID. If you've followed the directions carefully, your guestbook should be on screen for the very first time! Put a link to the URL you just typed in into your home page and you are off and running.
Of course, not everything works the way it is supposed to every time, so there is a debug feature built into the script. Just tack &debug=on onto the end of the URL you entered into the browser and try again. This will cause the gb.pl script that is running your guestbook to spit back what it has read from your configuration file. Practically every problem will be with the configuration file, so be very careful, methodical, and observant when you create it. Remember, it DOES work - all these guestbooks currently run with the same script you are trying to use:
Uploading Your Guestbook
To upload your guestbook, you will need to use an FTP client (for example WS-FTP).
In the session profile window, you will have to change a few settings :
Hostname: www.storm.ca
Username: 'your userid'
Password: 'your password'
Once you have connected, you will see a split screen with your files on the left side and the remote files on the right side. You have to change directories on the remote side to public_html . This is the directory where you will upload your homepage files.
The guestbook file that contains all the data has to be changed slightly. Using your FTP program, you have to change the unix file attribute of this file to 777 .
The FTP program to use to accomplish this is WS_FTP32. You can get it by clicking here.
All you need to is right-click on the file once you have connected and select chmod. Put a check in all the boxes.
|
|