-- 
-- README
-- 
-- Copyright (C) Free Software Foundation
-- Portions Copyright (C) 2001 Achim Winkler <achim@lkcc.org>
-- 
-- This 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, or (at your option)
-- any later version.
-- 
-- This software is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
-- 
-- You should have received a copy of the GNU General Public License
-- along with this package; see the file COPYING.  If not, write to
-- the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-- Boston, MA 02111-1307, USA.  
--



Achims Guestbook v1.0 - 25.02.2001


READ LICENSE AND COPYING!!!

DON'T REMOVE THE COPYRIGHT IN FOOT.HTML.INC!!!

Author: Achim Winkler
Layout: mTw PC Action (Falko Hildebrand)

Download: http://www.lkcc.org/achim

IMPORTANT: Please send me your modifications if you change anything in this script so that i can 
           integrate them in future releases.
           

-------------------------------

Description: 

It's just a simple php guestbook which can handle really much data without the help of any known database
like mySQL. You can configure the layout and some other options to adapt it to your needs. I included also 
an admin modul to remove or change special entries, to configure the script and do other important stuff. 
The speed is unbeatable fast and is compared to other relative databases just as fast or faster.

-------------------------------

Requirements:

- PHP 4.0.4
- a working shell
- hd space for the database

-------------------------------

Installation:

All you have to do is to copy the files on your shell account and to run guestbook.php. Sometimes it is 
needed to set some file permissions for the data and temp directory and the config.php and 
data/wordfilter.php file to make them writeable	(chmod 766 data, chmod 766 temp, chmod 766 config.php and 
chmod 766 data/wordfilter.php). Try 777 if the filepermission 766 doesn't work for you. The database 
and its index file are created, if you run the script the first time. If you created your first entry 
and the automatic temp directory creation failed, create it by hand and set the needed file permissions 
like described above. Now make sure that you start admin.php to set a new administration password and 
configure some important features like:

Language: Choose your prefered language: "eng" = english, "ger" = german, "fre" = french, "ita" = italian, 
          "por" = portuguese, "dut" = dutch, "spa" = spanish, "rus" = russian, "cze" = czech, "fin" = finnish, 
          "chi" = chinese, "dan" = danish or "swe" = swedish.

Indexsize: You can create hudge databases with this feature in the cost of space. The indexfile is used
           to address and to find the entries within the database. The higher you choose the value the more
           entries you can store. The indexsize defines the maximum addressable space. Here are 3 examples
           to make it clear:
           
           Indexsize = 4 -> max. Datafilesize = 9.999 Byte
           Indexsize = 8 -> max. Datafilesize = 99.999.999 Byte
           Indexsize = 16 -> max. Datafilesize = 9.999.999.999.999.999 Byte
           
           It can only be changed if you create a new database. The database gets destroyed if you change
           it on a running database! I included an extra tool (admin menu) to enhance or reduce the indexsize.
           Do it always with this tool and never manually!
           
  
Entriesperpage: This value specify the entries per page and can be changed all the time so that you can 
                adjust it to your needs.
                
HTML_Filter: 1 = on / 0 = off
             The guestbook filters all HTML or other tags from user inputs if this switch is on. But you can 
             use some tags like you can see in the help part of the input screen, if you put it on.
             
Word_Filter: 1 = on / 0 = off
             Unwanted words like "shit" or something else are replaced by "*" in the size of the word if 
             this switch is on. If you dont like it, put it off.
             
Smileypics: 1 = on / 0 = off
            The administrator can force the smiley translation from ascii to gif (Smileypics = on), but 
            he can't prevent it if the user want to use this feature. So the user has the last word.
            
Maxsmileys: Specify the maximum amount of smileys per entry.
            
MaxChars: This value specify the maximum wordlength. Longer words are splitted by spaces.

MaxText: This value reduces every entry to a specific length.

MaxLines: Is the maximum amount of lines for one entry.

MaxPictures: This value is the number of alowed pictures pro entry.

Floodwait: This is the time the user has to wait between 2 posts from the same ip.

Logip: 1 = on / 0 = off
       This feature enable or disable ip logging for paranoid people.
       
Messengers: 1 = on / 0 = off
            Some people dislike the messenger feature, therefore here is the possibility to disable it.

Pictures: 1 = on / 0 = off
          You can put this switch on if you want to offer a picture support. This feature is risky, because
          users can post really hudge images, so that the guestbook looks stretched in any direction (You 
          can prevent from doing it, if you use the parameter MaxXsize and MaxYsize!). 
            
Checkpic: 1 = on / 0 = off
          If you want to check the picturesize from included images, put this switch on. It can be that the
          user has to wait until your server downloaded the image and checked the size!
          
ShrinkImages: 1 = on / 0 = off
              Bigger images as MaxXsize or MaxYsize are shrinked if you enable this feature. They get ignored
              if not. (the shrinkprocess doesn't prevent the user from long download times for big images!!!)
              
MaxXsize: Maximum possible image width.

MaxYsize: The same like above, only for the height.

ShowSmileys: 1 = on / 0 = off
             activate/deactivate the smiley on click function from the new entry dialog.
             
ShowOptions: 1 = on / 0 = off
             activate/deactivate the options from the new entry dialog.
             
ShowHelp: 1 = on / 0 = off
          activate/deactivate the help screen from the new entry dialog.
          
PreviewChecked: 1 = on / 0 = off
                enable/disable the preview button from the new entry dialog.
                
EmotionChecked: 1 = on / 0 = off
                enable/disable the emotion button from the new entry dialog.

NewDateOnEdit: 1 = on / 0 = off
               Normaly thx date from an edited entry becomes a new date, but you can disable it with this
               switch.
               
FixedTime: Value between -24 and +24
           Add or remove some hours from the servertime if your server reports the false time for your 
           timezone.

Adminpass: Just the administrationpassword. BE SURE THAT YOU CHANGE IT!!! The default password is "admin".

Moderatorpass: You can delegate some administration task like delete and edit entries to a moderator 
               if you enter a password here. Be sure that you don't want to use administrator and 
               moderator privileges on the same computer! If you want to do it anyway, set the parameter 
               cookielifetime = 0!<P>

AdminMail: Set your email address to get a mail if someone posts a new entry to your guestbook.

ModeratorMail: The same like above for the moderator.

Cookielifetime: Sets the time in seconds the cookie with the admin password should be valid.

DataPath: Change this path to specify a new location for the guestbook data. Be sure that the path 
          really exists!


Now you can change the layout from the guestbook if you rename any guestbook_xxxxx.css file into 
guestbook.css.

-------------------------------

Database cleaning:

If your database is REALLY hudge and you changed or deleted entries VERY often, start a database rebuild to
clean and compress the database. Be sure that you have enough storage on your account (databasesize * 2)!

-------------------------------

Indexfile rebuild:

If your indexfile gets destroyed you can rebuild it to save the datafile. Be sure that you make a backup 
first, because it can't do wonders! After rebuilding you can see some double entries if you edited as 
admin and don't cleaned the database very often. But it should be no problem to delete them with the
direct admin delete feature...

-------------------------------

Import CSV-files

CSV-files are ascii files which can be imported now. You can find an example within the admin directory
(example.csv) to see how such a file is structured. But don't ask me how you can get a CSV-file 
automatically!!! I don't know how and i don't have the time to it self for you...

-------------------------------

Signature file:

If you want to create a signature file which will be integrated into every administrator or moderator 
reply message, change signature.adm (administrator) / signature.mod (moderator) or create a new 
signature.adm/signature.mod file. Just delete signature.adm and signature.mod, to disable the feature.

-------------------------------

Smileys:

There is the possibility to add smileys by yourself. All you have to do is to open smileys.php with
an editor and add little pictures like you can see it in the file.

-------------------------------

Layout:

Change the layout with the help of the Cascading Style Sheet file (guestbook.css). Im to lazy to explain
how, so you have to try it or to read a little HTML book.
Are you are interested in a complete new skin? Ok, all you have to do is to copy all files from
layout/grey/*.* into the guestbook maindirectory and overwrite the existing files.
If you want to change the whole guestbook structur, be sure that you change the line "error_reporting(0);"
in guestbook.php to "#error_reporting(0);" to see all php error messages like parse errors. Now it is 
easier for you to fix little errors. Another fact you should know is, that header.html, body.html and 
foot.html are ONE html file. They get merged at runtime. If you want to be sure that you edited it right, 
just copy the three files all together and check if the result is a normal html file that would work with 
every standard browser. I say that, because i saw that some people created 3 standalone html files. May 
be this works with some browsers, but not with all.


Greetings:

- Special thx to Raimi who gave me with his lazyness the right motivation to make this script. :)
- my girlfriend
- my quasi daughter Sarah
- xxs from MTW - Mortal Teamwork, one of the best clans ever
- mac
- hetero
- Helge
- Ela


Achim Winkler            

