woodpress Posted November 30, 2007 Posted November 30, 2007 Howdy. Is there a way to tighen up the catagories.php file? I can't seem to identify where the padding to the top of the catagory listings are being genereated from. If you look at http://buychrishartbooks.com I am trying to get the "Magna" listing to bump up closer to the "Books" graphic. As it is osC seems to add a default 1/2 inch space between the breadcrumb line and the top of the catagory listings. I can't seem to find it in the includes/boxes/catagories.php file nor in the stylesheet. Any ideas? Thanks
Jack_mcs Posted December 1, 2007 Posted December 1, 2007 See the cellspacing and cellpadding settings that are in the table that holds the column. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
woodpress Posted December 10, 2007 Author Posted December 10, 2007 See the cellspacing and cellpadding settings that are in the table that holds the column. Jack Thanks but no change. My column_left.php is: <?php /* $Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_categories_box(); } else { include(DIR_WS_BOXES . 'categories.php'); } ?> and my catagories.php reads as: <table width="183" height="159" border="0" cellpadding="0" cellspacing="0" background="images/infobox/navbackfull.gif"> <tr> <td valign="top"><a href="http://www.chrishartbooks.com"><img src="images/infobox/bookson.gif" border="0"></a></td> </tr> <?php /* $Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ function tep_show_category($counter) { global $tree, $categories_string, $cPath_array; for ($i=0; $i<$tree[$counter]['level']; $i++) { $categories_string .= " "; } $categories_string .= '<a href="'; if ($tree[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $tree[$counter]['path']; } $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">'; if (isset($cPath_array) && in_array($counter, $cPath_array)) { $categories_string .= '<b>'; } // display category name $categories_string .= $tree[$counter]['name']; if (isset($cPath_array) && in_array($counter, $cPath_array)) { $categories_string .= '</b>'; } if (tep_has_category_subcategories($counter)) { $categories_string .= '->'; } $categories_string .= '</a>'; if (SHOW_COUNTS == 'true') { $products_in_category = tep_count_products_in_category($counter); if ($products_in_category > 0) { $categories_string .= ' (' . $products_in_category . ')'; } } $categories_string .= '<br>'; if ($tree[$counter]['next_id'] != false) { tep_show_category($tree[$counter]['next_id']); } } ?> <!-- categories //--> <tr> <td> <?php $info_box_contents = array(); $categories_string = ''; $tree = array(); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $tree[$categories['categories_id']] = array('name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $categories['categories_id']; } $parent_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if (tep_not_null($cPath)) { $new_path = ''; reset($cPath_array); while (list($key, $value) = each($cPath_array)) { unset($parent_id); unset($first_id); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); if (tep_db_num_rows($categories_query)) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $tree[$row['categories_id']] = array('name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $row['categories_id']; } $parent_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $tree[$last_id]['next_id'] = $tree[$value]['next_id']; $tree[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } tep_show_category($first_element); $info_box_contents = array(); $info_box_contents[] = array('text' => $categories_string); new infoBox($info_box_contents); ?> </td> </tr> <!-- categories_eof //--> So that said? What causes the catagories block to have that build in top padding? I've got my stylesheet to state: .infoBoxContents { font-family: Arial, Verdana, sans-serif; font-size: 18px; margin: 0px 0px 0px 35px; line-height: 1.5; font-weight: bold; }
Jack_mcs Posted December 11, 2007 Posted December 11, 2007 The table that holds the column is in each of the files in the root that displays the column, like index.php, privacy.php and so on. You have to change them all, though I would test one first to be sure it fixes it. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
woodpress Posted December 11, 2007 Author Posted December 11, 2007 The table that holds the column is in each of the files in the root that displays the column, like index.php, privacy.php and so on. You have to change them all, though I would test one first to be sure it fixes it. Jack Thanks Jack, but I still can't find where this would be controlled from. Here's the code up to that block. There isn't anything that should be pushing it down a full 1/4 inch. Any thoughts? <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table width="763" border="0" align="center" cellpadding="3" cellspacing="3" bgcolor="#FFFFFF"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //-->
Jack_mcs Posted December 11, 2007 Posted December 11, 2007 <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
woodpress Posted December 11, 2007 Author Posted December 11, 2007 <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> Jack Yeah I see that, but none of that effects the vertical level of the navigation.
Jack_mcs Posted December 12, 2007 Posted December 12, 2007 Yes, you are correct - it wouldn't. I just reread your original post and see that is not what you asked. The problem you are having is in the includes/boxes/categories.php file, assuming the standard code has not been changed. You need to look in there for the extra padding. The standard categories code will add a space at the top so it may be just a matter of your font being larger, which is causing a larger space. I would try a standard categories file to make sure that fixes it and then compare them if it does, addingthe changes one at a time. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Recommended Posts
Archived
This topic is now archived and is closed to further replies.