PDA

View Full Version : Stop Show Count From Counting Subcategories


tx80
06-16-2006, 06:11 AM
Hello,

Has anybody been able to modify the “Show Count” feature in phpLD v3.0.5? It seams to only count the subcategories, however, I would like it to only count the actual number of submitted links and if there are no links I would like it to simply show (0).

Any help would be greatly appreciated.

Regards,
:)

Steven Myers
06-16-2006, 06:13 AM
http://www.phplinkdirectory.com/forum/showpost.php?p=21208&postcount=25

tx80
06-16-2006, 06:35 AM
Hi Steve,

It works great!

Thank you so much!

Regards,
:)

tx80
06-16-2006, 06:45 AM
Hi Steve,

I had one more question. Does it matter if the code goes above or below the red bracket in the index.php file?


{

$row['COUNT'] = $db->GetOne("SELECT COUNT(*) FROM `{$tables['category']['name']}` WHERE `STATUS` = '2' AND `PARENT_ID` = ".$db->qstr($row['ID']));
$row['COUNT'] += $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = '2' AND `CATEGORY_ID` = ".$db->qstr($row['ID']));

}

$arr_childs = array($row['ID']);
get_ids($arr_childs);
$row['COUNT']=get_count($arr_childs);


Regards,
:)

Steven Myers
06-16-2006, 06:58 PM
Check your PM, sent it last night :)

David
06-16-2006, 07:00 PM
I moved this to mod requests.
It is preferable that new threads in the Mods and Contributions forum be created only for submitting an actual mod.

tx80
06-16-2006, 08:02 PM
Thank you for all your help Steve, It works great!

Regards,
:)