By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,278 Members | 1,357 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,278 IT Pros & Developers. It's quick & easy.

Adding rotating ads to our PHP page

MoeRinging
P: 5
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?
Mar 2 '07 #1
Share this Question
Share on Google+
7 Replies


ronverdonk
Expert 2.5K+
P: 4,258
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:
Mar 2 '07 #2

MoeRinging
P: 5
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.mediaspanonline.com/inc.php?uri=/&bannerPositions=Leaderboard,Banner-Top,Banner-Bottom,Skyscraper,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?
Mar 2 '07 #3

ronverdonk
Expert 2.5K+
P: 4,258
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:
Mar 2 '07 #4

MoeRinging
P: 5
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.com/images/logo.jpg">
<a href="http://www.yourpaper.com/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
Mar 2 '07 #5

ronverdonk
Expert 2.5K+
P: 4,258
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:
Mar 2 '07 #6

MoeRinging
P: 5
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.mediaspanonline.com/class_composer_index.php[/PHP]

Is this what you mean?
Mar 2 '07 #7

ronverdonk
Expert 2.5K+
P: 4,258
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:
Mar 2 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.