Adding rotating ads to our PHP page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MoeRinging
    New Member
    • Mar 2007
    • 4

    #1

    Adding rotating ads to our PHP page

    Hi all,
    I am very ignorant when it comes to CSS, PHP, Java so I need some serious help here.
    We recently changed CMS's and this new CMS provides us access to all of our code, when in the past we all created work orders and someone else did all the coding for us. So please excuse me. Our site needs a lot but the revenue generating pages are first priority.
    Our classifieds are PHP and I want to place ads on these pages but I'm not sure how to do so. In our CMS, there are themes and the PHP pages use these themes. Will I have to go in there and update the ads manually or is there a code I can use so the same rotating ads that are on all the other pages can rotate on the php pages too?

    Can anyone help me with this issue?
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Main question for me is: what is the format of these ads. Are they text, images, both? And how are they placed on the screen, i.e. using html <div>, <img> or dynamically via the DOM? Your website doesn't make me any wiser on this.

    Anyway, to rotate the display of the messages using a programmed delay, you'll have to use JavaScript.

    Ronald :cool:

    Comment

    • MoeRinging
      New Member
      • Mar 2007
      • 4

      #3
      Originally posted by ronverdonk
      Main question for me is: what is the format of these ads. Are they text, images, both? And how are they placed on the screen, i.e. using html <div>, <img> or dynamically via the DOM? Your website doesn't make me any wiser on this.

      Anyway, to rotate the display of the messages using a programmed delay, you'll have to use JavaScript.

      Ronald :cool:

      The ads are placed in an interface that is already programmed for placement. When I read the code it looks like the ads are writen in java in my header. This is what I see:

      <script type="text/javascript" src="http://orp.php.mediasp anonline.com/inc.php?uri=/&bannerPosition s=Leaderboard,B anner-Top,Banner-Bottom,Skyscrap er,Island,Tile-Right-1,Tile-Right-2,Tile-Right-3,Tile-Right-4,Tile-Right-5,Tile-Right-6,Tile-Right-7,Tile-Right-8,Tile-Right-9,Tile-Right-10"></script>

      Yes, I know that's java and I asked in the PHP forum but here's why. Why does that java work on every page except the PHP pages?
      Is there a script I can use on a PHP page?

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        Keep in mind: Java is NOT JavaScript! Not even similar.
        And what you show is JavaScript.

        PHP is a server side language and JavaScript is a client side language. I.e. PHP runs on the server and JavaScript (along with the html) runs on the user's client pc.
        PHP constructs html (and JS) code and sends it to the client for processing by the client's browser.

        So the question is not whether JS can run in a PHP page, but if PHP constrcuts the JS code to be executed.

        If this is all too complicated: show us the PHP page that you refer to.
        And do it within php or code tags!! See the Posting Guidelines on this.

        Ronald :cool:

        Comment

        • MoeRinging
          New Member
          • Mar 2007
          • 4

          #5
          Originally posted by ronverdonk
          Keep in mind: Java is NOT JavaScript! Not even similar.
          And what you show is JavaScript.

          PHP is a server side language and JavaScript is a client side language. I.e. PHP runs on the server and JavaScript (along with the html) runs on the user's client pc.
          PHP constructs html (and JS) code and sends it to the client for processing by the client's browser.

          So the question is not whether JS can run in a PHP page, but if PHP constrcuts the JS code to be executed.

          If this is all too complicated: show us the PHP page that you refer to.
          And do it within php or code tags!! See the Posting Guidelines on this.

          Ronald :cool:


          Ronald,
          Thanks for being so patient!

          I am so embarrassed to share my code because its such a mess.
          Do you want all the code from the theme page that is in the CMS? When I click on the theme, it is broken down into parts: the ref stylesheet link, HTML head, HTML body, then theres a body content area that isnt editable, its just a solid area, then HTML body again, then my blocks area and finally a note at the bottom that says:
          Important Note: All images/links must be complete URL's. For example:
          <a href="http://www.yourpaper.c om/images/logo.jpg">
          <a href="http://www.yourpaper.c om/index.php>

          Do you want the code from all the HTML parts in the theme?
          Oh my... I have a such a mess here. It's so confusing for me.

          So sorry,
          Monique

          Comment

          • ronverdonk
            Recognized Expert Specialist
            • Jul 2006
            • 4259

            #6
            No no, do not show all the code!
            Just the PHP page of which you said that it did not show the ads.

            Ronald :cool:

            Comment

            • MoeRinging
              New Member
              • Mar 2007
              • 4

              #7
              Originally posted by ronverdonk
              No no, do not show all the code!
              Just the PHP page of which you said that it did not show the ads.

              Ronald :cool:

              Oh, I thought I did that in the very first post. My bad. I used the link button.

              [PHP]http://orp.php.mediasp anonline.com/class_composer_ index.php[/PHP]

              Is this what you mean?

              Comment

              • ronverdonk
                Recognized Expert Specialist
                • Jul 2006
                • 4259

                #8
                No it is not. What you show is the client's result page. I saw that already in your first post.

                What you'll have to show is the php source code that generates that page, but does not show the rotating ads.

                Ronald :cool:

                Comment

                Working...