Free Adult Tube-Video Script Forum
Numbers of videos next to category names in menu - Printable Version

+- Free Adult Tube-Video Script Forum (http://freeadultscript.com/forum)
+-- Forum: My Category (/forumdisplay.php?fid=1)
+--- Forum: Tutorials (/forumdisplay.php?fid=8)
+--- Thread: Numbers of videos next to category names in menu (/showthread.php?tid=307)



Numbers of videos next to category names in menu - Punktured - 30-03-2011 06:25 AM

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.


RE: Numbers of videos next to category names in menu - admin - 30-03-2011 03:39 PM

you do not need to write that code
PHP Code:
while ($row2 mysql_fetch_array($result2))
{


i edit your post


RE: Numbers of videos next to category names in menu - Dreamer26 - 07-04-2011 11:43 AM

So, what is the right code, i modified as Punktured advised but it is not working....


RE: Numbers of videos next to category names in menu - Punktured - 07-04-2011 12:01 PM

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.


RE: Numbers of videos next to category names in menu - Dreamer26 - 07-04-2011 06:52 PM

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!


RE: Numbers of videos next to category names in menu - Punktured - 07-04-2011 09:51 PM

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


RE: Numbers of videos next to category names in menu - admin - 07-04-2011 11:15 PM

i edit the code of Pnktured but not try it
may be i do something wrong


RE: Numbers of videos next to category names in menu - Punktured - 07-04-2011 11:17 PM

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.


RE: Numbers of videos next to category names in menu - Dreamer26 - 08-04-2011 10:31 AM

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.


RE: Numbers of videos next to category names in menu - Punktured - 10-04-2011 05:50 AM

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.