ad_network PHP File Update

Discussion in 'Co-op Advertising Network' started by digitalpoint, Mar 31, 2005.

  1. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #21
    Probably will need to get someone to do an ASP port of the new code if you want to continue using ASP. Maybe someone will do an ASP version that doesn't get most IPs blocked when they use it. ;)
     
    digitalpoint, Mar 31, 2005 IP
  2. Sal Collaziano

    Sal Collaziano Well-Known Member

    Messages:
    117
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    128
    #22
    This version is easier for newbies.. I like it..
     
    Sal Collaziano, Mar 31, 2005 IP
  3. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #23
    Gotta agree with that.
     
    noppid, Mar 31, 2005 IP
  4. Cygnus

    Cygnus Cat Herder

    Messages:
    172
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #24
    I managed to f* it up. :)

    The old version was working wonderfully on my HTML files -- now only the Digitalpoint ads show. Doh!

    So instead of the following in htaccess...

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} ^(.*)\.htm [NC,OR]
    RewriteCond %{REQUEST_FILENAME} ^(.*)\.html [NC]
    RewriteRule ^(.*) /passthru.php?file=$1
    </IfModule>


    I'm not a PHP guy...should I be changed the file string on the passthru?
     
    Cygnus, Mar 31, 2005 IP
  5. jema

    jema Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #25
    This change leaves me with 5 places to change for an enhancement I am not interested in, I'd much rather we had stablity, the system was working fine.
     
    jema, Mar 31, 2005 IP
  6. nfzgrld

    nfzgrld Peon

    Messages:
    524
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #26
    Actually, no, that's not what we're talking about. The problem is the <br> tags that show up between each ad in the html so you end up with:

    Ad1
    Ad2
    Ad3
    Ad4
    Ad5

    I don't want that. Most people don't want that. Me, I want this:

    Ad1 | Ad2 | Ad3 | Ad4 | Ad5

    This is how you do it:

    
    $ad_network = str_replace("<br>"," | ",$ad_network);
    echo "<whatever formating etc.>" . $ad_network . "</whatever>";
    
    Code (markup):
    I think what's happening are some people are confusing the words "formatting" and "layout". Formatting is pretty easy with a P or a DIV or a SPAN. But changing the layout of the ads requires editing the contents of the $as_network variable.
     
    nfzgrld, Mar 31, 2005 IP
  7. joeychgo

    joeychgo Notable Member

    Messages:
    3,368
    Likes Received:
    321
    Best Answers:
    0
    Trophy Points:
    255
    #27


    Mine dropped to 0 without updating. I just decided to validate first to see and I went to zero. Lets see what happens after I update
     
    joeychgo, Mar 31, 2005 IP
  8. Haichi

    Haichi Well-Known Member

    Messages:
    293
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    128
    #28
    first time updating since I was a newbie just months ago

    Question:

    keep in mind that I had to add the ads code to each of my pages manually
    about 2,000 of them :(

    Does this mean I have to do this again or I'm just changing the PHP file that hosted on my server

    thanks
     
    Haichi, Mar 31, 2005 IP
  9. Cartman

    Cartman Active Member

    Messages:
    354
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    88
    #29
    If I'm reading this all correctly, you're going to have to edit all of those pages to change it to reference $ad_network now. I'm holding off on this for the moment because of the formatting concerns people have been voicing. I have my ads displayed in an ordered list and now it sounds like it's going to use standard line breaks instead, unless you hack up the code a bit.
     
    Cartman, Mar 31, 2005 IP
  10. joeychgo

    joeychgo Notable Member

    Messages:
    3,368
    Likes Received:
    321
    Best Answers:
    0
    Trophy Points:
    255
    #30
    I dont see a problem with formatting.


    My weight came back after upgrading - but was 14k less ---


    Not to hijack the thread - are we going to drop the cap soon?
     
    joeychgo, Mar 31, 2005 IP
  11. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #31
    Or... you could make it easy on yourself and specify the spaces and pipe character on the setup screen. :)
     
    digitalpoint, Mar 31, 2005 IP
  12. fooey

    fooey Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #32
    I just updated my coldfusion tag to work with the new changes
    put it together quick so it's nothing pretty, but its working perfectly for me
    however, if it melts down your server don't blame me ;p

    Just stick the custom tag whever you want it, and it'll create the .txt cache file in the same directory by default

    call it using something like:
    
    <cfmodule
    	template="ad_network_212.cfm"
    	NumLinks = "5"
    	AdType = "TextLinks"
    	AdSeperator = " ">
    
    Code (markup):
    I use my own cache file layout because coldfusion can't use multi-character delimiters, so it's not going to work with anyone's pre-existing cache files and you'll have to delete it before using this

    if anyone has any questions or problems with it, lets get a new thread started and talk about it there
     

    Attached Files:

    fooey, Mar 31, 2005 IP
  13. Haichi

    Haichi Well-Known Member

    Messages:
    293
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    128
    #33
    thanks Cartman.

    I hardly got it to work the first time I will wait for the weekend when I am less sleepy to take this all in.

    make that 3,000 pages :(
     
    Haichi, Mar 31, 2005 IP
  14. nfzgrld

    nfzgrld Peon

    Messages:
    524
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #34
    Jeezus, I didn't even see that. That's what I get for having WAY too much to do! I knew I should have waited until tomorrow to do this. :eek:
     
    nfzgrld, Mar 31, 2005 IP
  15. Spacen

    Spacen Peon

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #35
    I got the email and this looks like a pretty cool update.

    I would like to request that the old code be allowed to work for a full two weeks. I leave the country tomorrow and I won't have time to update my site before I go but will be back in two weeks.

    If you need to move on before then I will understand as I am just one of thousands of sites in the network. I figured it wouldn't hurt to ask. :)
     
    Spacen, Mar 31, 2005 IP
  16. Christopher

    Christopher Peon

    Messages:
    482
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #36
    Absolutely one of the handiest programs ever made:

    http://www.funduc.com/search_replace.htm

    (no, I am not an affiliate).

    I had to make the change in about 250 pages, this program took care of it in one click, then I just uploaded the changed files. You just tell it what to look for and what to replace it with, and it searches through all the files and fixes them up. I forget what I paid for it, but it has been worth every penny.

    Tip: Put Shawn's new "include" code in a txt file. Name it dp.inc. Upload it to your main directory (or where the rest of the coop's code resides). Then include it on your pages with:

    <?
    include ('http://www.yoursitename.com/dp.inc');
    ?>

    In the future, you'll be able to just update that one file when the coop include code changes.

    I'm not a php expert, so if someone sees any unintended side effects from doing this let me know. It has worked well on my sites/server.
     
    Christopher, Mar 31, 2005 IP
  17. flyered

    flyered Peon

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #37
    Please can some gifted version do the ASP hack of this!
     
    flyered, Mar 31, 2005 IP
  18. iball73

    iball73 Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #38
    Just updated my site with no problems and no change in weight.
    Shawn
    When will the the reporting function be available?
    Cheers
    Ian
     
    iball73, Apr 1, 2005 IP
  19. jasonleexxx

    jasonleexxx Guest

    Messages:
    105
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #39
    That was painless. Thanks DP
     
    jasonleexxx, Apr 1, 2005 IP
  20. l234244

    l234244 Peon

    Messages:
    1,225
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    0
    #40
    For "Setup For .html/.htm Files Without A Footer File" version do we just add the new ad_network.php file and change the version number in passthru.php?
     
    l234244, Apr 1, 2005 IP