Showing 9 ads now?

Discussion in 'Co-op Advertising Network' started by briandunning, Feb 15, 2006.

  1. #1
    Am I total lamer and missed some announcement? Many of my coop ads are now showing 9 ads instead of 5.
     
    briandunning, Feb 15, 2006 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    There is no option to show anything more than 5 ads. If you are seeing more than 5, I would get the PHP code again from the setup instructions and copy over whatever ad network PHP code you currently have.
     
    digitalpoint, Feb 15, 2006 IP
  3. briandunning

    briandunning Active Member

    Messages:
    262
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    98
    #3
    It's echoing it twice, the last & the first glued together in the middle so I thought it was 9 but it's really the same 5 twice. Code is correct, I tried flushing the txt file, double checked my code, still can't find the problem - will advise if I see anything. Weird it just started doing this yesterday, and not on every page.
     
    briandunning, Feb 15, 2006 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    The echo portion is outside of the ad_network PHP file. The ad_network PHP file generates a variable ($ad_network) which ultimately is echoed out on your end. You could double check that the $ad_network variable isn't being doubled up within the ad_network PHP file, by adding something unique to your echo statement... something along the lines of:
    echo $ad_network . 'Blah, blah, blah';
    PHP:
    Then you should be able to confirm what's going on by where the "Blah, blah, blah" is located within your ads.

    Either way, I'm guessing you are echoing out $ad_network twice somewhere. If you are too lazy to track down where, you could always
    unset ($ad_network);
    PHP:
    after you echo it, but that's just lazy. :)
     
    digitalpoint, Feb 15, 2006 IP
  5. briandunning

    briandunning Active Member

    Messages:
    262
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    98
    #5
    Look at the bottom of this page (the first link is my own static link):
    http://www.briandunning.com/magazines/

    Here is the code in my footer:

    <?php
    // Ad network
    ini_set("include_path", ini_get("include_path").':../:../../:../../../:../../../../');
    include('ad_network_212.php');
    echo $ad_network;
    ?>

    I'm boondoggled if I can find the problem - any chance that changing it from 168 to 212 is causing trouble? Never has before.

    Here is my working theory: a variable used by the ad network script has the same name as a variable that I'm using elsewhere on my pages, and it's coming into your script preloaded with an unexpected value. This happened once before if you remember, Shawn. I'll take a look and check it out.

    That wasn't it. I think I've narrowed it down though: it's only happening on shtml pages, and only since I moved from PowWeb to Rackspace. My headers and footers are PHP on all pages, but everything else in those docs works properly. Does this suggest any clever remedies to you?
     
    briandunning, Feb 15, 2006 IP
  6. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #6
    That actually was going to be my next question (if it happens only on SHTML pages). :)

    The end of the ad_network PHP script has an echo that only applies to .shtml pages. Just comment that out if you don't need it (if you are able to echo out a PHP script from within a .shtml page somehow).
     
    digitalpoint, Feb 15, 2006 IP
  7. briandunning

    briandunning Active Member

    Messages:
    262
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    98
    #7
    Dammy, can't believe I missed that. Thanks.
     
    briandunning, Feb 15, 2006 IP