I am using the Ad module for Drupal 6 (http://drupal.org/project/ad). I am wondering if I can make the ad changes automatically every 60 seconds even if the user doesn't refresh the page.
1
votes
You could certainly tweak it to work that way, but why? Isn't random better?
– ceejayoz
I want to keep it random. Now the ad changes only with the page refreshes, I want it to be changed randomly every 60 seconds (every 60 seconds a new add to be displayed)
– K.A.D.
Ah, that wasn't clear from your question. I've edited it to be more obvious what you'd like to do.
– ceejayoz
1 Answers
1
votes
Assuming you're using the JavaScript method of ad insertion, you'll notice that the Ad module adds a script to the page which fetches some code from a file named serve.php in the Ad module directory (so it's bypassing Drupal bootstrapping and such). Use Firebug and check out the Net tab, JS subtab to take a peek at this. Assuming you have the coding chops, you could add a bit of JavaScript to your theme or a custom module which basically removes the current ad and re-calls serve.php just like the Ad module's script does.