Free Adult Tube-Video Script Forum
Showing video count next to category - Printable Version

+- Free Adult Tube-Video Script Forum (http://freeadultscript.com/forum)
+-- Forum: My Category (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Showing video count next to category (/showthread.php?tid=271)



Showing video count next to category - Punktured - 09-03-2011 06:59 AM

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.