Installation of Image Hosting System - Version 1.3.4
www.webmastersadvantage.com
support@webmastersadvantage.com

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

Thank you for purchasing the Image Hosting System from WebmastersAdvantage.com.

If you have problems with the installation, please contact us at the above e-mail address.

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

The ZIPPED file you received has 7 PHP files and 1 CSS file in the root (top-level) directory. These files are the basic layout for the site. The instructions.txt file (which you are reading) is also located in the root directory.

You will also see three directories:

/ihs/ - contains the primary components of the Image Hosting System
/imageadmin/ - contains the web pages for administration of your site
/images/ - an sample directory for where you should setup the system to upload images to

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

You will have to make some changes to the config.php file, located in the /ihs/ directory. You should first extract all file from the ZIP file into a directory on your local computer. Be sure to maintain the folder names when extracting the files.

You should create a new database (MySQL) on your server first. You may name the database whatever you wish, and you may create a new user to access the database, or use the default user if you are not able to create new users yourself. Write down the name of the new database, the user name, and the user password.

Locate the configX.php file. It is in the /ihs/ directory. Rename it to config.php. It has an 'X' in the name to prevent overwriting an existing config.php file when upgrading. Since you are installing, you do not have to worry about overwriting an existing file.

Open config.php in an editor. This config file has fields that you must set so that the system can access your database. In this file you also specify the maximum file upload size, and other image related values.

Setup your site information fields in the file:

	$site_logo - this field should be the location of a logo image, if you want to use a logo
	Example: $site_logo = "/graphics/mylogo.gif";

	$site_name - this field is the name of your site and will be used in the header if you do not enter a $site_logo
	Example: $site_name = "My Hosting Site";

	$support_email - your support email address
	Example: $support_email = "support@yoursite.com";

	$server_url - URL for your site, without a trailing '/'
	Example: $server_url = "http://www.yoursite.com";

Setup the image information:

	$max_file_size_kb - maximum file size allowed for upload, in KB
	Example: $max_file_size_kb = 125;

	$valid_mime_types - types of images you want to allow, listed by Mime type
	Example: $valid_mime_types = array("image/gif", "image/jpeg", "image/pjpeg", "image/png", "image/x-png");

	$valid_mime_types_display - this text will be displayed on the index.php and faq.php files and should match the $valid_mime_types values
	Example: $valid_mime_types_display = "JPEG, GIF, or PNG";

	$thumbnail_size_max - maximum size of thumbnails (both width and height) in pixels
	Example: $thumbnail_size_max = 150;

	$thumbnail_quality - quality of created thumbnails - higher number creates larger file sizes (1-100)
	Example: $thumbnail_quality = 75;

	$bandwidth_max - total amount of bandwidth (in KB) an image may use before being stopped
	Example: $bandwidth_max = 500000000;

Setup the server information:

	$server_root - root directory of your whole site
	Example: $server_root = "/var/www/html";

	$server_directory - directory of where you will install the image hosting system on your site
	Example: $server_directory = "/imagehosting";

	$server_save_directory - directory where images will be saved
	Example: $server_save_directory = $server_directory . "/images/";

Setup the database information:

Use the information you wrote down in one of the first steps. The $db_server will probably remain "localhost" unless your database is on a different server.

	$db_server = "localhost";
	$db_name = "database_name";
	$db_user = "database_user";
	$db_password = "database_password";

Transfer the files to your server with FTP. You may place them in any directory, but it should match where you specified in a previous step ($server_save_directory).

On your server, locate the htaccess.htaccess file in the /images directory and rename is to ".htaccess". After renaming, the file will no longer be visible (because it starts with a period). This is normal. This file tells the server to call the index.php file to display images, and the index.php file handles tracking image views through the database.

The /images directory must be "Writable" to the user ID that the web server runs under. On some servers, this user ID is the same user that owns the file. Other times, the files are owned by one user and the server runs on a different user. To make the /images directory writable for everyone, CHMOD the permissions of the file: "chmod 777 images". Only do the chmod if the server runs under a different name then who own the files. Don't know? Do the chmod later if the files will not save.

The final step is to create the tables in the database that the system uses to track images. Using the control panel for your MySQL database, enter the following three SQL statements:

CREATE TABLE `images` (`idx` bigint(20) NOT NULL auto_increment,`added` timestamp(14) NOT NULL,`email` varchar(150) NOT NULL default '',`filename` varchar(75) NOT NULL default '',`tn_filename` varchar(75) NOT NULL default '',`filepath` varchar(150) NOT NULL default '',`ip` varchar(25) NOT NULL default '',`filesize` bigint(20) NOT NULL default '0',KEY `idx` (`idx`)) TYPE=MyISAM;

CREATE TABLE `blocked` (`ip` varchar(25) NOT NULL default '') TYPE=MyISAM;

CREATE TABLE `imagehits` (`idx` bigint(20) NOT NULL auto_increment,`timestamp` timestamp(14) NOT NULL,`filename` varchar(200) NOT NULL default '',`referer` varchar(255) NOT NULL default '',`ip` varchar(15) NOT NULL default '',`kb` bigint(20) NOT NULL default '0',UNIQUE KEY `idx` (`idx`),KEY `filename` (`filename`)) TYPE=MyISAM;

Your site should now be ready to run. Using your web browser, go to http://www.yourserver.com/yourdirectory/ and you should see the upload page. Upload an image and verify that the image saves and is accessible. Also try going to http://www.yourserver.com/yourdirectory/imageadmin to try the control panel.

Note: You may want to secure the /imageadmin/ directory using your control panel for the server.

If you have problems, please contact us at the email address or website at the top of these instructions.