Jax Guestbook v3.3
Manual

 

O. General Information

Program and Author
Credits

I. Introduction

What's Jax Guestbook? - What do I need it for?
Features
System requirements
License

II. Installation

without mySQL support
with mySQL support

III. Application

How to link the script (parameters)

IV. Frequently Asked Questions (FAQs)

How to change colors and fonts?
How to set local time zone?
How to use multiple guestbooks simultaneously?
Am I responsible/liable for guestbook entries?
How to comment guestbook entries?
How to block a users IP address?
How to set file access permissions on webspace?
How works the e-mail protection?
How many entries Jax Guestbook can save?
Where can I get informationen about updates/changes?

V. Known Bugs and Problems (Troubleshooting)

Problems with MySQL
Problems with Formmailer
Problems sending e-mails

VI. List of Changes (ChangeLog)

v3.3, v3.2

 

O. General Information

 

Program and Author

Projekt:   Jax Guestbook (WWW-Gästebuch)
     
Version:   3.3
     
Interpreter:      PHP 4.02+
     
Code:   Andreas John
     
Design:   Andreas John
     
Homepage:   www.jtr.de/scripting/php/guestbook/
     
Lizenz:  

Copyright (C) 2002-2003, Andreas John [ Jack (tR) ]

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. A copy of this license you can find in the added text file gpl.txt or on the website of the Free Software Foundation under: http://www.fsf.org/copyleft/gpl.html

Please note, that I can give NO WARRANTY FOR DAMAGES CAUSED BY DIRECT OR INDIRECT USE OF THE PROGRAM...

 

Credits

I want to say a very big Thank You to all people who support this and many other Open Source projects by their hints, translations, affectionate adaptions and links on their websites...

My personal credits go to:

Albert Alcaine http://www.alcaine.info
Anja http://www.nytiknipling.dk
Axl Kix
Burhan Bavkir http://bavkir.isgreat.tv
Che Dong
Dennis Roubos
James Taylor http://queenshow.narod.ru/
Martin Sondermann http://www.kunstphotografie.de
Max Malta http://www.max-systems.com
Michal Letko
Oskari Lavinto
Sophie Thuswaldner
Søren Højberg www.visionfoto.dk
Svavar Lúthersson http://www.svavarl.com
Takuji Ozaki http://www.studioham.net/

 

I. Introduction

 

What is Jax Guestbook? - What do I need it for?

Jax Guestbook is a convinient to handle online guestbook system. You can easily add it to your homepage - without any programming skills.

A online guestbook enables your visitors to enter greetings and comments and links to user homepages to your homepage. (similiar signing into a "real" guestbook e.g. of a hotel) Guestbooks make websites more personally and gives the webmaster a channel to get responses and improvement proposals of the visitors...

 

Features

Jax Guestbook comes along with typical features of an online guestbook. Additionally it brings you some special features. Particularly worth mentioning is the very flexible support of multiple data sources. This makes it possible to use the guestbook system both - with a simple text file and a mySQL database system.

Another feature worth mentioning is the possibility to hide the e-mail-adresses of your visitors behind a Formmailer. A formmailer is a program that sends e-mails directly via a formular on the website. In this way a user can send an e-mail to another user without knowing the recipients address. This technique is used to avoid spam crawlers get the e-mail address of your visitors from your guestbook...

Following you find a summary of all important features of Jax Guestbook:

 

System Requirements

Jax Guestbook was written in PHP 4, a server-side programming language that produces dynamical generated web pages! (If unsure, ask your web space provider for PHP support!)

Jax Guestbook is able to save data into both, simple text files and into a mySQL-data base system - that means Jax Guestbook also works without mySQL-database-connection!

 

License

Jax Guestbook and its components are published under the conditions of the GPL - General Public License in der Version 2 or later! The complete license text you find in the file gpl.txt (part of the packet), respectively on the website of Free Software Foundation under http://www.fsf.org/copyleft/gpl.html

This license allows you to use and copy this software freely and to develop improvements. Furthermore you are bound not to touch the copyright notes resp. to set a link to the original script (http://www.jtr.de/scripting/php/guestbook)!

 

II. Installation

 

Installation without mySQL support

Jax Guestbook was written in PHP 4, a server-side programming language that produces dynamical generated web pages! (If unsure, ask your web space provider for PHP support!)

Jax Guestbook is able to save data into both simple text files (csv files) and into a mySQL-data base system - that means Jax Guestbook also works without mySQL-database-connection!


If you already have PHP support please do the following:

  1. Download latest version of Jax Guestbook from
    http:/www.jtr.de/scripting/php/guestbook/ !

  2. Unpack the .zip-archive! (including all sub directories!)

  3. Open file globals.inc.php (in directory guestbook) using a texteditor. Fit the configuration variables to your needs!

    You can also do this settings later directly on your website (using the administration program). The administration program guestbook.admin.php is in directory admin (relatively to the path of your guestbook script)

    For example: if you put Jax Guestbook in the main directory of your website (/) you can access the admin script calling

    http://www.yourdomain.tld/guestbook/admin/guestbook.admin.php

  4. Upload all directories and files of Jax Guestbook onto your website!

    After uploading the script to your webspace make sure by setting file access permissions that the script has full write access to the to the .csv-files (guestbook.csv and guestbook_ips2block.csv) otherwise the script produces errors like "Error: Couldn't open 'guestbook' ..."

  5. If you have uploaded script and set write permissions you can link it onto your website, e.g.:

    http://www.ihredomain.de/guestbook/jax_guestbook.php?language=French

    The parameter language ... tells the script which language to use. (this of course implies that there is a language template in language directory, otherwise the default language set in globals.inc.php will be choosed!)

  6. Important Security Note:
    Jax Guestbook has no active password protection! So you have to make sure that nobody but you has access to the admin scripts (admin/guestbook.admin.php) directory. This you usually do by setting directory protection using your webspace configuration frontend!

 

Installation with mySQL support

Jax Guestbook was designed to be able to save data to both - simple text files and mySQL database tables. Running a big guestbook with many thousands of entries mySQL is expected to give you a better performance...

If you have mySQL support please do the following:

  1. Install Jax Guestbook (see "Installation without mySQL")...

  2. Run the administration frontend on your website! The program you find in directory admin (in relation to the path of your guestbook script).

  3. Set [Change Settings] data source to "mySQL database" and input the database login information (server, database name, user id and password)!

  4. Start phpMyAdmin (or your favourite mySQL monitor tool) and create the following table structures:
    CREATE TABLE guestbook (
    id int(4) NOT NULL auto_increment,
    date varchar(10) NOT NULL default '',
    time varchar(8) NOT NULL default '',
    ip varchar(16) NOT NULL default '',
    name varchar(30) NOT NULL default '',
    mail varchar(100) NOT NULL default '',
    age char(3) default NULL,
    location varchar(30) default NULL,
    homepage varchar(100) default NULL,
    icq varchar(12) default NULL,
    message text NOT NULL,
    hide_entry char(1) NOT NULL default '0',
    sec_mail char(1) NOT NULL default '1', xkey varchar(32) default NULL,
    PRIMARY KEY (id)
    ) TYPE=MyISAM; CREATE TABLE `guestbook_ips2block` ( `id` int(11) NOT NULL auto_increment, `ip` varchar(16) NOT NULL, `timestamp` varchar(12) NOT NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM;
  5. Important Security Note:
    Jax Guestbook has no active password protection! So you have to make sure that nobody but you has access to the admin scripts (admin/guestbook.admin.php) directory. This you usually do by setting directory protection using your webspace configuration frontend!

 

III. Application

 

How to link the script (parameters)

After you have installed Jax Guestbook as described in Chapter "Installation" you can set links to the script from your website. You can influence outputs of the script manipulating the parameters behind the "?"...

http://www.mydomain.tld/guestbook/jax_guestbook.php?guestbook_id=0&language=english

guestbook_id specifies the guestbook (if you run multiple guestbooks with the script -> see FAQ: How to use multiple guestbooks)

language sets the language of system messages. Its important to make sure that a coressponding language template exists (in directory language). Otherwise the script sets the language that is defined in globals.inc.php.

gmt_ofs indicates how many hours are between visitor's local time and Greenwhich Mean Time (GMT). For each guestbook entry the script corrects the time display and shows the difference. (-> siehe FAQ: correction of local time difference)

 

IV. Frequently Asked Questions (FAQs)

 

How to change colors and fonts?

To change outer appearance there are some predefined CSS stylesheets in directory styles. You can change them using a simple texteditor.

 

How to set local time zone?

As its most probably your visitors come from different parts on Earth you have somehow to consider the different time zones.

To unify the time of all entries Jax Guestbook saves the guestbook entries in GMT (Greenwhich Mean Time). Later it increases the time by the local time difference of the visitor.

This local time difference normally is either set indirectly using localisation templates (in directory language) - means: controlling indirectly via parameter language. Or you set time zone manually using parameter gmt_ofs:

...?language=english&guestbook_id=0&gmt_ofs=1

This URL would add 1 hour to GMT e.g. in order to fit time zone for a user from Germany (despite language=english is set).

 

How to use multiple guestbooks simultaneously?

If you want to run more than one guestbook with the same script you can select the corresponding guestbook by parameter guestbook_id. e.g:

http://../jax_guestbook.php?guestbook_id=1

For security reasons the filename of the guestbook is not forwarded directly by URL.
The allocation between guestbook ID and guestbook name you have to set manually in globals.inc.php. e.g:

...

// Titel of the HTML-page

$gbfiles[0]->title = "Jax Guestbook";
$gbfiles[1]->title = "Guestbook 2";

// Data source
$gbfiles[0]->data_source = "csvfile";
$gbfiles[1]->data_source = "mysql";

$gbfiles[0]->guestbookfile = "guestbook";
$gbfiles[1]->guestbookfile = "secondbook";

$gbfiles[0]->ipblockfile = "ips2block";
$gbfiles[1]->ipblockfile = "ips2block2";

// CSS template for the Guestbook

$gbfiles[0]->css = "styles/blue-orange.css";
$gbfiles[1]->css = "styles/blue.css";

...

The example shows how to use a second guestbook with the same script:

http://../jax_guestbook.php?guestbook_id=1

access a second guestbook based on a mySQL table.
Equivalent the URL

http://../jax_guestbook.php?guestbook_id=2

accesses a third guestbook file and so on...

You can freely choose the data source (mysql/csvfile) for any single guestbook!

 

Am I responsible/liable for guestbook entries?

I can't answer this question in general and I am no lawyer but in most countries (at least in these countries of old Europe ;-) the webmaster is obligated by law to make sure, that the guestbook is not abused for racist or discriminating postings.

In the land on earth claiming to be "most progressive" the law tries to protect "freedom of opinion". That's a good aim in generally. But maybe this high valuable freedom of opinion has dissappeared long before the fall of the World Trade Center and the anti terror laws that followed.

It's funny but political non-correct meanings are censored stronger ("voluntarily") in some countries than illegal child pornography...

To be fair - I think also in these "progressive countries" many webmasters try to keep their sites clean of real garbage not filtering critics! So you can use Jax Guestbook in permission mode (Set the tick on "Permission required?" in administration frontend!)

 

How to comment guestbook entries

Many people want me to insert a function to Jax Guestbook that enables them to comment guestbook entries. Why I don't? Therefore:

  1. In a "real" guestbook there is no such possibility!

  2. You CAN add a comment to guestbook entry in the admin frontend e.g.:

<span style="color: red;">Das ist meine Bemerkung zu deinem Eintrag!</span>

 

How to block a users IP?

Strange, but many people asked me this question. I personally want the people to come into my guestbook, but if you want to keep them out... here is a solution:

Jax Guestbook uses a table (by default guestbook_ips2block file/MySQL-table) to store the ip addresses of users which already have signed into the guestbook or used more insults than nescessary:

"ip","timestamp"
"162.127.20.31","1042978994"
"227.14.110.10","1043778394"
...

The first entry of each line in the table is the IP address of the user who signed in. The second entry is the time stamp that counts the seconds expired since 31 Dec 1970. This timestamp defines when the ip block is over.

If started, Jax Guestbook tests if the time of the entry has reached and kills it if expired. If you want to block a user forever, set the timestamp to a value that never will be reached e.g: "227.14.110.10","9999999999"...

(If you use Jax Guestbook in CSV mode download ips2block file and set the values using a texteditor. If you use Jax Guestbook in MySQL mode you have to change the entries using a database editor like PHPMyAdmin)

 

How to change file access permissions on the webserver?

If your webserver runs on Unix (Apache) you have to use the Unix command chmod to change the file access permissions. (How to do this conveniently using your FTP client is described below)

Syntax of chmod is:

chmod rwxrwxrwx filename

r = read
w = write
x = execute

The command expects three 3-digit tupels representing the access permissions for the single "groups" : [rwx][rwx][rwx]

The groups: (from right to left)

all users
all users in same group as owner
owner only

in binary notation:

chmod [rwx][rwx][rwx]

is equivalent to

chmod [111][111][111]

resp. in hex notation with

chmod [7][7][7]

thats all - here you have the chmod command to allow "all" access to files:

chmod 777 guestbook.csv

(the required access permissions depend on webservers configuration. If you are suspiciously and do not want to give script all access (777), try to increase rights step by step until the script works!)

Most FTP clients, as WS-FTP support chmod-command conveniently from their user interface. Using WS-FTP you only have to click with right mouse button on a file (in remote window) and then you have to klick on chmod and so on...


 

How works the e-mail protection?

To get email-adresses many e-mail-spammers run special search engines that filter all email-adresses from a website! To protect the privatsphere of your visitors against these SPAM crawlers you can

  1. put the email-adresses as graphic bitmap on your website

  2. hide them using a script ciphering the email-addresses

choosed the second way. If the option cipher mail-addy! (section filters in admin program) is set, resp. the variable $email_protection = true; in file globals.inc.php is set, Jax Guestbook shows a control near the email input field that enables the user to decide if or not to hide his email-adress. (default is hide!)

If an e-mail-address is hidden a reader of the guestbook can not send an email directly with his e-mail-client (e.g. Outlook), but has to use a web form. (Formmailer)

If a visitor clicks on the username in Jax Guestbook it calls the formmailer giving it the ciphered email-address. All entered data will be send to the recipient!

The Formmailer is a hack (Quick adoption) of Jax Formailer 1.0. To avoid error messages, you have to set access permissions to file logfile.csv (-> File Access Permissions )

The appearance of the Formmailer you can adapt by the stylesheet in formmailer/styles directory!

If you see not the Formmailer, but a white screen the variable $refer_from = ...; in file globals.inc.php is not set correctly. By default it is set to the name of the website running Jax Guestbook.. You can adapt the variable manually to the path where your guestbook is installed...

 

How many entries Jax Guestbook can save?

Currently the script on my website handles about 500 entries (in CSV-file mode) and it does it's job. Theoretically (depending on your webserver's space and power) it should be able to handle a larger amount of a few thousands of guestbook entries. If you have a bigger guestbook using MySQL data source is recommended...

 

Where to get informationen about updates and changes

  1. On my website http://www.jtr.de/scripting/php/guestbook ;-)

  2. In Admin Script there is a link "Check for Updates". To the left of it there is a small green spot. If it blinks gree-yellow there is a new update. If it blinks red yellow there is a security relevant update that you should install!

  3. Sign into "JtR News"-Newsletter! (http://www.jtr.de/scripting/php/newsletter/newsletter)

 

V. Known Bugs and Problems

 

Problems with mySQL

Jax Guestbook saves only one entry, resp. it always shows the same entry!

You probably have not set up the database using the sql dump (in admin-directory) and forgot to create the field "id" (very important!!)

 

Problems sending e-mails

For the formmailer and notification e-mails Jax Guestbook uses the PHP-internal function mail(). This function depends on correct settings of SMTP-parameters in PHP configuration file. If you get trouble sending e-mails please contact your web space provider!!

 

Probleme with Formmailer

The formmailer does not work - only a white screen appears.

This error occurs if you have activated the internal SPAM-protection of the formmailer. It happens if the HTTP_REFERER is not equal with the variable $refer_from in the file globals.inc.php of the guestbook. Change the line

$refer_from = $SERVER_NAME;

manually in

$refer_from = "http://www.mydomain.tld"

If also this trick does not work you can disable the SPAM-protection of the Formmailer in globals.inc.php:

// Allows calls only from this URL... (SPAM protection!)
$spam_protection = false;

 

Important Security Note:

If you want to use the logging feature of the formmailer make sure that the auto index for the directory containing the protocoll file is switched off and don't use the default name (logfile.csv). Otherwise external visitors could read out the logfile.

The filename for log file you can set in globals.inc.php of the formmailer!

$formmailer[0]->logfile = "logfile.csv";

 

VI. List of Changes (Change Log)

 

Changes in Version 3.3:

Changes in Version 3.2:

 


If you have found any errors or have questions or suggestions for improvement then please don't hesitate to contact me directly!


Berlin, 15.05.2003 - Jack (tR)