You are on page 1of 2

Laughland.biz AdManager 1.

Installation:

Step 1: Setting Up The Database

First create a new MySql database on your server. Call it say, “admanager”.
Then run the file admanager.sql through phpMyAdmin or suchlike to set up the tables.
Your database should now be set up.

If your host limits the number of mysql databases you can have, simply create the tables
in any existing database. Their names begin with “adman_” so hopefully this will
distinguish them from other tables in the database.

Step 2: Installing The Script

Open the file config.php in any text or html editor. The first four lines look something like
this:
$user = "";
$pass = "";
$host = "localhost";
$database = "admanager";

Change the contents of the qutotation marks to the access details required for your
MySql server. Save and close the file.

Just below these settings you will see this line:

$adpass = "admin";

This is your administration password. Change the contents of the quotation marks to
what ever you want.

Upload all the .php and .htm files to the directory on your server, where the script is to
reside. Make sure they are all in their correct sub- directories. Create an empty directory
called “images” in the same location.

The file admin.php can be put in a separate directory if you wish to password protect it. If
you do so, you MUST put a copy of the templates directory (and its contents) in the
same location.

Your script should now be ready to run.

Step 3: Using The Script

To add, edit or delete ads, or view statistics run the admin.php file in your browser.
To run this file enter the like this:

<path to script directory>/admin.php?adminpass=<yourpassword>

Replace <path to script directory> with the url to the script directory file on your server,
and <yourpassword> with the admin password you put in the configuration file.

To add advertisements to the database click on “Add”. This will display the Add form.
Simply fill in the details for the advertisement and click submit.

To edit or delete exisiting ads click on “edit” in the main menu. This will display the
images of all ads in the database. Use the update or delete options for the ad to be
changed to carry out these functions. The stats option will display current statistics or the
relevent ad.

On the add/update screens:


 Type indicates whether the add is an image or text/html

 For an image add fill in the link and the existing image or upload image boxes.
For a text/html ad paste the required code into the text/html box.

 Use the title box to enter the text to be displayed as a “tool tip” when a users
mouse pointer is over the image (Image ads only).

 The on/off options are used to determine whether the add will be displayed or
not.

Clicking on Stats on the main menu will display overall stats for all active
advertisements.

To display ads on your site you simply add a call to the adman.php file on your page,
where you want the add to appear. For .php pages use:

include(“pathto/adman.php”);

Where pathto is the full path to the adman.php file.

For non PHP pages you will need to use an <iframe> tag to display advertisements, like
this:

<iframe align="middle" frameborder="0" height="80" hspace="0"


src="pathto/adman.php" vspace="0" width="460"></iframe>

If you use this option make sure your ads are all the same height and width as you will
need to preset the height and width attributes , if the iframe tag, accordingly. Note:
iframe is not supported by all browsers and versions thereof.

You might also like