Forums / Templates, Stylesheets, Page Layout / Banner System Number Assignments in Code

Banner System Number Assignments in Code

Results 1 to 8 of 8
25 Jun 2015, 13:26
#1
cyberfolli avatar

cyberfolli

New Zenner

Join Date:
Sep 2010
Posts:
64
Plugin Contributions:
0

Banner System Number Assignments in Code

Thank you in advance for taking the time to read or respond to this thread.

So I am trying to have 4 banners on the main page of my site.

1 2 3 4

each would take up 25% of the display on the page. I have Assigned 4 banners in the banner admin.

I have created Groups Front1 front2 Front3 Front4 in the banner Manager

This is where I am a little confused. The Code Below Shows Group Set 6 through 9 and a few of the banners show up except one.

What I Don't Understand is how the banners are assigned to the code numbers?

I went to Layout Settings in Configuration and where the banners are I changed the Verbage

Banner Display Groups - Footer Position 3 front3
Banner Display Groups - Side Box banner_box front2
Banner Display Groups - Side Box banner_box2 front1
Banner Display Group - Side Box banner_box_all front4


Again I don't understand how the numbers in the code are assigned to a specific group or how I can control those numbers. based on the groups and the banner assignments.


[HTML] <!--bof- banner #6 display -->
<?php
if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
if ($banner->RecordCount() > 0) {
?>

<div class="frontcontainer">
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
</div>
<?php
}
}
?>

<?php
if (SHOW_BANNERS_GROUP_SET7 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET7)) {
if ($banner->RecordCount() > 0) {
?>

<div class="frontcontainer">
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
</div>
<?php
}
}
?>

<?php
if (SHOW_BANNERS_GROUP_SET8 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET8)) {
if ($banner->RecordCount() > 0) {
?>

<div class="frontcontainer">
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
</div>
<?php
}
}
?>
<?php
if (SHOW_BANNERS_GROUP_SET5 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET5)) {
if ($banner->RecordCount() > 0) {
?>

<div class="frontcontainer">
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
</div>
<?php
}
}
?>
<!--eof- banner #6 display -->[/HTML]
25 Jun 2015, 14:31
#3
cyberfolli avatar

cyberfolli

New Zenner

Join Date:
Sep 2010
Posts:
64
Plugin Contributions:
0

Re: Banner System Number Assignments in Code

I am less concerned about the code since it is pretty straight forward and more about how the numbers are assigned in the manager .. What makes one banner a six and one a 3 if I assign a new "name" to a group etc. How do I find out where or what they are?
25 Jun 2015, 15:23
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Posts:
19,793
Plugin Contributions:
2

Re: Banner System Number Assignments in Code

I'm having a little trouble understanding the question.

You've created four banners in Banner Manager.

You've assigned the unique Group Names, Front1, Front2, Front3 and Front4 to the banners

You went to Admin - Configuration - Layout Settings and you've associated your created Group Names so:

Banner Display Groups - Footer Position 3 front3
Banner Display Groups - Side Box banner_box front2
Banner Display Groups - Side Box banner_box2 front1
Banner Display Group - Side Box banner_box_all front4

Which would place the Front3 banner below the footer, and the other three in sideboxes. Is that what you want, and exactly how isn't it working? (BTW, Group Names may be case-sensitive. I'm not sure.)
25 Jun 2015, 15:30
#5
cyberfolli avatar

cyberfolli

New Zenner

Join Date:
Sep 2010
Posts:
64
Plugin Contributions:
0

Re: Banner System Number Assignments in Code

Basically I want to be able to Place a Banner where I want to and I need to know how the [HTML]if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {[/HTML] is assigned in the database. it has nothing to do with footer or header it has more to do with I need to know how to Control Which banner shows up with which code.
25 Jun 2015, 18:27
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Banner System Number Assignments in Code

This FAQ article by Ajeh may help, as it gives the information you're asking for to identify how to call the content for each of those banner positions wherever you desire within your template: https://www.zen-cart.com/content.php?122-how-do-i-set-up-banner-ads
25 Jun 2015, 20:10
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Posts:
19,793
Plugin Contributions:
2

Re: Banner System Number Assignments in Code

Do you mean these?

Banner Display Groups - Header Position 1 Info
Banner Display Groups - Header Position 2 Info
Banner Display Groups - Header Position 3 Info
Banner Display Groups - Footer Position 1 Info
Banner Display Groups - Footer Position 2 Info
Banner Display Groups - Footer Position 3

Those positions are defined in the various tpl_files, and moving them is done by moving blocks of code in/among those files.

I'll recommend again that you take a look at http://stevesh.com/bannerdemo, and if it looks like anything resembling what you're trying to do, download the mod and look through the files and check the readme to see how I accomplished the layout.
26 Jun 2015, 13:51
#8
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Posts:
13,980
Plugin Contributions:
46

Re: Banner System Number Assignments in Code

In addition, if you're looking for the locations of those various banner positions, check out my blog posting (http://vinosdefrutastropicales.com/blog/?p=230) which illustrates where each of those banners live.