Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21
  1. #11
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Can someone pls help to modify this layout? Aberdeen

    Quote Originally Posted by mdivk View Post
    Thank you, it works!!! just the file location should be the one I post here
    NO IT SHOULDN'T

    You have edited a CORE FILE.

    You should copy it to YOUR_TEMPLATE folder for over-ride purposes, then edit the COPY.

    The PATH to that folder is shown in bn17311 post above.

    If there is no folder at that level named after your template, then CREATE A FOLDER...

  2. #12
    Join Date
    Sep 2011
    Location
    Toronto, Ontario, Canada
    Posts
    290
    Plugin Contributions
    0

    Default Re: Can someone pls help to modify this layout? Aberdeen

    Quote Originally Posted by fairestcape View Post
    NO IT SHOULDN'T

    You have edited a CORE FILE.

    You should copy it to YOUR_TEMPLATE folder for over-ride purposes, then edit the COPY.

    The PATH to that folder is shown in bn17311 post above.

    If there is no folder at that level named after your template, then CREATE A FOLDER...
    OK, thanks. I copied the file to the template folder, I removed the changes I made in the default_template's folder and made changes in my in-use template's folder. It is kind of working. If you go to the site: ibnest, it works, however, you can see right beneath the slide show, there is a line:

    if ($this_is_home_page == true) { $flag_disable_right = true; $flag_disable_left = true; }

    Where is it from? How do I remove it?

    Besides, on the header menu, I want to remove the search section completely and expand the menu section so I can put more menu items there, I just turn the search off, but the gray section is still there, how do I do this?

    Thank you very much. All kind help is greatly appreciated from a new zenner.

  3. #13
    Join Date
    Apr 2010
    Posts
    319
    Plugin Contributions
    0

    Default Re: Can someone pls help to modify this layout? Aberdeen

    you need to take another look you have

    if ($this_is_home_page == true) { $flag_disable_right = true; $flag_disable_left = true; }

    showing on home page

    bn

  4. #14
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Can someone pls help to modify this layout? Aberdeen

    The OP has already asked about how to remove that. It is from an improperly edited file, most likely /includes/templates/aberdeen_neutral/common/tpl_main_page.php. Somehow the test to turn off sideboxes has been put into an area where it is output as HTML content instead of functioning as PHP. We would have to see the file to know exactly how the error occurred; if you can't find it yourself, post the part of the file where those lines are so we can see it.

  5. #15
    Join Date
    Sep 2011
    Location
    Toronto, Ontario, Canada
    Posts
    290
    Plugin Contributions
    0

    Default Re: Can someone pls help to modify this layout? Aberdeen

    Quote Originally Posted by gjh42 View Post
    ...post the part of the file where those lines are so we can see it.
    I don't see it, here is the file from my local: \ibnest\includes\templates\template_default\common\tpl_main_page.php:

    PHP Code:
    <?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;
      }
      if (
    $this_is_home_page) {
         
    $flag_disable_left 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
        
    }
      }
    ?>

    <div id="mainWrapper">
    <?php
     
    /**
      * prepares and displays header output
      *
      */
      
    if (CUSTOMERS_APPROVAL_AUTHORIZATION == && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 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');?>

    <table width="100%" border="0" cellspacing="0" cellpadding="0" id="contentMainWrapper">
      <tr>
    <?php
    if (COLUMN_LEFT_STATUS == || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != or $_SESSION['customer_id'] == ''))) {
      
    // global disable of column_left
      
    $flag_disable_left true;
    }
    if (!isset(
    $flag_disable_left) || !$flag_disable_left) {
    ?>

     <td 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></td>
    <?php
    }
    ?>
        <td valign="top">
    <!-- bof  breadcrumb -->
    <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
        <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); ?>

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

    <?php
    //if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' && $_SESSION['customers_authorization'] != 0)) {
    if (COLUMN_RIGHT_STATUS == || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' and ($_SESSION['customers_authorization'] != or $_SESSION['customer_id'] == ''))) {
      
    // global disable of column_right
      
    $flag_disable_right true;
    }
    if (!isset(
    $flag_disable_right) || !$flag_disable_right) {
    ?>
    <td 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></td>
    <?php
    }
    ?>
      </tr>
    </table>

    <?php
     
    /**
      * prepares and displays footer output
      *
      */
      
    if (CUSTOMERS_APPROVAL_AUTHORIZATION == && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 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');
    ?>

    </div>
    <!--bof- parse time display -->
    <?php
      
    if (DISPLAY_PAGE_PARSE_TIME == 'true') {
    ?>
    <div class="smallText center">Parse Time: <?php echo $parse_time?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div>
    <?php
      
    }
    ?>
    <!--eof- parse time display -->
    <!--bof- banner #6 display -->
    <?php
      
    if (SHOW_BANNERS_GROUP_SET6 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET6)) {
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerSix" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    ?>
    <!--eof- banner #6 display -->
    </body>

  6. #16
    Join Date
    Sep 2011
    Location
    Toronto, Ontario, Canada
    Posts
    290
    Plugin Contributions
    0

    Default Re: Can someone pls help to modify this layout? Aberdeen

    It's weird my Google desktop search found a file containing the string in tpl_columnar_display.php of the above folder, however, I don't see the string when I open the file, here is the file:
    PHP Code:
    <?php
    /**
     * Common Template - tpl_columnar_display.php
     *
     * This file is used for generating tabular output where needed, based on the supplied array of table-cell contents.
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 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_columnar_display.php 3157 2006-03-10 23:24:22Z drbyte $
     */

    ?>
    <?php
      
    if ($title) {
      
    ?>
    <?php 
    echo $title?>
    <?php
     
    }
     
    ?>
     if ($this_is_home_page == true) {
    $flag_disable_right = true;
    $flag_disable_left = true;

      <div class="centerBoxWrapperContents">
    <table width="100%" align="center" cellpadding="1" cellspacing="15" border="0">

    <?php
    if (is_array($list_box_contents) > ) {

    $MaxCol=0;
     for(
    $row=0;$row<sizeof($list_box_contents);$row++) {
        
    $params "";
        
    //if (isset($list_box_contents[$row]['params'])) $params .= ' ' . $list_box_contents[$row]['params'];
    ?>
    <tr>
    <?php
        
    for($col=0;$col<sizeof($list_box_contents[$row]);$col++) {
          
    $r_params "";
          if (isset(
    $list_box_contents[$row][$col]['params'])) $r_params .= ' ' . (string)$list_box_contents[$row][$col]['params'];
         
    $r_params str_replace(" back"""$r_params);
         
    $r_params str_replace("50""100"$r_params);
         
    $r_params str_replace("33""100"$r_params);
         
         
    // bof: Replace all widths with 100% for Column Divider Pro
         
    $startpos strpos($r_params"width:");
         if (
    $startpos != false) {
            
    $endpos strpos($r_params";"$startpos);
            
    $res substr($r_params$startpos, ($endpos $startpos ));
            
    $r_params str_replace($res"width:100%"$r_params);
         }
         
    // eof: Replace all widths with 100% for Column Divider Pro
         
         
    if (isset($list_box_contents[$row][$col]['text'])) {
    ?>
        <?php 
        
    echo '<td width="'. (intval($col_width) - 0.5) .'%" align="center" valign="top"><div' $r_params '>' $list_box_contents[$row][$col]['text'] .  '</div></td>' "\n";
         
    ?>
        <?php if ($row == && $col < (sizeof($list_box_contents[$row]) - 1)) {
                echo 
    '<td class="vDotLine" rowspan="' . ((sizeof($list_box_contents))*2) . '"></td>' "\n";
                  
    $MaxCol += 1;
              }

          }
        }
    ?>

    </tr>

    <?php 
        
    if ($row < (sizeof($list_box_contents)-1)) {?>
    <tr>
        <?php    for($col=0;$col<($MaxCol 1);$col++) {
          echo 
    '<td class="hDotLine"></td>';
        } 
    ?>
    </tr>
    <?php    }
        
    ?>


    <?php
      
    }
    }
    ?>
    </table>
     </div>

  7. #17
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Can someone pls help to modify this layout? Aberdeen

    here is the file from my local: \ibnest\includes\templates\template_default\common\tpl_main_page.php:
    The custom code should never be in a /template_default/ folder; I directed you to the /aberdeen_neutral/ folder.

  8. #18
    Join Date
    Sep 2011
    Location
    Toronto, Ontario, Canada
    Posts
    290
    Plugin Contributions
    0

    red flag Re: Can someone pls help to modify this layout? Aberdeen

    Thanks.

    I have made more changes to my site

    I encountered a new problem:

    As you can see, the home page looks fine now, but when I click into any other pages: Location, Contact Us... you will see a big indent area which was for side column, I disabled side column, but the area is still there. How do I remove those indent for every page?

    Thank you again for anyone's help. Much appreciated.

  9. #19
    Join Date
    Sep 2011
    Location
    Toronto, Ontario, Canada
    Posts
    290
    Plugin Contributions
    0

    Default Re: Can someone pls help to modify this layout? Aberdeen

    Sorry, the message:

    if ($this_is_home_page == true) { $flag_disable_right = true; $flag_disable_left = true; }

    is still showing beneath the New Products For November, it was not gone.

    I just checked tpl_main_page.php in both default folder and the template's folder, I confirm the code change was made to the template's folder instead of the default folder.

    Then why the message is still showing there?

    Thank you very much for your kind and help.

  10. #20
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Can someone pls help to modify this layout? Aberdeen

    The code you are seeing on the page is in the tpl_columnar_display.php that you posted, but it is outside the <?php ?> tags, so it is read as HTML instead.
    PHP Code:
     * @version $Id: tpl_columnar_display.php 3157 2006-03-10 23:24:22Z drbyte $
     */

    ?>
    <?php
      
    if ($title) {
      
    ?>
    <?php 
    echo $title?>
    <?php
     
    }
     
    ?>
     if ($this_is_home_page == true) {
    $flag_disable_right = true;
    $flag_disable_left = true;

      <div class="centerBoxWrapperContents">
    <table width="100%" align="center" cellpadding="1" cellspacing="15" border="0">

    <?php
    if (is_array($list_box_contents) > ) {
    Move one line
    ?>
    like this:
    PHP Code:
     * @version $Id: tpl_columnar_display.php 3157 2006-03-10 23:24:22Z drbyte $
     */

    ?>
    <?php
      
    if ($title) {
      
    ?>
    <?php 
    echo $title?>
    <?php
     
    }
     if (
    $this_is_home_page == true) {
    $flag_disable_right true;
    $flag_disable_left true;

     
    ?>
      <div class="centerBoxWrapperContents">
    <table width="100%" align="center" cellpadding="1" cellspacing="15" border="0">

    <?php
    if (is_array($list_box_contents) > ) {

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Can someone pls help to correct this for me? Thank you.
    By mdivk in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 20 Nov 2011, 03:42 AM
  2. Can someone please help me to modify this sanitizer function for Google Base Feeder?
    By lankeeyankee in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 27 Jan 2008, 05:37 AM
  3. i like this layout, can someone help!!
    By corbo in forum General Questions
    Replies: 0
    Last Post: 8 Aug 2007, 03:52 AM
  4. Can someone please help me with layout?
    By Jan51 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 13 Aug 2006, 09:05 AM
  5. Can someone help this newbie?
    By awatts65 in forum Basic Configuration
    Replies: 22
    Last Post: 10 Jul 2006, 03:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR