Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Showing video count next to category
09-03-2011, 06:59 AM
Post: #1
Showing video count next to category
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.


Attached File(s) Thumbnail(s)
   

Custom HTML/CSS/PHP
http://theorderofindividualacceptance.co...p.php?id=1
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Showing video count next to category - Punktured - 09-03-2011 06:59 AM

Forum Jump: