>> Table of Contents >> Extensions

Plug-in: Guestbook

General introduction

This plug-in enables you to add a guestbook to your web site. Using this software, your visitors may leave messages for you. These messages are visible to you and other visitors. The software automatically informs you on new entries by sending you an e-mail. In addition the latest messages are also available as RSS-feed.

Notice to PHP newbies: This software requires PHP and thus will possibly not run on your local hard disk, but only on the internet. To be able to run this software on your web site your provider needs to support PHP. If in doubt, ask your provider.

install plugin

Guestbook entries may be stored optionally as text files or in a database.

To be able to run this script you need webspace with support for PHP and FTP access. In addition a FTP client is needed to upload files. To use a database to save entries you need to have the PEAR-DB library installed.

Step-by-step guide:

  1. Open the index page "index.php?action=index" in a JavaScript enabled browser.
  2. Log on to the system. After installation the login data is: user name="Administrator", password="". If you already specified a password during the installation, please use this.
  3. The main menu has two settings: beginner and expert mode. The main menu has two settings: Beginner and expert mode. In the right column, you find a list of all installed components. These are divided in 3 categories: Plug-ins, skins and language files. In the left column, you will find all the configuration settings for the installed plug-ins.
  4. Click the button "reload list" to reload the list of installed plug-ins. (see figure)
  5. Enable (if available) the plug-ins "Database Administration", "Guestbook" and "Guestbook setup." Then save your changes.
  6. After finishing the installation successfully an entry labeled "Guestbook" will appear on the application's site map.


Figure: Installing new plug-ins

install database (optional)

Note:  The following steps are required only if, entries are to be saved in a database, rather than a text file.
For a guide to create a new database, see " Instructions for advanced users: Installation." ".
  1. The option "database" offers application specific settings, which apply to all profiles simultaneously and can't be set for each profile separately. Therefore, this option is only available with the pseudo profile "basic settings"
    Select "Basic Settings" from the profiles bar, then click on "database setup" in the left column of the menu.
  2. Enter the data necessary for the connection to your database server. You will get this data from your competent administrator, in case you don't already got it. Note the information from the online help. (This is the grey text printed above the entry form.) Then save the changes. The required tables are created automatically, and synchronized with existing tables stored in the file system. Attention! If this process should fail because of an early timeout, repeat the process until it is completed. This is important, because otherwise you may have no access to the database or the stored data may be inconsistent.
  3. If you would like to complete the process by hand, please use these SQL source files, which are prepared for your DBMS.

SQL source files for manual installation:

Basic settings

Basic settings
Figure: Choosing the profile "Basic settings"

These settings automatically apply to all profiles, unless a profile overwrites these basic settings. In addition they apply to all newly created profiles. Caution: Some plug-ins may have options, either which are only visible in the basic settings, or which are visible everywhere EXCEPT in the basic settings.

? Note: Basic settings are meant to be "Default values", that automatically apply to all books, unless overwritten.

E. mail notifications

In the administrator's menu click "Guestbook Setup". In the section "E. mail notifications" you can choose whether you are to be informed on new entries automatically by e-mail. This option is disabled by default. To activate it, click on the button with the text "activate" and enter your e-mail address in the box "send mail to". (see figure)

In order to save your changes, click on "Save changes", or click on "Abort" to return to the administration menu without changes.

edit e-mail notification settings
Figure: edit basic settings

Multiple guestbooks

The program usually sets up new guests books when needed. When doing this, basic settings are used, which apply to all books equally (see above) If you want a guest book to use very special profile of settings, which differ from the basic settings of all the other guestbooks, then you can use this option.

  1. Open the administration menu.
  2. In the profile administration section select "new profile". Choose a suitable name for the profile, enter it in the input field and then save your entry. The profile is then selected automatically.
  3. To change the settings of the just created profile, select in the left column "Options" the menu "Guestbook Setup".
  4. You will now see a page with various settings that you can change. Once you click the "save changes" button, the settings of your new profile will be saved.

Link to your new guestbook like this:

index.php?id=FOO&action=guestbook_read_read

Where instead of FOO you enter your guestbook's name.

Multiple layouts for the same guestbook

  1. Open the administration menu. Ensure you are logged in as administrator and you are using the expert mode.
  2. Open the option "program setup".
  3. Within the section "data source" there is an entry labeled "get data from". There enter the name of the profile, which the layout refers to. For example: If you want to use the layout for the guestbook with the id "default", then write: " default ".  (see figure)

Using data from another profile
Figure: Using data from another profile

Do the same for any other layouts you want to create.

Link to a layout as you would do with a real guest book:

index.php?id=FOO&action=guestbook_read_read

Where instead of FOO you enter your layout's name.

Protection from unwanted advertisements

To protect you guestbook from being flooded with unwanted advertisement there are several security options included. Via the menu "Guestbook Setup" you may restrict the number of entries per person to a number of your choice.

Spam protection
Figure: Spam protection

  1. Open the administration menu. Ensure you are logged in as administrator and you are using the expert mode.
  2. Open the option "Guestbook Setup".
  3. Scroll down to section "Spam protection". Here you can restrict the number of consecutive entries a person may write to a certain number.

Additional security settings can be made by using the plug-in "Anti-Spam". These can be edited by using the menu option "Anti-Spam Setup".

List of important data fields for the interested developer

To see the full list, insert new fields, or delete old fields, open the appropriate structure file "config/db/guestbook.config".

Column Type Mandatory Default value Description
GUESTBOOK_ID integer yes <auto increment> Primary key
PROFILE_ID string no default Foreign key to the appropriate profile.
GUESTBOOK_IP string no <remote address> IP of the author of the current entry
GUESTBOOK_NAME string yes n/a Name of the author
GUESTBOOK_MESSAGE string yes n/a message text
GUESTBOOK_MAIL string no null Mail address of the author of an entry.
GUESTBOOK_DATE integer yes <current timestamp> Date of creation.
GUESTBOOK_COMMENT string no null Commentary by the webmaster (if any).

Author: Thomas Meyer, www.yanaframework.net