clixew"

Author Topic: [FREE] fjSnippet #7 - Display Multiple Banners v1.0  (Read 1741 times)

0 Members and 1 Guest are viewing this topic.

  • Business Owner
  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 439
  • Karma: +45/-39
  • Lets Work Together
  • Referrals: 5
    • Revenue Sharing Program
[FREE] fjSnippet #7 - Display Multiple Banners v1.0
« 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.
« Last Edit: February 19, 2013, 04:12:31 PM by fjworld »



 

advertise here