Thought I should probably put this in the Mods forum as well!
This will allow you to show the number of subcategories in a category, as well as the number of links.
Ex: Web Directories (4) (20)
First is the number of subs and second is the number of links.
In subcat.php
Locate:
Code:
while($subcategory = mysql_fetch_assoc($subcat)){
//fetch children
$sql = "select * from pages where active = 'Yes' and catID = '" . $subcategory['id'] . "'";
//echo $sql;
$R = mysql_query($sql,$myconn) or die(mysql_error());
//print children links and total subcategories of children
$sql = "select * from settings where id = '1'";
$S = mysql_query($sql,$myconn);
$settings = mysql_fetch_assoc($S);
if($settings['stats'] == '1')
$stats = ' ('.mysql_num_rows($R).')';
and replace the code with this:
Code:
while($subcategory = mysql_fetch_assoc($subcat)){
//fetch children
$sql = "select * from pages where active = 'Yes' and catID = '" . $subcategory['id'] . "'";
//echo $sql;
$R = mysql_query($sql,$myconn) or die(mysql_error());
//print children links and total subcategories of children
$sql = "select * from settings where id = '1'";
$S = mysql_query($sql,$myconn);
$settings = mysql_fetch_assoc($S);
if($settings['stats'] == '1')
$sql = "select * from categories where fatherID = '" . $subcategory['id'] . "'";
$Results = mysql_query($sql,$myconn) or die(mysql_error());
$subcats = mysql_query($sql,$myconn);
$stats = ' ('.mysql_num_rows($subcats).') ('.mysql_num_rows($R).')';
This will show the subcategories of the subcategory, as well as the links under the subcategory.
I'm sure someone will be able to use this mod.
Joanne