The first thing you need is the guestbook.zip This will unpack into 5 files.
  • Readme - open this in any text editor and read it - it's very important.
  • guestbook.pl - this is the perl file that powers the guestbook - only open and edit with a UNIX compatible text editor. You will have to mail us to have it made executable.
  • addguest.html - this is the front end form to the guest book - you should edit it to specify the path to call the script with and change layout and colours.
  • guestbook.html - this is the page with all the entries on it - again you can edit the layout and colours etc on it. You will have to mail us to have it made writable by the script.
  • guestlog.html - this is a log of guests for your reference. You must mail us to have this made writable.

 

# Set Variables

$guestbookurl = "http://www.{your domain}/guestbook directory/guestbook.html";

Above you should add the full url of your guestbook html page, please note that it must be a .html not a .htm

$guestbookreal = "/home/yourname/public_html/guestbook.html";

This is the full path to your guestbook.html. The {your dir or web domain} will be www.{your domain} or if you are on ws1 it will be your directory name. Check out the secure server pages to find out what server you are on. This must be .html not .htm.

$guestlog = "/home/pub/www/{your dir or web domain}/guestbook directory/guestlog.html";

This is the full path to your guest log. The {your dir or web domain} will be www.{your domain} or if you are on ws1 it will be your directory name. Check out the secure server pages to find out what server you are on. Again it must be .html not .htm.

$cgiurl = "http://www.{your domain}/scripts/guestbook.pl";

This is the full url of the script - dont forget that you must mail us to have it made exe.

$date_command = "/usr/bin/date";

Leave this as it is it is the date command

# Set Your Options:

$mail = 0; # 1 = Yes; 0 = No

Do you want a mail sent to you each time there is an entry into the guestbook telling you who left the message and what they said ? If you do you will also have to fill in $recipient with your email address and $mailprog /usr/lib/sendmail

$uselog = 1; # 1 = Yes; 0 = No

Do you want the users logging in the html log - this is a good option as the log will show you errors as well as entry's. You will also have to mail us to have this made writable by the server.

$linkmail = 1; # 1 = Yes; 0 = No

Do you want users to have a link to their email address on the guestbook page.

$separator = 1; # 1 = <hr>; 0 = <p>

Do you want a line separating entries.

$redirection = 0; # 1 = Yes; 0 = No

Always switch this option on - it is only turned off if your visitors mainly use the Lynx text browser

$entry_order = 1; # 1 = Newest entries added first; # 0 = Newest Entries added last.

Which should be at the top of the entry page - new entries or old ones ?

$remote_mail = 0; # 1 = Yes; 0 = No

Do you want to send an automatic mail to your visitor thanking them for their entry. If you opt for this you will need to make sure that you have placed your email address in $recipient and that $mailprog is /usr/lib/sendmail . You will also need to configure a section further down the script if you have chosen this option* .

$allow_html = 1; # 1 = Yes; 0 = No

Can they place html tags in their entries - ie specify text colour, size and format.

$line_breaks = 0; # 1 = Yes; 0 = No

Do you want new paragraphs in the guestbook entry to be turned into line breaks in the html thus keeping the format of the submitted text.

# If you answered 1 to $mail or $remote_mail you will need to fill out

# these variables below:

$mailprog = '/usr/lib/sendmail';

This should always remain the same

$recipient= 'you@your.com';

This is your email address

# Done

* If you have chosen the remote mail option you will need to go down to the following section of the script and configure it for your own use

print MAIL "Thank you for adding to my guestbook.\n\n";

This line can be edited placing your comments between the first quote mark and the full stop.

Once you have configured the script using a UNIX compatible editor place it in your scripts directory. You will also have to place the html pages in the directory specified in the script - you may edit the format of the html and will have to change the path by which they call the script. You should then mail E2 Help to have the script made executable and the html files made writable by the script.

Why not try out the Guestbook.

Go back to Previous Page