categoriesTopButtonsFluid)) { $obj = AVideoPlugin::loadPlugin('Layout'); } $timeLogName = TimeLogStart("CategoryTopButtons"); global $advancedCustom; $_rowCount = getRowCount(); $current = getCurrentPage(); $_REQUEST['rowCount'] = 1000; unsetCurrentPage(); $parsed_cats = array(); TimeLogEnd($timeLogName, __LINE__); $categories = Category::getAllCategories(); TimeLogEnd($timeLogName, __LINE__); $_REQUEST['rowCount'] = $_rowCount; $_REQUEST['current'] = $current; $items = array(); foreach ($categories as $value) { if ($value['parentId']) { echo ""; continue; } if ($advancedCustom->ShowAllVideosOnCategory) { $total = $value['fullTotal']; } else { $total = $value['total']; } if (empty($value['fullTotal']) && empty($value['total'])) { echo ""; continue; } if (in_array($value['id'], $parsed_cats)) { echo ""; continue; } $label = ' ' . '' . __($value['name']) . ''; if (!empty($obj->categoriesTopButtonsShowVideosCount)) { $label .= ' ' . $total . ''; } $items[] = array( 'href' => Category::getCategoryLinkFromName($value['clean_name']), 'tooltip' => __($value['name']), 'onclick' => '', 'label' => $label, 'isActive' => $value['clean_name'] == @$_REQUEST['catName'], 'clean_name' => $value['clean_name'] ); } TimeLogEnd($timeLogName, __LINE__); echo ""; //var_dump($_REQUEST['catName'], $items);exit; generateHorizontalFlickity($items); TimeLogEnd($timeLogName, __LINE__);