computers101 Posted August 3, 2005 Share Posted August 3, 2005 Can some please help me. I need to change the width of the categories box. My description are a bit long and so the wrap, making the categories difficult to read. I am a newbie to PHP so forgive my ignorance. Link to comment Share on other sites More sharing options...
moonstone Posted August 4, 2005 Share Posted August 4, 2005 If I'm not wrong, both the left and right column width are defined by BOX_WIDTH in catalog/includes/application_top.php around line 50: // customization for the design layout define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125) Thus, changing this value will affect all boxes in both the left and right columns. If you will like to change only the left column, you will have to be prepared to change the code in almost all php files in the catalog directory. I'll suggest you define a new variable to control the new size. This will make it very much easier to make any changes in the future if you ever need to. If you decide to do that, you may proceed as follows: Step 1. Copy the above define line to create BOX_WIDTH_LEFT: // customization for the design layout define('BOX_WIDTH_LEFT', 125); // how wide the boxes in left column should be in pixels (default: 125) define('BOX_WIDTH', 125); // how wide the boxes in right column should be in pixels (default: 125) Step 2. Change all references to BOX_WIDTH for the left column to BOX_WIDTH_LEFT in the php files in catalog folder. Open up each file and search for column_left.php: For example, in index.php around lines 51-53: <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'); ?> Simply replace the 2 instances of BOX_WIDTH with BOX_WIDTH_LEFT: <td width="<?php echo BOX_WIDTH_LEFT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> If you fail to search for column_left.php in a file, simply ignore that file and proceed to the next. From now on, the width of the left column will be determined by BOX_WIDTH_LEFT, and the width of the right column will be determined by BOX_WIDTH. Hope that helps... :blush: Link to comment Share on other sites More sharing options...
computers101 Posted August 4, 2005 Author Share Posted August 4, 2005 :thumbsup: Thanks that did it. Can some please help me. I need to change the width of the categories box. My description are a bit long and so the wrap, making the categories difficult to read.I am a newbie to PHP so forgive my ignorance. <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.