Evolution Wireless Posted December 9, 2002 Posted December 9, 2002 Ive modified my site alot and the only infobox I have left is categories. I want to eliminate the border, background color, and header. In replacement I would like to just add a dotted divider between the category links. I know I have probably have gone over the file I need to modify a million times ut can someone please help me on where to start. Thanks in advance! -Mike
Guest Posted December 9, 2002 Posted December 9, 2002 Mike Not sure if this is what you want but here goes anyway: The only way I can see of changing individual boxes is to add a seperate box class in the following class file found here: catalog/includes/classes/boxes, add around line 154 the following code class categoriesBox extends tableBox { function categoriesBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->categoriesBoxContents($contents)); $this->table_cellpadding = '0'; $this->table_class = 'noclass'; $this->tableBox($info_box_contents, true); } function categoriesBoxContents($contents) { $this->table_cellpadding = '0'; $this->table_class = 'noclass'; $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0; $i<sizeof($contents); $i++) { $info_box_contents[] = array(array('align' => 'center', 'params' => 'class="noclass"', 'text' => $contents[$i]['text'])); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } Next, if you have not moded your categories.php file found in catalog/includes/boxes, you should see around line 28 the following code $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); $categories_string .= '">'; Replace with the following: $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); $categories_string .= '">'; $categories_string .= tep_draw_separator('dotted_line.gif', '100%', '5'); Where !! dotted_line gif is your dotted line gif, also change the 100% and the 5 to the size of your gif. Next around line 143 in the same file catergories.php change: new infoBox($info_box_contents); to: new categoriesBox($info_box_contents); and that should be what you are after. I have done a similar thing only using images instead of text @ www.dcpcwebdevelopment.co.uk/catalog
Guest Posted December 9, 2002 Posted December 9, 2002 Sorry Mike I to have moded my site code below should work: class categoriesBox extends tableBox { function categoriesBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->categoriesBoxContents($contents)); $this->table_cellpadding = '0'; $this->tableBox($info_box_contents, true); } function categoriesBoxContents($contents) { $this->table_cellpadding = '0'; $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0; $i<sizeof($contents); $i++) { $info_box_contents[] = array(array('align' => 'center', 'params' => 'class="noclass"', 'text' => $contents[$i]['text'])); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } Taken out the: $this->table_class = 'noclass';
Evolution Wireless Posted December 9, 2002 Author Posted December 9, 2002 Sounds like what I want, where you have the images I just want text. I forgot to mention a couple of things though. I want a link to home and shopping cart listed as one of the categories as well. Then my main categories, all seperated by blue_dot.gif. When you click on an expandable category(text) then the sub menus pop up under the main category(text). You have exactly what I want, except you have images instead of text and you do not have a home & shopping cart link.
Guest Posted December 10, 2002 Posted December 10, 2002 Michael I think your missing something here. I have images on my development site but the code I posted for you uses text. Back up first and try it. Works just like you want. After changing 'dotted_line.gif to blue_dot.gif As for adding home and shopping cart to your categories, Why? The categories box is surely for what its called categories. Lango
Recommended Posts
Archived
This topic is now archived and is closed to further replies.