Menu

Banner Ads

Help
2002-02-23
2002-07-17
  • Marie Alline

    Marie Alline - 2002-02-23

    Does anyone know how to get the banner ads to work?
    I have had lots of people request to exchange banners and have not been able to get them to show up anywhere. Anyone else have this problem?

    I have looked at the banner.php file and there is no documentation on the orginator of the module. In the newer CVS of phpwebsite you can choose to use them but on my site anyway they are not showing up anywhere and there are no instructions on using it.

    Any help would be very much appreciated.

    Thank you,
    Marie Alline

     
    • grim thing

      grim thing - 2002-06-04

      I'm having the same problem

       
    • Amgine Neilson

      Amgine Neilson - 2002-06-04

      It's not on my to-do list, Grimmy, but I'll see what I can come up with.

      Amgine

       
    • Verdon Vaillancourt

      Same with me. When I try to configure the banner admin settings a) to turn on, and b) IP address; it doesn't seem to take. I am able to create clients and banners.

      I'm using 8.2

       
    • James Smith

      James Smith - 2002-06-10

      I struggled with that one myself, I am not a programmer but managed to get it working by adding this right at the bottom of the header.php in the theme itself, sorry the code is a bit of a mess.:

      <?php
      include("config.php");

      $result = mysql_query("select banners from ".$table_prefix."flags");
      list($banners) = mysql_fetch_row($result);

      //if ($banners)
      //{
        /**
         * Banner ad inclusion.
         */
          include("banners.php");
          ?>

      <!-- End of header.php file -->

      I took out the "IF" out you will notice, their is no reference to banners in the main header or config file. I have it running at www.show-it.com, under early developement so no laughing..:)

      I am using banners to add random pics etc

      I hope this helps, with a bit of tweeking you could probably get it to appear where you wish..

      regards

      JamesMac

       
    • James Smith

      James Smith - 2002-06-10

      OR just change the existing code in the header.php in the theme to this:

      <?php
      #include("config.php");
      #$result = mysql_query("select banners from ".$table_prefix."flags");
      #list($banners) = mysql_fetch_row($result);

      //if ($banners)
      //{
        /**
         * Banner ad inclusion.
         */
          include("banners.php");
      //}

      I found though that the banners come in outside the page and push everything else down, thats why I put the code at the bottom.
      A cleaner way to do this would be to define the banner code in config.php, but I am not sure how to do this, perhaps a coder can help and with the wee page pushing problem

      JamesMac

       
    • James Smith

      James Smith - 2002-06-10

      Are you all in bed over there?..:)

      I managed to get this inside the theme at top left, with the logo or main picture on the right

      I practiced  with the vanilla theme looks.  I had to put another cell inside a table and reduce the size of the tables, works OK , but I am sure their must be easier ways to do thon bannering. The percentages will depend on the size of your banners etc, I don't know how this will look when I post it, the code is all over the place in the theme, but here goes: Just look for similar lines in the Vanilla theme and work from their:

      <!-- <img src="themes/career/img/btmleft.gif" width="19" height="19" alt="." border="0">-->
      &nbsp;
      </td>
          <td valign="top" width="80%">
              <table cellpadding="0" cellspacing="0" width="100%" border="0">
              <tr>
                  <td colspan="2" valign="top">
                      <table border="0" cellspacing="0" cellpadding="6" width="100%" summary="Data for Introduction">
                     
                      <tr><td valign="top" width="30%" align="right">
      <?php
      include("config.php");
      $result = mysql_query("select banners from ".$table_prefix."flags");
      list($banners) = mysql_fetch_row($result);
      include("banners.php");
      ?></td>
                          <td><img src="themes/<?php echo $theme_name?>/img/trans.gif" width="1" height="50" alt="." border="0" /></td>
                          <td valign="top" width="70%" class="titlebox-left" align="left">
                         
                          <img src="themes/<?php echo $theme_name?>/img/vanilla_logo.gif" border="0" align="top"
      alt="<?php echo $theme_logo_alt?>" /></td></tr>
      </table>

       
    • James Smith

      James Smith - 2002-06-10

      Working hard here..:)

      make sure you comment out the other call to the banner at the top of the theme  or you will get a re-declare error

       
      • Amgine Neilson

        Amgine Neilson - 2002-06-10

        Way cool ideas here, JamesMac! As soon as I get a chance I will be testing them out... Mind if I call on you here if I have troubles?

        Amgine

         
    • Kit Goins

      Kit Goins - 2002-07-09

      Visit this site: 

      http://www.myispnet.net/PHP

      I did about the same thing, but figured it out myself...what i did was about the same approach.
      (placed another <TD> in  the header file, then placed the code that was auto-inserted by the banner admin inside the new <TD>, afterwhich had to fool around with with its exact placement in the default theme.  I also changed the color sceme of the default theme.

       
    • Amgine Neilson

      Amgine Neilson - 2002-07-17

      Okay, I finally found some information regarding this.

      According to http://www.phpgirl.com the banners inclusion was removed from the main header.php to allow sites to choose to add banners in their themes (thus allowing some sites to have banner-free portal pages, nudge nudge.)

      To add the banner you will need to go into config.php and set $banner to 1. Then in the theme header.php you'll need to add the code

      include("config.php");
      $result = mysql_query("select banners from ".$table_prefix."flags");
      list($banners) = mysql_fetch_row($result);

      if ($banners)
      {
      include("banners.php");
      }

      Hope this works for everyone.

      Amgine

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.