Home About us Products Support Contact us
:: LI-Guestbook
Documentation - Setup
Extract the .zip file to a temporary folder and edit everything as described below. Do not move files and folders or change their names. Then upload everything to a folder on your server and run tablemaker.php. After the tablemaker created the table in de database, delete tablemaker.php and you can see the script working if you go to guestbook.php

This script comes with 73 files:
  1. guestbook.php --> The main page with the form to enter a new comment
  2. layout.php --> The layout in which every entry will be displayed in guestbook.php
  3. gb.php --> The actual script that does all the work
  4. tablemaker.php --> A script that will setup the database for the guestbook
  5. style.css --> The style script that you can change to your website's style
  6. readme.txt --> The readme file with the same contents as this page


  7. /images --> A folder containing 3 images which are used for every comment
  8. /Emoticons --> A folder containing 64 emoticons which a user can add to his/her comment
NOTE: You shouldn't change any of the filenames
guestbook.php
This is the overall template of the guestbook. All entries will be displayed in this page using the layout.php file. You can change this page completely to your wishes, including the form for new entries. There are a few things you should know before you start editing:
  • All the <?php code; ?> tags should stay in the template file
  • If you don't want the country selection in the form you can delete it, but make sure you dont enable country validation in gb.php
  • If you do use the country list, don't change the value's or the script won't process the countries properly
  • Don't change the <form> name= value
  • Don't change the submit button name= value
layout.php
This is the layout file for the entries. It is an empty entry that will be used as a template for every entry in your guestbook. Again there are a few things you should know before you start editing:
  • All the <?php code; ?> tags should stay in the template file
  • It's not a seperate page so don't put <html>,<body> etc tags in there. Just change the file don't add tags
gb.php
This is the file that does all the work for you. Only in the top of this file are things you need to change. There is no need to change anything in the code. We'll walk you through all the options
  • $gbook = "guestbook.php"; No need to change this one (changing it could cause the script to stop working)
  • $entry_layout = "layout.php"; No need to change this one (changing it could cause the script to stop working)
  • $datelayout = 16; The layout of the timestamp that will show up with every entry. All the possibilities are listed at the end of this page. Enter a 0 for no timestamp
  • $utc_diff = 0; The timestamp will use UTC time as base time. If you want another time, enter the amount of hours that the timezone of your choice differs from utc. if you choose a time west of UTC put a minus in front of the hours
  • $wwrp = 95; If someone enters a very long word without spaces, the layout of the site could be ruined. To prevent this, the script will break a word after the number of characters you put here
  • $min_name = 3; The minimum length that the name a users enters should be
  • $name_err = "Name error message"; The error message the user will get if his/her name is shorter than set in $min_name
  • $email_val = 0; If you want the email address a user enters to be validated, enter a 1 otherwise enter a 0. If you enter a 0 and the user enters an invalid email address, his/her email address won't be stored
  • $email_err = "Email error message"; If you entered a 1 and the user enters an invalid email address, this is the error message he/she will get
  • $min_msg = 10; The minimum length the a comment should be
  • $msg_err_min = "comment error message"; If the comment is shorter than the number set above, the user will get this error message
  • $max_msg = 1000; The meximum length of the comment
  • $msg_err_max = "Error message for a too long comment"; The error message the users gets for a too long message
  • $html_msg = 0; Enter a 1 if you want to allow the user to enter HTML tags. Enter a 0 if you want to disable this function. For security reasons it's best to enter a 0
  • $c_req = 0; Enter a 1 if it's mandatory for the user to enter his/her country. Enter a 0 if it's optional
  • $c_err = "Country error message"; If you entered a 1 above, this is the error message the user will get if he/she doesn't choose a country
  • $msgpp = 10; The number of comments that will be displayed per page
  • $admin_pass = "password"; The password that you, as admin, need to enter to show IP's, delete entries or reply to comments
  • $mysql_xxxxx The mysql settings for the database. If you use tablemaker.php you will get a list what you can enter here.
tablemaker.php
This is a script that can help you setup the database for the guestbook. You just enter the following information, click on the "Create table" button and the script will make a table in your database ready for use in your guestbook.
  • MySQL DB host: The MySQL host address
  • DB username: The MySQL username
  • DB password: The MySQL password
  • DB name: The MySQL database name where you want the table to be created
  • Table name: The table name you want for your guestbook
If you clicked the "create table" button and there is an error, the script will let you know this.

NOTE: After creating the table, you should delete this file from the server
style.css
The style script used in the layout. You can edit the text and link properties of different parts of the guestbook
  • a.mail.(xxxxx) The properties of the user email link on the left side of an entry
  • a.rest.(xxxxx) The properties of the rest of the links, like the "previous" and "next" link
  • td.top The properties of the the text on top of an entry. this will be the id number of an entry and the timestamp
  • td.comment The text properties of the comment itself
  • a.userinfo The text properties of the user information on the left side of an entry
  • font.name The markup of the name a user entered. This is also displayed on th eleft side of an entry
  • body The text properties of the rest of the page.
  • input, textarea, select, submit, reset The text properties of the entry form
  • hr The properties of all the horizontal lines in the guestbook
readme.txt
This file contains the same as this page
This are all the date layouts you can choose from (example: 5 august 2006 9 pm)
  1. 2006-08-05 21:00
  2. 05-08-2006 21:00
  3. 08-05-2006 21:00
  4. 05 08 2006 21:00
  5. 08 05 2006 21:00
  6. 05/08/2006 21:00
  7. 08/05/2006 21:00
  8. 2006-08-05
  9. 05-08-2006
  10. 08-05-2006
  11. 05 08 2006
  12. 08 05 2006
  13. 05/08/2006
  14. 08/05/2006
  15. Sat 05 Aug 2006
  16. Sat 05 Aug 2006 21:00


Go back to the product page




Google
All Rights Reserved 2006
LI-Scripts
Metamorphozis Templates