Free Adult Tube-Video Script Forum

Full Version: Numbers of videos next to category names in menu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
To do this, we one have to exchange one line of code.
This code is in the functions file, which is located at
/include/functions.php

Find this line, in the function "categories()":
Code:
$kategoriler=$kategoriler.'<li><a href="'.$root_url.$linki2.'">'.urldecode($row['category']).'</a></li>';

change that, to:
Code:
$cat_id = $row['id'];
$result2 = mysql_query("select * from video where `category` = '$cat_id'");
$cat_tot = mysql_num_rows($result2);
            
$kategoriler=$kategoriler.'<li><a href="'.$root_url.$linki2.'">'.urldecode($row['category']).'</a>('.$cat_tot.')</li>';

NOTE: Be sure to clear your cache files for the changes to take effect.
you do not need to write that code
PHP Code:
while ($row2 mysql_fetch_array($result2))
{


i edit your post
So, what is the right code, i modified as Punktured advised but it is not working....
chances are, you havent cleared your cache.
once you clear your cache the changes will take effect.

let me know if clearing your cache works.
if not, send me your functions.php file.
Of course, I cleared the cache, but it doesn't work...
Maybe i paste something, somewhere wrong.
Can you check it please?
I attached the functions.php as you asked.
Thank you!
ok, this may be the problem.
in your /tmp folder, are there any cache files which are still there?

i cleared all my cache, but some files remained. this may be the problem on your end too.

just in /tmp
not in any sub folders of /tmp
i edit the code of Pnktured but not try it
may be i do something wrong
the code should be fine, i retested on my site.
all i can suggest is private messaging me your server details and i can look, and clear the caches manually.
Hm, you are right, i deleted all cache files manually just in /tmp and now i see the numbers after the categories but I see number "(2)" at all of my categories...strange, any idea what could be the problem.
ok i had missed a line of code when pasting.
ive added it now, and rechecked against my functions file, it should be fine now. let me know how it goes.
sorry for the hassle.
Reference URL's