1) Make the following changes to category.php
//get all categories
$all_categories = array();
$sql = "SELECT * FROM channels";
$query = @mysql_query($sql);
while ($result = @mysql_fetch_array($query)) {
//get latest video information
$channel_id = $result['channel_id'];
$channel_name = $result['channel_name'];
$channel_name = mysql_real_escape_string($channel_name);
$sql0 = "SELECT * FROM videos WHERE channel = '$channel_name' AND approved = 'yes' ORDER BY indexer DESC";
$query0 = @mysql_query($sql0);
$result0 = @mysql_fetch_array($query0);
if (empty($result0)) {
$video_picture = 'default_no_group_video';//show place holder image2wbmp
$indexer = "";
//------ BEGIN CHANGE for number of videos in each Category
//$result0 = array('video_id' => $video_picture, 'indexer' => $indexer);
$result0 = array('channel' => $channel_name, 'video_id' => $video_picture, 'indexer' => $indexer);
//------ END CHANGE for number of videos in each Category
}
$new_array = @array_merge($result, $result0);
//------ BEGIN CHANGE for number of videos in each Category
$num_videos=mysql_num_rows($query0);
//echo "
num_videos: $num_videos
";
$new_array = @array_merge($new_array, array('num_videos' => $num_videos));
//------ END CHANGE for number of videos in each Category
$all_categories[] = $new_array;
}
//print_r($all_categories);
//set condition for hidding certain blocks (e.g "no emails to list")
if (empty($all_categories)) {
$show_v = 1;
}
2) Make the following changes to templates/inner_category.htm