ONION Posted May 26, 2006 Posted May 26, 2006 (edited) hi, i just downloaded and installed the contribution which puts a bullet point and an underline on all your catagories. i have changed the bullet point etc but i cannot find (anywhere) the bit of code that controls the underline... <?php /* $Id: categories.php,v 1.23 2002/11/12 14:09:30 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ function tep_show_category($counter) { global $foo, $categories_string, $id, $aa; for ($a=0; $a<$foo[$counter]['level']; $a++) { if ($a == $foo[$counter]['level']-1) { $categories_string .= "<font color='#A90000'> </font>"; } else { $categories_string .= "<font color='#A90000'> </font>"; } } if ($foo[$counter]['level'] == 0) { if ($aa == 1) { $categories_string .= "<hr>"; } else {$aa=1;} } $categories_string .= '<nobr><a nowrap href="'; if ($foo[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $foo[$counter]['path']; } $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); $categories_string .= '">' . tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif', '') . ' ';; if ( ($id) && (in_array($counter, $id)) ) { $categories_string .= "<b><font color='A90000'>"; } // display category name $categories_string .= $foo[$counter]['name']; if ( ($id) && (in_array($counter, $id)) ) { $categories_string .= '</font></b>'; } // if (tep_has_category_subcategories($counter)) { // $categories_string .= '->'; // } $categories_string .= '</nobr></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 ($foo[$counter]['next_id']) { tep_show_category($foo[$counter]['next_id']); } } ?> <!-- categories //--> <tr> <td> <?php $aa = 0; $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_CATEGORIES ); new InfoBoxHeading($info_box_contents, true, false); $categories_string = ''; // add links to products with no category $product_query = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = 0 and p.products_id = pd.products_id and pd.language_id ='" . (int)$languages_id . "' order by pd.products_name " ); while ($no_category = tep_db_fetch_array($product_query)) { $no_cat_product_id = $no_category['products_id']; $no_cat_products_name = $no_category['products_name']; $myref = "<a href=" . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $no_cat_product_id) . '>' . $no_cat_products_name . '</a><br><br>'; $categories_string .= $myref; } // end links to products with no category $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='" . $languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $foo[$categories['categories_id']] = array( 'name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $foo[$prev_id]['next_id'] = $categories['categories_id']; } $prev_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if ($cPath) { $new_path = ''; $id = split('_', $cPath); reset($id); while (list($key, $value) = each($id)) { unset($prev_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 = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); $category_check = tep_db_num_rows($categories_query); if ($category_check > 0) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $foo[$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($prev_id)) { $foo[$prev_id]['next_id'] = $row['categories_id']; } $prev_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $foo[$last_id]['next_id'] = $foo[$value]['next_id']; $foo[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } tep_show_category($first_element); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $categories_string ); // WebMakers.com Added: All products or All Products Multiple Purchase // new infoBox($info_box_contents); // WebMakers.com Added: Show All Products Listing if (SHOW_ALL_PRODUCTS_BOX=='1') { $info_box_contents[] = array('align' => 'center" valign="top', 'text' => '<hr><a href="' . tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL') . '">' . BOX_INFORMATION_ALLPRODS . '</a>'); } // WebMakers.com Added: Show multiple product listing add for all products if (SHOW_PRODUCT_LISTINGS_MULTI_ADD_BOX=='1') { // All Products Multiple Purchase $info_box_contents[] = array('align' => 'center" valign="top', 'text' => '<hr><a href="' . tep_href_link(FILENAME_PRODUCTS_ALL, '', 'NONSSL') . '">' . BOX_INFORMATION_PRODUCT_ALL . '</a>'); } new InfoBox($info_box_contents); ?> </td> </tr> <!-- categories_eof //--> the menu can be seen here www.firesidefabrics.co.uk/products Edited May 26, 2006 by ONION Quote
ONION Posted May 26, 2006 Author Posted May 26, 2006 ive so far managed to find out how to change the image, the colours, and just about everything esle 'except' where the underline bit is. makes no sense. there seems to be no support or threads about this contribution either./... Quote
Guest Posted May 26, 2006 Posted May 26, 2006 specify a css class for the links with the following field A.someClass:hover { text-decoration: none; } then assign the class to the category links. Quote
ONION Posted May 26, 2006 Author Posted May 26, 2006 is that for the grey line under each section? i dont mean the link underline itself... i mean the grey line that is under each catagory in that link i added. the contribution added bullet images and an underline of each catagory. but i cant find the bit that controls that underline in the contribution code. as it was just one page. Quote
Guest Posted May 27, 2006 Posted May 27, 2006 there is no specific css class assigned to the categories entries from the code you posted. Therefore the default link css class should be used for the categories name text. You should then check the stylesheet.css what's the default for the A tag. Because the categories is enclosed in a link so that class has effect over the text. As I do not see anything specific that underlines text there. Quote
ONION Posted June 1, 2006 Author Posted June 1, 2006 its not the text underlined that im talking about. if you visit the link i posted, then look at the catagories sectiuon. you will see the links with a bullet point. then a line under each one seperating the sections. this may be an underline... or some sort of page break line? its got me stumped as i cant find it anywhere. it must be controlled by that page... if i put the standard page up it goes, if i upload the contribution it appears... Quote
squalid Posted June 25, 2006 Posted June 25, 2006 } if ($foo[$counter]['level'] == 0) { if ($aa == 1) { $categories_string .= "<hr>"; } else {$aa=1;} } i think it is the hr bit here Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.