func_combine_css( array('path'=>'plugins/rv_menutree/menutree.css') ); } add_event_handler('get_categories_menu_sql_where', 'rv_mt_get_categories_menu_sql_where', EVENT_HANDLER_PRIORITY_NEUTRAL, 2 ); function rv_mt_get_categories_menu_sql_where($where, $expand) { if (mobile_theme()) return $where; add_event_handler('blockmanager_apply', 'rv_mt_menubar_categories'); if ($expand) return $where; global $page; if ( !isset($page['category']) ) $where = 'id_uppercat IS NULL OR uppercats REGEXP \'^[0-9]+,[0-9]+$\''; else { $where = 'id_uppercat is NULL OR uppercats LIKE "'.$page['category']['upper_names'][0]['id'].',%" OR uppercats REGEXP \'^[0-9]+,[0-9]+$\''; } return $where; } function rv_mt_menubar_categories($menu_ref_arr) { $menu = & $menu_ref_arr[0]; if (($block = $menu->get_block('mbCategories')) != null) { global $template, $page; $upper_ids = isset($page['category']['uppercats']) ? array_flip( explode(',', $page['category']['uppercats'])) : null; $refLevel = 0; foreach($block->data['MENU_CATEGORIES'] as &$cat) { $level = $cat['LEVEL']; if ($level>$refLevel) $pre = '