/ August 9, 2005

I think this could be done using the code we have in admin:

Code:
$stats[0] = $db->GetOne("SELECT COUNT(*) FROM {$tables['link']['name']} WHERE STATUS > 1");
$stats[3] = $db->GetOne("SELECT COUNT(*) FROM {$tables['category']['name']}");

Then somewhere in the footer.tpl (or whereever you want) put:

Code:
<div align="center">
{l}Active Links{/l} - {$stats[0]}

{l}Categories{/l} - {$stats[3]}
</div>

I haven’t tested this, but I believe it will work.

yktan writes:

Hi Mike77, what David posted is almost right. Here’s what you should do:

Open index.php
Find:

Code:
echo $tpl->fetch('main.tpl', $id);

Add BEFORE:

Code:
$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 this whereever you want:

Code:
<div align="center"> 
{l}Active Links{/l} - {$stats[0]}
 
{l}Categories{/l} - {$stats[3]} 
</div>

Regards,
York Kie