
HOW TO INSTALL:
===============

Step 1: Create the MySQL database.
----------------------------------
First of all, you must create in MySQL the following tables:

CREATE TABLE bunghole_links (
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
title VARCHAR(80),
url VARCHAR(160),
date_added DATE,
category VARCHAR(30),
description VARCHAR(255),
contact_name VARCHAR(40),
contact_email VARCHAR(40),
hits INT NOT NULL DEFAULT 0,
is_new TINYINT NOT NULL DEFAULT 0,
is_cool TINYINT NOT NULL DEFAULT 0,
rating INT,
votes INT,
is_best TINYINT NOT NULL DEFAULT 0
);

CREATE TABLE bunghole_validation (
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
action ENUM('validation', 'modification'),
oldid INT,
title VARCHAR(80),
url VARCHAR(160),
category VARCHAR(30),
description VARCHAR(255),
contact_name VARCHAR(40),
contact_email VARCHAR(40)
);

CREATE TABLE bunghole_newsletter (
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
name VARCHAR(40),
contact_email VARCHAR(40),
status ENUM('ok', 'subscribe', 'unsubscribe'),
req_key INT
);

Step 2: Change common.php3
--------------------------
You need to change the function connect_to_db();

Replase "username", "password" and "database" with the values that represent
the real data.

Furthermore, you should change the $webmaster variable to your e-mail adress
which is just above connect_to_db().

Step 3: Insert sample database
------------------------------
A sample database with 300 links exists in db.txt. These are about 300 links from
the real Bunghole database. For protection of personal data, all e-mail adresses
have been replaced.

In order to insert them, simply open your browser and view transform.php3. The
job will be done automaticly.

Step 4: Change modes
--------------------
Make sure data and backup directories have full access (chmod 777).

Step 5: Change MIME type
--------------------
In the .htaccess included, the MIME type of .html files is changed to
application/x-httpd-php. This will do the neccessary changes for Apache using the
AddHandler directive (if you have PHP 3 installed, change the mime type to
application/x-httpd-php3).

If using Apache, it must allow .htaccess files. Relevant changes are needed in
other web servers. A different way is to name all .html as .php (or .php3) files.

AND THERE YOU ARE!!! Simply now, view index.html :)