vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Google Adsense and Yahoo Publisher on same forum... How? (https://vborg.vbsupport.ru/showthread.php?t=112991)

Sal Collaziano 04-14-2006 12:26 PM

Google Adsense and Yahoo Publisher on same forum... How?
 
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. I use it on my site, it's pretty easy to set up and works great.

Sal Collaziano 04-14-2006 01:40 PM

Quote:

Originally Posted by amykhar
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

Quote:

Originally Posted by Sal Collaziano
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:

Code:

$randomads = rand(1,2); //Display Google(1) or Yahoo (2)
Then I added this to my templates:
Code:

<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

Quote:

Originally Posted by Sal Collaziano (Post 1384644)
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.


All times are GMT. The time now is 06:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01119 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete