Thread: Border removal!

Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    203
    Plugin Contributions
    0

    Default Border removal!

    im trying to remove the border around the "centerBoxHeading" heading wrapper, due to the content box and header box both being in the same div i cant get rid of the border around the head shown here www.orcharddirect.co.uk/store, i would like to keep the border around the content but not the header. What php file do i have to edit to split these into 2 divs? Or can someone suggest an easier way i can go about achieving this. Many thanks.

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

    Default Re: Border removal!

    It does require a file edit. You want to be very careful editing tpl_columnar_display.php since it is used by many other files. The following will add a .contentWrapper div in cases where there is a title for the output. Hopefully this will not impact negatively on any other displays.
    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 $  added contentWrapper gjh42  2008-02-13
     */

    ?>
    <?php
      
    if ($title) {
      
    ?>
    <?php 
    echo $title '<div class="contentWrapper">'//contentWrapper 2008-02-13 ?>
    <?php
     
    }
     
    ?>
    <?php
    if (is_array($list_box_contents) > ) {
     for(
    $row=0;$row<sizeof($list_box_contents);$row++) {
        
    $params "";
        
    //if (isset($list_box_contents[$row]['params'])) $params .= ' ' . $list_box_contents[$row]['params'];
    ?>

    <?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'];
         if (isset(
    $list_box_contents[$row][$col]['text'])) {
    ?>
        <?php echo '<div' $r_params '>' $list_box_contents[$row][$col]['text'] .  '</div>' "\n"?>
    <?php
          
    }
        }
    ?>
    <br class="clearBoth" />
    <?php
      
    }
    }
    $title? echo '</div>':''//contentWrapper 2008-02-13
    ?>
    Save as /includes/templates/your_template/common/tpl_columnar_display.php.

  3. #3
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    203
    Plugin Contributions
    0

    Default Re: Border removal!

    Unfortunately that code doesn't work, it just completely deleted the whole section. Any other ideas.

    Cheers

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

    Default Re: Border removal!

    For some arcane PHP reason, it doesn't like the "echo" at the end.
    Replace this line:
    PHP Code:
    $title? echo '</div>':''//contentWrapper 2008-02-13 
    with this:
    PHP Code:
      if ($title) {  //contentWrapper 2008-02-13 ?>
      </div>
      <?php
      
    }
    and it works.

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

    Default Re: Border removal!

    The echo just needs to be outside the ternary operator to work correctly. Replace the original line:
    PHP Code:
    $title? echo '</div>':''//contentWrapper 2008-02-13 
    with this:
    PHP Code:
    echo $title'</div>':''//contentWrapper 2008-03-02 

 

 

Similar Threads

  1. added border none, still have border
    By shortmop in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 28 Sep 2011, 02:46 PM
  2. How do I put border on some images and no border on others?
    By Sawhorse in forum Templates, Stylesheets, Page Layout
    Replies: 20
    Last Post: 6 Apr 2009, 01:18 AM
  3. border removal problem
    By hottytoddysummer in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 21 Feb 2008, 11:29 AM
  4. Border in Firefox & Sidebox border missing
    By helpme in forum Basic Configuration
    Replies: 3
    Last Post: 17 Oct 2007, 04:18 AM

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