1 {$value['name']}");
continue;
}
if ($advancedCustom->ShowAllVideosOnCategory) {
$total = $value['fullTotal'];
} else {
$total = $value['total'];
}
if (empty($total)) {
//var_dump("
2 {$value['name']}");
continue;
}
if (!empty($value['fullTotal_videos'])) {
$video = Category::getLatestVideoFromCategory($value['id'], true, true);
$images = Video::getImageFromID($video['id']);
$image = $images->poster;
} elseif (!empty($value['fullTotal_lives'])) {
$live = Category::getLatestLiveFromCategory($value['id'], true, true);
$image = Live::getImage($live['users_id'], $live['live_servers_id']);
} elseif (!empty($value['fullTotal_livelinks'])) {
$liveLinks = Category::getLatestLiveLinksFromCategory($value['id'], true, true);
$image = LiveLinks::getImage($liveLinks['id']);
}
$totalVideosOnChilds = Category::getTotalFromChildCategory($value['id']);
$childs = Category::getChildCategories($value['id']);
$photo = Category::getCategoryPhotoPath($value['id']);
$photoBg = Category::getCategoryBackgroundPath($value['id']);
$link = $global['webSiteRootURL'] . 'cat/' . $value['clean_name'];
$imageNotFound = preg_match('/notfound/i', $image);
$photoNotFound = empty($photo) || preg_match('/notfound/i', $photo['url']);
$icon = '
' ;
if (!$imageNotFound) {
?>