Using one page to populate 100's using php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • cmoretti
    Sergeant

    • Jan 2009
    • 31

    Using one page to populate 100's using php

    I have used the "one menu" for every page using php method to create a header, a footer, and menu. I also want to use it for rotating site-wide ads.

    The problem I encounter is 1) the ads don't rotate 2) if I just have one ad with a link to a website, the links actually send me to websites from other ads on the page, other than the one I specified. I have rechecked and even looked at the html of the page and I am not seeing anything wrong. Is it that I am using a rotating ad?

    My home page is done differently since I charge different prices for the home page and those ads usually aren't site wide.

    I really need to find a way to put rotating ads site wide without having to edit page by page every time.


    Thanks
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: Using one page to populate 100's using php

    Please note that the "inclusion" code only ads a piece of code in your page.

    All teh rest depends on your own code.

    If the included code is the same, how can the link be different??

    Regarding the "rotation" : did you add the necessary Javscript in your pages ? do the images exist on the server ?
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • cmoretti
      Sergeant

      • Jan 2009
      • 31

      #3
      Re: Using one page to populate 100's using php

      Thanks for getting back to me Naval. I will clarify what I did.

      I created a page called banner_ad in the upper left corner I used blue vodas rotating ad button. I uploaded the file intervention-works-banner-ad.gif and put the address of the link. www.interventionworks.com I add another ad and link then publish the page as html.(if I do this directly on a page, like my home page, it works fine.)

      Then I go to the page I want the ad on. I add an html box where I want the ad placed and put the code <?php include 'banner_ad.html';?> then publish the page. The html on that page looks exactly the same as the html for the /banner_ad.html page.

      As you can see, the links are correct but when you click on the ad (with the include code) it goes to another website instead of the one I specified. It also doesn't rotate. Like I said, if I do the rotating ad directly on a page it works correctly but when i add the html to include another page with the rotating ad it doesn't.

      I checked the included html code against the html on /banner_ad.html and it is the same. the banner_ad.html page works perfectly but the page with the Include code doesn't.

      Any ideas?

      Edited to say that I have tried putting a rotating ad on other pages directly and the link goes to the correct website but the add doesn't rotate. There must be a conflict somewhere in the code on that page that keeps it from working.

      Comment

      • cmoretti
        Sergeant

        • Jan 2009
        • 31

        #4
        Re: Using one page to populate 100's using php

        I did get it to work. But only if there was one rotating ad on a page. I guess it just can't handle more than one which really sucks since I have so many pages and if someone gets a site wide ad the spots are limited.

        Comment

        • cmoretti
          Sergeant

          • Jan 2009
          • 31

          #5
          Re: Using one page to populate 100's using php

          What I have found is that when doing the "include" with a rotating ad, the html shows each include as "RotatingImage1" Whereas if you do more than one rotating ad on a page then they are "RotatingImage1, RotatingImage2, RotatingImage3" etc. so having more than one include would show more than one "RotatingImage1" on the page and I think it gets confused.

          Is there any way to directly edit the html? I would love to edit the source pages RotatingImage # so when the Include code is put on a page the RotatingImage # that comes from the source html is different then RotatingImage1.

          I can only find where to add html but not edit the original.

          Comment

          Working...
          X