1
HarryB
Banner script that works for Google adsense
  • 2014/5/30 9:43

  • HarryB

  • Just popping in

  • Posts: 9

  • Since: 2013/12/30


Hi, I have been searching high and low, but can't get this to work. I have tried Javascript and PHP but still nothing. The problem: I'm using the xoops banner system and it works great, but I want to have a rotator script that can rotate different sizes of google ads too. Any advice?

2
HarryB
Re: Banner script that works for Google adsense
  • 2014/5/30 10:42

  • HarryB

  • Just popping in

  • Posts: 9

  • Since: 2013/12/30


Never mind. I found it. Add to a PHP block with adsense codes:

$random[] = '';

$random[] = '';

// ad more banners if you like

$random[] = '
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
'
;

$i rand(0count($random)-1);

3
HarryB
Re: Banner script that works for Google adsense
  • 2014/5/30 13:16

  • HarryB

  • Just popping in

  • Posts: 9

  • Since: 2013/12/30


And with this plugin for blocks anywhere, it made my day
http://www.xuups.com/modules/publisher/item.php?itemid=10

4
HarryB
Re: Banner script that works for Google adsense
  • 2014/5/30 13:22

  • HarryB

  • Just popping in

  • Posts: 9

  • Since: 2013/12/30


Forgot. Add to the PHP block:

echo $random[$i];

Login

Who's Online

306 user(s) are online (122 user(s) are browsing Support Forums)


Members: 0


Guests: 306


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits