! ! !
Такая же проблема...
Вот пример -
http://www.mod-it.ru/productsВ меню категорий справа модуля mod_ice_vmcategories, наименование категорий не переносится на другую строку (2 последние категории - Автомобильная электроника и GPS;Компьютеры и комплектующие - собрались в кучу). Подскажите пожалуйста где и что нужно поправить, что бы длинные наименования категорий переносились на другую строку, сам в PHP не силен, только начинаю изучать....
! ! !
Ниже код файла helper.php указанного модуля
<?php
/**
* @package mod_ice_vmcategories
* @copyright Copyright (C) 2008 - 2009. All rights reserved.
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL, see LICENSE.php
* Mod Ice VirtueMart Categories is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
*
*/
defined('_JEXEC') or die('Restricted access');
global $mosConfig_live_site, $mainframe, $current_cat_id;
// Load the VirtueMart main parse code
if( JPATH_SITE . '/components/com_virtuemart/virtuemart_parser.php' ) {
require_once( JPATH_SITE.'/components/com_virtuemart/virtuemart_parser.php' );
}
require_once(CLASSPATH . 'ps_product_category.php');
$uri =& JURI::getInstance($_SERVER['REQUEST_URI']);
$query = $uri->getQuery(true);
$current_cat_id = (count($query) && isset($query['category_id']))? intval($query['category_id']) : false;
class IceVMCategoriesTree {
function traverse_tree_down(&$category_html, $category_id = '0', $level = '0') {
static $ibg = -1;
global $mosConfig_live_site, $sess, $current_cat_id;
$db = new ps_DB();
$level++;
$query = "SELECT category_name, category_id, category_child_id "
. "FROM #__{vm}_category as a, #__{vm}_category_xref as b "
. "WHERE a.category_publish='Y' AND "
. " b.category_parent_id='$category_id' AND a.category_id=b.category_child_id "
. "ORDER BY category_parent_id, list_order, category_name ASC";
$db->query($query);
while ($db->next_record()) {
$ibg++;
$tree_id = ($ibg == 0)? 1 : $ibg;
$item_id = '&Itemid=' . $sess->getShopItemid();
$category_id = $db->f("category_id", false);
$category_child_id = $db->f("category_child_id");
$category_name = $db->f("category_name", false);
$link = sefRelToAbs('index.php?option=com_virtuemart&page=shop.browse&category_id=' . $category_id . $item_id . "&TreeId=$tree_id");
$hasChilds = ps_product_category::has_childs($category_id);
$active = ($current_cat_id == $category_id)? ' active ' : '';
$current = ($current_cat_id == $category_id)? ' id="current" ' : '';
$category_html .= "<li " . $current . " class=\"item " . (($hasChilds)? 'parent' : ''). $active . "\">";
if ($hasChilds) $category_html .= "";
$category_html .= "<a href=\"$link\"><span>" . $category_name . "</span></a>";
if ($hasChilds) {
$category_html .= "<ul class=\"submenu\">";
$this->traverse_tree_down($category_html, $category_child_id, $level);
$category_html .= "</ul>";
}
$category_html .= "</li>";
}
}
}
?>