View Single Post
  #3 (permalink)  
Old 07-14-2008, 07:20 PM
chuckroast's Avatar
chuckroast chuckroast is offline
Pligg Developer
 
Join Date: Jun 2006
Location: PA
Posts: 2,605
Thanks: 178
Thanked 458 Times in 296 Posts
Have you looked at admin_main_center.tpl?
There are already smarty variables created such as:

{$members} = total number of members
{$total} = total number of stories submitted
{$published} = number of stories published
{$queued} = number of stories in the queue
{$votes} = total combined votes of all stories
{$comments} = total number of comments made on the site

So for example lets say you want to show the total number of published stories on the home page.

Open index.php and add
Code:
$published = $db->get_var('SELECT count(*) from ' . table_links . ' where link_status = "published";');
$main_smarty->assign('published', $published);
Then open index_center.tpl and add something like
Code:
{$published} total published stories
__________________


Thank this developer by tipping or by moving your website to PliggDrive!
Visit Pligg Pro the official Pligg Mods & Template Shop!



Reply With Quote
The Following User Says Thank You to chuckroast For This Useful Post: