PDA

View Full Version : Google Adsense and Yahoo Publisher on same forum... How?


Sal Collaziano
04-14-2006, 12:26 PM
Hey. I noticed that on http://forums.digitalpoint.com/ - they're using both Adsense and YPN on the same pages - however, there's some type of rotation that changes the template so that ONLY one type is being used at a time. This keeps things legal by not having both types on the same page at the same time...

Does anyone here know how to accomplish that? I think it's a great idea to use both because both networks have different ads and it gives a forum more variety...

Thanks in advance...

amykhar
04-14-2006, 12:43 PM
I would have a random number generator in the global start template. Then, in conditionals, I would check the value of that number. If it's even, I would show all google ads. If it's odd, I would show yahoo. That way, you control which type is shown throughout the page.

dilbert
04-14-2006, 12:50 PM
For those of us a little more programming challenged (me :cool:) there's always phpAdsNew (http://phpadsnew.com/two/). I use it on my site, it's pretty easy to set up and works great.

Sal Collaziano
04-14-2006, 01:40 PM
I would have a random number generator in the global start template. Then, in conditionals, I would check the value of that number. If it's even, I would show all google ads. If it's odd, I would show yahoo. That way, you control which type is shown throughout the page.

Would $25 to your PayPal account get me some code? :p

Was my offer bad? :o

dilbert
04-14-2006, 10:59 PM
Would $25 to your PayPal account get me some code? :p

Was my offer bad? :o
I think it was fine, but not everyone wants to be hired.
Take a look at phpadsnew like I said, it's easy to use and will do exactly what you are looking for.

Adyum
04-14-2006, 11:38 PM
You should use phpAdsnew you can set that it uses the same ad on the same page it is displayed. EX

If Yahoo is in 1 of the spots then it will go in all of the spots.

GotVtec
11-17-2007, 09:28 PM
I have attempted to do this. I added the code to my global.php file:

$randomads = rand(1,2); //Display Google(1) or Yahoo (2)

Then I added this to my templates:
<if condition="$randomads == 1">
//Show Google Ads
<else />
//Show Yahoo Ads
</if>

But, I still get both displayed in my forums: http://www.v6performance.net/forums/

It seems as if the ones in under each forum, are always defaulted to 2.

Sal Collaziano
11-17-2007, 10:23 PM
phpAdsNew2 (or now it's called OpenAds) is the best way to go. It's free and Very robust - though a bit complicated...

GotVtec
11-17-2007, 10:50 PM
phpAdsNew2 (or now it's called OpenAds) is the best way to go. It's free and Very robust - though a bit complicated...

I am currently using the previous version. But I don't think that has options for Google Adsense and Yahoo Publisher.