PHP5 Users

Discussion in 'Co-op Advertising Network' started by digitalpoint, Jan 11, 2005.

  1. #1
    Nothing critical, but PHP5 changed how they handle the array_merge() function. If you are using PHP5 to serve ads, you will want to change this line in your ad_network.php file:
    if (count ($ads) > $ads_temp[3] + 1) $ads = array_merge ($ads[0], array_slice ($ads, -$ads_temp[3]));
    PHP:
    to this:
    if (count ($ads) > $ads_temp[3] + 1) $ads = array_merge ((array)$ads[0], (array)array_slice ($ads, -$ads_temp[3]));
    PHP:
    The setup instructions have been updated to reflect it, and it's backwardly compatible with PHP4.
     
    digitalpoint, Jan 11, 2005 IP
  2. SportsOutlaw

    SportsOutlaw Active Member

    Messages:
    952
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    70
    #2
    made the change, and thanks.

    But what would the result be if no change was made? No big deal, just curious.
     
    SportsOutlaw, Jan 11, 2005 IP
  3. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #3
    For non-vBulletin sites (vBulletin has good error trapping), it would cause ad_network_ads.txt file to be cleared out once in awhile.
     
    digitalpoint, Jan 11, 2005 IP
  4. flawebworks

    flawebworks Tech Services

    Messages:
    991
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    78
    #4
    Oh no! Not another update! ;) :D :eek: :p
     
    flawebworks, Jan 11, 2005 IP
  5. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #5
    It's minor... only needed for PHP5 users, and even then not a "must" have (but a good idea).
     
    digitalpoint, Jan 11, 2005 IP
  6. flawebworks

    flawebworks Tech Services

    Messages:
    991
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    78
    #6
    I was teasin; not whinin....
     
    flawebworks, Jan 11, 2005 IP
  7. SportsOutlaw

    SportsOutlaw Active Member

    Messages:
    952
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    70
    #7
    Thanks, Im a definate novice at all of this and always trying to understand and learn.
     
    SportsOutlaw, Jan 11, 2005 IP