AbleDesign - Programs
Programs > Banner Simple
Description:
Banner Simple is pretty much what it sounds like: a very simple banner rotation program. No fancy administration area, campaigns, or logging and statistics. Just a very fast, efficient, and easy to set up and operate program for people who want to randomly rotate banners and not worry about all the frivolous stuff and perpetual bug squashing.
Banner Simple's major limiting feature at present is that banner files are identified by the size (width x height; in pixels) of banners they contain. For example, the common 468x60 banners would go in a file named mybanner_468x60.txt. Similarly, 100x60 banners would go in mybanner_100x60.txt. Why is this a limiting factor? Well, it means banners of different sizes -- such as slightly different heights for a border tile placement -- cannot go in the same rotation.
Directions for use:
Simply copy the code at the bottom of this page into a .php page. You may name it anything you wish (something like banner.php will be fine). Any page that you wish to include the banner rotation on will then call banner.php, or whatever you named it, such as:
<?php
include("/banner.php");
echo get_banner("468x60");
?>
Only include banner.php once per page, but you may call the get_banner() function as many times per page as you wish. Just specify which banner file (by width x height) is being called.
To set up the files which will contain your banners (i.e. mybanner_468x60.txt), create a blank text file and add the following for line 1:
# URL | target="_blank" (1 = Yes, 0 = No) | off-site image (1 = Yes, 0 = No) | image | Alt text
Pay attention to the order of the fields between the pipes (|), as that is the same order each of your banners must follow.