Free Adult Tube-Video Script Forum

Full Version: Showing video count next to category
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In this tutorial I will show you how to add a "video count" next to your category...

like this:

Quote:All Girl (6)
Anal (18)
Asian (4)
Babe (3)
Big Butt (2)

The function we will be editing is "categories()"

find this line:
Code:
$kategoriler=$kategoriler.'<li><a href="'.$root_url.$linki2.'">'.urldecode($row['category']).'</a></li>';

and replace it with this code:
Code:
$id = $row['id'];
  $query1 = "SELECT * FROM video WHERE `category` = '$id'";
  $numresults = mysql_query($query1);
  $num_vid = mysql_num_rows($numresults);    
  $kategoriler=$kategoriler.'<li><a href="'.$root_url.$linki2.'">'.urldecode($row['category']).'</a> ('.$num_vid.')</li>';

REMEMBER TO CLEAR YOUR CACHES.

now you should have a video count next to your category names.
Reference URL's