PHP Directory Mods
After leaving a message in the blog Terry got back to me, and was kind enough to pass on the snippet of script he used to achieve this. At first the snippet didn't work, and actually created a fatal error, but having experienced this 'fatal error' occurance before while doing things, I didn't panic...lol.
I did have browse through the PHP support forums, and quickly came up with the problem.
So the snippets used were.
Open index.php
Find
echo $tpl->fetch('main.tpl', $id);
Before Add
$stats[0] = $db->GetOne("SELECT COUNT(*) FROM {$tables['link']['name']} WHERE STATUS = 2");
$stats[3] = $db->GetOne("SELECT COUNT(*) FROM {$tables['category']['name']} WHERE STATUS = 2");
$tpl->assign('stats', $stats);
Open main.tpl
Add where you want
{l}Active Links{/l} - {$stats[0]}
{l}Categories{/l} - {$stats[3]}
So.. now the only problem I have is that the category count wont show up. But atleast I am closer than I was!!




