View Full Version : Question about GABS

02-29-2008, 08:59 AM

On my forum at present, I have two random banners showing at the bottom of everypage. >> LINK (http://www.doverlocals.co.uk).

Although it currently shows them at random, Im looking for a mod that will make each banner random.

EG (at present)

Banner one | Banner two
Banner three | Banner four
Banner five | Banner six

Im looking for it to do:(all random)

Banner five | Banner two
Banner six | Banner three
Banner four | Banner one

Will this be possible with GAB and will it be possible to keep the box which currently surrounds them?



03-02-2008, 04:39 AM
Untested but try editing the 'GAB - Fetch Forum Ads' plugin located at the global_start hook. Find:

$GAB_ads = $gab->fetch_ads();

Afterwards add the following:

function gab_shuffle(&$arr)
if (is_array($arr) && count($arr) > 1)
$keys = array_keys($arr);
$arr = array_combine($keys, $arr);

But as this is custom code, if it doesn't work, I won't offer further support for it. :eek: :)

03-02-2008, 02:41 PM
Thanks for your reply morgan.

I'll leave it for the time being as this is they only way ive got the ads on my site. Looks like a great mod though :)

03-17-2008, 11:54 PM
Before I purchase GABs, would anyone be kind enough to give the above a test for me please :)

If it works, it should show two random banners side by side in the advertising box!