Administration
  Home arrow Administration arrow Page 7 - Banner Management With phpAdsNew (Part One)
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ADMINISTRATION

Banner Management With phpAdsNew (Part One)
By: Harish Kamath
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 18
    2005-03-15


    Table of Contents:
  • Banner Management With phpAdsNew (Part One)
  • Getting Started
  • phpAdsNew Installation Wizard
  • phpAdsNew Administration Overview
  • Setting Up A Publisher
  • Setting Up An Advertiser
  • Putting It All Together
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Banner Management With phpAdsNew (Part One) - Putting It All Together
    ( Page 7 of 8 )

    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 Administration Articles          >>> More By Harish Kamath
     

       

    ADMINISTRATION ARTICLES

    - Network Booting via PXE: the Basics
    - Scalix: Linux Administrator`s Guide
    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT