Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / How do I force banners to stay at foot of page?

How do I force banners to stay at foot of page?

Started by moggi1964 on 12 May 2011, 6:55 PM · Views: 933

Results 1 to 12 of 12
12 May 2011, 6:55 PM
#1
moggi1964 avatar

moggi1964

New Zenner

Join Date:
Mar 2009
Location:
New Jersey USA
Posts:
67
Plugin Contributions:
0

Post #1 by moggi1964

I have some banners running at the bottom of the page but they float up when I change to a different page. I want them to stay at the bottom no matter what the page.

I searched but couldn't find an answer that dealt with this problem.

I am running 1.39h on the Cherry Zen Template with only Stock by Attributes as an addon.

Website in signature.

Banners are in Wide_Banner.

Morris Bagnall
Owner
http://astrolaugh.com

12 May 2011, 7:24 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #2 by kobra

Use banner six versus banner four position

Zen-Venom Get Bitten

12 May 2011, 7:29 PM
#3
moggi1964 avatar

moggi1964

New Zenner

Join Date:
Mar 2009
Location:
New Jersey USA
Posts:
67
Plugin Contributions:
0

Post #3 by moggi1964

Simple as that, eh!

:hug:

Thanks kobra

Morris Bagnall
Owner
http://astrolaugh.com

12 May 2011, 7:44 PM
#4
moggi1964 avatar

moggi1964

New Zenner

Join Date:
Mar 2009
Location:
New Jersey USA
Posts:
67
Plugin Contributions:
0

Post #4 by moggi1964

So I butchered the code for Banner 4 and now I have no banners showing :oops:

Here is what the code looks like now:

<?php /** * Common Template - tpl_main_page.php * * Governs the overall layout of an entire page<br /> * Normally consisting of a header, left side column. center column. right side column and footer<br /> * For customizing, this file can be copied to /templates/your_template_dir/pagename<br /> * example: to override the privacy page<br /> * - make a directory /templates/my_template/privacy<br /> * - copy /templates/templates_defaults/common/tpl_main_page.php to /templates/my_template/privacy/tpl_main_page.php<br /> * <br /> * to override the global settings and turn off columns un-comment the lines below for the correct column to turn off<br /> * to turn off the header and/or footer uncomment the lines below<br /> * Note: header can be disabled in the tpl_header.php<br /> * Note: footer can be disabled in the tpl_footer.php<br /> * <br /> * $flag_disable_header = true;<br /> * $flag_disable_left = true;<br /> * $flag_disable_right = true;<br /> * $flag_disable_footer = true;<br /> * <br /> * // example to not display right column on main page when Always Show Categories is OFF<br /> * <br /> * if ($current_page_base == 'index' and $cPath == '') {<br /> * $flag_disable_right = true;<br /> * }<br /> * <br /> * example to not display right column on main page when Always Show Categories is ON and set to categories_id 3<br /> * <br /> * if ($current_page_base == 'index' and $cPath == '' or $cPath == '3') {<br /> * $flag_disable_right = true;<br /> * }<br /> * * @package templateSystem * @copyright Copyright 2003-2007 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: tpl_main_page.php 7085 2007-09-22 04:56:31Z ajeh $ */ // the following IF statement can be duplicated/modified as needed to set additional flags if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) { $flag_disable_right = true; } $header_template = 'tpl_header.php'; $footer_template = 'tpl_footer.php'; $left_column_file = 'column_left.php'; $right_column_file = 'column_right.php'; $body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']); ?> <body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>> <?php if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerOne" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?> <?php /** * prepares and displays header output * */ if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) { $flag_disable_header = true; } require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?> <div id="contentMainWrapper"> <div id="contentMainWrapperb"> <div class="outer"> <div class="inner"> <div class="float-wrap"> <div id="content"> <div class="contentWrap"> <?php // Display all header alerts via messageStack: if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) { echo htmlspecialchars(urldecode($_GET['error_message'])); } if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) { echo htmlspecialchars($_GET['info_message']); } else {

}
?>
<!-- bof breadcrumb -->

<?php if (DEFINE_BREADCRUMB_STATUS == '1' && ($current_page!='index' || (int)$cPath>0 )) { ?> <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div> <?php } ?> <!-- eof breadcrumb -->
            <?php

if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php } } ?>
<!-- bof upload alerts -->
<?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?>
<!-- eof upload alerts -->
<?php
/**

  • prepares and displays center column

*/
require($body_code);

if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {
if ($banner->RecordCount() > 0) {
//echo $banner->RecordCount();
?>
</div>
<!--<end contentWrap> -->
</div>
<!-- end content-->

<?php if (COLUMN_LEFT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) { // global disable of column_left $flag_disable_left = true; } if (!isset($flag_disable_left) || !$flag_disable_left) { ?>
        <div id="navColumnOne" class="columnLeft" style="width: <?php echo COLUMN_WIDTH_LEFT; ?>">
          <?php

/**

  • prepares and displays left column sideboxes

*/
?>
<div id="navColumnOneWrapper" style="width: <?php echo BOX_WIDTH_LEFT; ?>">
<?php require(DIR_WS_MODULES . zen_get_module_directory('column_left.php')); ?>
</div>
</div>

        <!-- end left div -->
                  <?php

}
?>
<div class="clearBoth"></div>
</div>
<!-- end float-wrap -->

<?php if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) { // global disable of column_right $flag_disable_right = true; } if (!isset($flag_disable_right) || !$flag_disable_right) { ?>
      <div id="navColumnTwo" class="columnRight" style="width: <?php echo COLUMN_WIDTH_RIGHT; ?>">
        <?php

/**

  • prepares and displays right column sideboxes

*/
?>
<div id="navColumnTwoWrapper" style="width: <?php echo BOX_WIDTH_RIGHT; ?>">
<?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?>
</div>
</div>

      <!-- end right div -->
      <?php

}
?>

      <div class="clearBoth"></div>
    </div>
    <!-- end inner -->
  </div>
  <!-- end outer -->
</div>
<!-- end ContentMainwrapper -->
</div> <!-- end ContentMainwrapperb --> <?php /** * prepares and displays footer output * */ if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) { $flag_disable_footer = true; } require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');?> <!-- end mainWrapper --> <?php if (DISPLAY_PAGE_PARSE_TIME == 'true') { ?> <!--bof- parse time display --> <div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div> <!--eof- parse time display --> <?php } ?> <?php if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) { if ($banner->RecordCount() > 0) { ?> <? $new_banner_search=zen_build_banners_group( SHOW_BANNERS_GROUP_SET6); ?> <? $sql=mysql_query("select banners_id, banners_title, banners_image, banners_html_text, banners_open_new_windows, banners_url from " . TABLE_BANNERS . " where status = 1 " . $new_banner_search . $my_banner_filter . " "); ?> <div id="bannerSix" class="banners" style=" text-align:center;"><table border="0" cellspacing="5" cellpadding="5" align="center"> <? while($row=mysql_fetch_array($sql)) { $count=$count+1; if($count==5) { echo "<tr>"; } if (zen_not_null($row['banners_html_text'])) { $banner_string = $row['banners_html_text']; } else { if ($row['banners_url'] == '') { $banner_string = zen_image(DIR_WS_IMAGES . $row['banners_image'], $row['banners_title']); } else { if ($row['banners_open_new_windows'] == '1') { $banner_string = '<a href="' . zen_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $row['banners_id']) . '" target="_blank">' . zen_image(DIR_WS_IMAGES . $row['banners_image'], $row['banners_title']) . '</a>'; } else { $banner_string = '<a href="' . zen_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $row['banners_id']) . '">' . zen_image(DIR_WS_IMAGES . $row['banners_image'], $row['banners_title']) . '</a>'; } } }
if($count>1)
{
$style=' padding-left:125px;';
}
echo "<td style='$style'>".$banner_string."</td>";

if($count==5)
  {
  echo "<tr>";
  $count==0;
  }

}
?>

</table>
     <?php //echo zen_display_banner('static', $banner); ?></div>
      <?php
}

}

/*echo '<div id="linkbottom">';
include("/home/astrolau/public_html/includes/languages/english/html_includes/define_bottom_links.php");

echo'</div>';*/

?>

          </div>
          <!--<end contentWrap> -->
        </div>
        <!-- end content-->
<?php } } ?> </body>

Your wisdom is appreciated and will offset my complete lack of knowledge and return the world to a state of equilibrium!

Morris Bagnall
Owner
http://astrolaugh.com

12 May 2011, 8:30 PM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #5 by kobra

So I butchered the code for Banner 4

Banners are in Wide_Banner
Ack!!
Restore original code base

admin > config > layout settings > Banner Display Groups - Footer Position 3 > Wide-Banners

Zen-Venom Get Bitten

12 May 2011, 10:18 PM
#6
moggi1964 avatar

moggi1964

New Zenner

Join Date:
Mar 2009
Location:
New Jersey USA
Posts:
67
Plugin Contributions:
0

Post #6 by moggi1964

Okay,

so I put the old file back and turned on Footer 3 Wide-Banners and all that did was throw an extra Authorize.net logo in the bottom corner off the main page and the existing logo's still did not move.

I'm missing something aren't I :dontgetit:dontgetit

Morris Bagnall
Owner
http://astrolaugh.com

13 May 2011, 1:43 AM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #7 by kobra

Remove wide banners in the setting I referenced

Zen-Venom Get Bitten

13 May 2011, 12:15 PM
#8
moggi1964 avatar

moggi1964

New Zenner

Join Date:
Mar 2009
Location:
New Jersey USA
Posts:
67
Plugin Contributions:
0

Post #8 by moggi1964

kobra:

Remove wide banners in the setting I referenced

Currently I only have Wide-Banners set in Footer Position 1. :dontgetit

Morris Bagnall
Owner
http://astrolaugh.com

13 May 2011, 5:23 PM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #9 by kobra

moggi1964:

Currently I only have Wide-Banners set in Footer Position 1.
Remove this and set to
kobra:

admin > config > layout settings > Banner Display Groups - Footer Position 3 > Wide-Banners

Zen-Venom Get Bitten

13 May 2011, 5:26 PM
#10
moggi1964 avatar

moggi1964

New Zenner

Join Date:
Mar 2009
Location:
New Jersey USA
Posts:
67
Plugin Contributions:
0

Post #10 by moggi1964

I tried that and all the logo's disappear :shocking:

Take a look (I left it on for now).

Actually that isn't entirely true, the Site 5 logo drops off the bottom of the page.

Morris Bagnall
Owner
http://astrolaugh.com

13 May 2011, 5:41 PM
#11
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #11 by kobra

Ypu have a powered by site 5 banner enabled in that position

Zen-Venom Get Bitten

13 May 2011, 5:54 PM
#12
moggi1964 avatar

moggi1964

New Zenner

Join Date:
Mar 2009
Location:
New Jersey USA
Posts:
67
Plugin Contributions:
0

Post #12 by moggi1964

kobra:

Ypu have a powered by site 5 banner enabled in that position

That is what is confusing me.

I would have thought that if Site5 is in Wide-Banners and so are Paypal/Digicert and Authroize.net then they should ALL show up in whichever Footer number I choose!

Where have I assigned Site5 to Footer 3 that I haven't done the others? I can't see where that happens in Admin!

And whilst we are here: I don't want the logo's to fall off the bottom of the page anyway :no:

Morris Bagnall
Owner
http://astrolaugh.com