Ad Eagle Suite
Advertising Management Made Easy
 Home Overview FAQ Installation Users Guide Purchase
Free Version Free Trial Features Pricing Live Demo Requirements


Getting to know
Ad Eagle Suite

Ad Eagle Logo

Users Guide
Displaying Ads Within Other Scripts

There is a file included in the Ad Eagle Suite package called "include_ads.cgi". This is used for displaying ads within other programs. Please note: If you are using the JavaScript/IFrame code (recommended) to serve your ads none of this is necessary. You can simply place the Ad Eagle code in your templates or have it printed in the appropriate place in your scripts.

There are some differences in the include_ads.cgi file and the ads.cgi script, so trying to use the ads.cgi file for this purpose will likely cause you nothing but trouble (unless you are using IFrames in which case you do use ads.cgi).

The first thing you have to do to implement this feature is to add the following two lines somewhere within the script that you want to call banners in.

$location_of_ads = "/home/user/cgi-bin/ad-eagle/include_ads.cgi";
 
This must be the correct system path to the file. Then we tell the script to "require" it like so:

require "$location_of_ads";

Now, we have all we need to get the banners. The next step is tricky and we will use a fairly popular script as an example: Matt Wright's WWWBOARD script. This script has a routine called "return_html" that is the page a user views after they post a message. We can put banners in this generated page fairly easily. First, in the beginning of the routine we must indicate which rotation we want to use. So right after the line that begins the subroutine -->

sub return_html {

We put the following two lines:

my $rtn = "main";
my $bann = select_banner($rtn);


The line specifying the rotation is of course:

my $rtn="main";

And is set to whatever rotation you want to use.
The next line:

my $bann = select_banner($rtn);

actually grabs the banner info and places it in the variable $bann so that we can now have this print out into the generated page wherever we chose. So if your script looked something like this:

print "Content-type: text/html\n\n";
print "<html><head><title>Message Added: $subject</title></head>\n";
print "<body bgcolor=\"#FCEED6\" TEXT=\"#000000\" LINK=\"#A44B0F\" VLINK=\"#B88527\">\n";


adding the following line would make the banner appear at the top of the page, centered:

print "<center>$bann</center>";

The main thing here is that wherever you place the variable $bann is where your banner is going to appear.

Of course you can also just use the Non-SSI calls to display banners within generated pages.

For more complicated implementations please contact support and we will assist you.

Back to the Users Guide

 


Let Ad Eagle Suite serve your ads!

 

 

Home Overview FAQ Installation Users Guide Purchase
Free Version Free Trial Features Pricing Live Demo Requirements
    This site is a © production of Veinotte.com International, Inc.
Contact the Webmaster with questions or comments regarding this site.