flatPHPBook by Thomas Hettenhausen



1. Installation
2. Configuration
3. Misc



1. Installation

The phpBook archive contains the following files:
	- guestbook.php			-> the guestbook script itself
	- guestbook.css			-> the style sheet for the guestbook
	- guestbook.js				-> the JavaScript functions used with the buttons
	- README.txt				-> this file
	- LICENSE						-> the GNU GPL
	- email.png					-> the little email icon
	- homepage.png			-> the little homepage icon

Just copy all these files into the same directory on your web space.
You might have to explicitly label the script as "executable".
You will see this is necessary if you know for sure that PHP is enabled
for you but you only get to see the code instead of a nice looking guestbook.

To do so, load your favorite FTP program (I use SmartFTP on Windows
and gFTP and Linux), and open the directory where you put these files.
Now this is where it is probably different with each FTP program - 
with SmartFTP you right-click on the guestbook.php and select
"Properties / CHMOD" from the context menu. At the bottom of the new window,
you can set so-called flags ("read", "write", "execute") for either "user",
"group" and "other".
You will probably have to check "executable" for "other". Experiment with it until
it works.

The first time it is necessary, the script will try to create a file called "guestbook.db".
I had no problems with it, but maybe it gives you an error message about insufficient
rights. Then just create a file with that name on your own machine and upload it
to the same directory as the scipt is already in.


2. Configuration

The file "guestbook.php" is the PHP script itself, but you can of course open it
with any text editor you have at hand and take a look at it.

Pretty much at the top, you can see a line reading
// global variables such as filenames and settings
and following that, some lines which configure some parts of the script.
Some of these do not change anything visible (name of the guestbook database file),
but others do change the behaviour (how many posts per page, sort order for posts).
You should change $adminusername and $adminpassword to something else.
You can change everything else in there, it should be pretty much self explanatory
with the variable names and the comments directly behind them.

I do not have any checks in there to catch problems if you set e.g. the number of posts
per page to below zero - this is not somehting someone from outside is going to hack,
and I think you will be wise enough to fill in valid numbers. After all, you want this to work...

The file "guestbook.css" is a CSS (Cascading Style Sheet) file for the guestbook.
If you know how to write HTML and used CSS yourself, go ahead and play with it.
This is just regular CSS, no magic involved. Make it fit your own webpage with this.
If you do not know what CSS is, either be daring and play around, or go learn something
about it first. There are some pretty good online tutorials for CSS and HTML.

3. Misc

This guestbook is brought to you by Thomas Hettenhausen and released under the GPL.
I wrote this little script because I intended to move my web presence from HTML-only
to one allowing PHP, but not MySQL (a matter of money), and I did not find any suitable
PHP-based guestbook. Right now I do have MySQL, but hey - that does not mean I cannot
finish a project I start!
On the other hand, free guestbook services might have been ok, too, but
they usually display advertisements, are sometimes solw in response (after all, they are free,
and their companies do not want to spent lots of money for their free services),
and they often are not exactly easy to modify in their appearance,
so they never quite fit your web page design.

And since I am a student of computer science, I might as well just write my own if I need it.

If you like this guestbook, drop me a line and tell me! I would love to hear from installations,
and I can also put up links to some of the sites that use it.



Thomas Hettenhausen, July 2003
http://www.hettenhausen.net