Jax Guestbook v3.3
Manual
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?
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... |
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 |
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...
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:
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!
Jax Guestbook and its components are published under the conditions of the
GPL - General Public License in der
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)!
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:
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:
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;
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)
To change outer appearance there are some predefined CSS stylesheets in directory styles. You can change them using a simple texteditor.
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).
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!
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!)
Many people want me to insert a function to Jax Guestbook that enables them to comment guestbook entries. Why I don't? Therefore:
<span style="color: red;">Das ist meine Bemerkung zu deinem
Eintrag!</span>
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)
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...
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
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...
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...
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!!)
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!!
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
manually in
If also this trick does not work you can disable the SPAM-protection of the Formmailer in globals.inc.php:
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";
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)