Home arrow Site Administration arrow Page 7 - Banner Management With phpAdsNew (Part One)

Putting It All Together - Administration

One easy way to manage the display ads on your website is by using phpAdsNew. This first article shows you how to quickly set up phpAdsNew to suit your needs. Read on to find out how this simple tool can help you keep track of those revenue-producing ads and advertisers.

TABLE OF CONTENTS:
  1. Banner Management With phpAdsNew (Part One)
  2. Getting Started
  3. phpAdsNew Installation Wizard
  4. phpAdsNew Administration Overview
  5. Setting Up A Publisher
  6. Setting Up An Advertiser
  7. Putting It All Together
  8. Conclusion
By: Harish Kamath
Rating: starstarstarstarstar / 20
March 15, 2005

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

In the last two sections, I showed you how to create "publishers" and "advertisers." All that remains is get the two of them to "tango" together. Not surprisingly, this versatile tool provides several ways to integrate them.

Log on to phpAdsNew as a "publisher" - you could use your "administrator" credentials also - and navigate to the "Inventory" section. Here, you should view all the "zones" that you've created for this "publisher":

Click on the "Invocationcode" option to view the following:

you'll notice a drop down  that allows you select the type of "banner invocation" that you would like to use. For your current set-up in which you've installed phpAdsNew under the root folder of the website, the "Local mode" option is the best way to go as it requires a simple API call to display the banner.

Coming back to the "Invocationcode" Web form: here you'll notice that there are some parameters for which you need to provide values. The first is "Target frame" - set it to "_self" if you wish to display the target website in the same browser (not advisable) or "_blank" if you wish to open a new window (advisable).

Next, you have a set of radio buttons that allow you to set flags for various parameters, which control the banner(s) to be displayed for the current zone on the website. The parameters are pretty self-explanatory and I suggest that you leave them at their default values.

Click on the "Generate" button to generate the code snippet that you have to insert in the PHP scripts that drive your website. Take a peek at the following code listing that integrates the code snippet in a sample PHP script (say "index.php"):

<HTML>
<HEAD>
 <TITLE>My Site</TITLE>
 <BASEFONT face="Arial">
</HEAD>
<BODY>
<TABLE width="100%" border="2" cellpadding="10" cellspacing="0">
 <TR>
  <TD width="25%">
   LOGO
  </TD>
  <TD align="center" valign="middle">

  <?php
       if (@include(getenv('DOCUMENT_ROOT').'mysite/phpads/phpadsnew.inc.php')) {
           if (!isset($phpAds_context)) $phpAds_context = array();
           $phpAds_raw = view_raw ('zone:2', 0, '', '', '0', $phpAds_context);
           echo $phpAds_raw['html'];
       }
  ?>


  </TD> 
 </TR>
 <TR height="80%"`>
  <TD align="center" valign="center" colspan="2">
   Content comes here
  </TD>
 </TR> 
</TABLE>
</BODY>
</HTML>

Load this example in your browser to view the following output:

 

As you can see, this was pretty easy - just a simple cut-copy-paste operation was all that was required to integrate the two together. Yes, there is a lot more to the code snippet listed above, but I'll leave the gory details for later.

For the moment, you can bask in the glory of having successfully integrated this powerful banner management software with your website and laugh your way to the bank, when the dollars (from your paying advertisers) start rolling in!



 
 
>>> More Site Administration Articles          >>> More By Harish Kamath
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

SITE ADMINISTRATION ARTICLES

- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: