TalkPTC

The MarketPlace => Mods and Addons => Aurora Free Addons => Topic started by: fjworld on February 16, 2013, 07:30:38 PM

Title: [FREE] fjSnippet #7 - Display Multiple Banners v1.0
Post by: fjworld on February 16, 2013, 07:30:38 PM
Many site owners would like to display more than one standard size banner on a page.
The default code in an aurora base script needs to be modified so you do not get the same banner displayed.

The following example is a real easy way to get 2 different banners displayed on the same page.

Add one line of code to layout_header.pnp
Code: [Select]
if($showbanner == 1) {
$pagebanner648 = get_banner();
if($pagebanner648 == "") {
if($settings[banner_cr_rotate] == 1) {
$showcr=1;
}
}
$pagebanner648b = get_banner();
}



$pagebanner648b = get_banner();

The above line will fetch another banner and assign it to $pagebanner648b

Once you do that you can just add the following code where you want within your layout.php file.
Code: [Select]
<p><? echo $pagebanner648 . " " .  $pagebanner648b; ?></p>

In the above example you can see that 2 banner variables will be displayed.

You can view a working example below.
http://www.aurora-script.info/index.php?view=click&
 
The  default code will use one random banner so it is possible that both variable will have the same banner if you do not have many banners in circulation.
The code can be modified to avoid duplicates but for this version you should be able to follow what I have provided and maybe add your own customization.