Search
  
Categories
 Last Articles
 Design
 Coding: PHP and Smarty
 Miscellaneous
 Admin Area
 Installation
[add new article]
Displaying Total Number of Links and Categories

Author: phpLD
Added: February 19, 2006

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, footer.tpl (or *.tpl of your choice)


Add this whereever you want: Code:



{l}Active Links{/l} - {$stats[0]}
{l}Categories{/l} - {$stats[3]}