Fade-In Slideshow Script
Text Ad Script
Lead Follow-Up Database Script
Address Book Script
AdFreely -Ad Board Script-
URL Shortening Script
Ajax Poll Script
Contact Us Script
Life Insurance Quotes Request Form Script
Real Estate Contact Form Script
Protect HTML Script

Installation Guide

This page will explain how to install AdFreely -Ad Board Script- v1.01

Step 1 Unzipping the downloaded file
After you download the script, unzip it. You will find a folder named web. You will use this folder in later steps.

Step 2 Setting up database configurations
Open web/config/config.db.inc.php in a text editor and find the following code :

define( 'DB_HOSTNAME', 'Your Hostname Here' );
define( 'DB_DATABASE', 'Your Database Name Here' );
define( 'DB_USERNAME', 'Your Username Here' );
define( 'DB_PASSWORD', 'Your Password Here' );
Please replace the highlighted text with your Hostname, Database, Username, and Password.

About Hostname, Database, Username, and Password.
If you have installed any scripts that use MySQL, it may be ultra-easy for you to figure out what those values are. If this is the first time, however, you may be scratching your head or pulling your hair out ( or maybe both? )

Don't feel bad. This step is truely a pitfall that we have all fallen into at least once.

First, slow down, relax, and take your time. All other steps are easy and this is the only step where you need to think a little longer...

Here is a page where I explained each of them in more details. The page will help you figure out what Hostname, Database, Username, and Password are. Check it out!

Save web/config/config.db.inc.php.

Step 3 Setting up the script path
If you plan to upload the script folder to your web site without renaming it, you can skip this step.

If you plan to rename it, follow the instruction below.
Open config/config.ad_pic.inc.php in a text editor. Find the following line:

//-- The URL of this script folder
define( 'URL_SCRIPT_ROOT', '/web/' );
Currently, it is assumed that the name of script folder is "web" and placed on the root folder of you web site. If you are going to rename the script folder, you need to modify the line above. For example, if you are going to change the script folder name from "web" to "myfolder" change the line like shown below:
//-- The URL of this script folder
define( 'URL_SCRIPT_ROOT', '/myfolder/' );
Save the file.

Step 4 Uploading script to your website
Upload the web folder to your web site. You can rename the web folder name to any name you want. In this guide, we assume you didn't change the folder name.

Step 5 Running the installation script
Open web/install/index.php in your browser and click Setup button. After finishing the installation script, remove web/install folder to avoid a security risk.

Step 6 Checking sample ad pages
Open web/adpages/page1.php in your browser or web/adpages/page2.php. These are ad pages that visitors can freely post their ads. Try it!

Step 7 Logging in to the admin panel
Open web/staff/index.php in your browser. This is the admin panel where you can search, view, edit, and delete cells for ads. Enter admin and password for the username and password, respectively.

Step 8 Create an ad page
To create an ad page, copy web/adpages/page1.php and rename it as you like. As long as it stays in /web/adpages/ folder, no more configurations are necessary. If you want to place your ad page outside web/adpages/ folder, open your ad page in a text editor, and find the following line:

<?php require( dirname(__FILE__) . '/../cell/cell.inc.php' ); ?>
The line above loads web/cell/cell.inc.php If you move your ad page out of the folder (web/adpages/), this line no longer works because it uses a relative path to refer to web/cell/cell.inc.php. You need to adjust the path so that your ad page can refer to /cell/cell.inc.php correctly.

Step 9 Add an ad cell to your ad page
Log in the admin area (web/staff/index.php) and click Cell from the top menu. Click Add and enter a new ad id to the Ad ID text box. You can enter any string to Ad ID as long as it has not been used before. Save the form.

Let's suppose your ad id is "Z001". Open your ad page and type the following php code at the location where you want the ad cell to appear.

<?php Cell( 'Z001' ); ?>
Open your ad page in a browser and you will see "Your Ad Here!" message on a gray box. Now you successfully created a new ad cell.

That's it! Have a fun!