Page 1 of 1

number of comments, trackbacks, entries, & when last upd

Posted: Mon Apr 10, 2006 2:09 am
by carl_galloway
Hi all,

Is there a quick easy way of calling some variables that allow me to place the total number of comments, total number of trackbacks, total number of entries, and when the blog was last updated into index.tpl?

Would I need to create a config.inc.php, and if so what do I need to do to start the ball rolling.

Carl

Re: number of comments, trackbacks, entries, & when last

Posted: Mon Apr 10, 2006 9:52 am
by garvinhicking
Hi!

Such variables are not available by default, because they would require some intense DB lookups you don't want to perform on each page call.

However I've added a new smarty function for 1.0 and 1.1 that you can call like this:

Code: Select all

Total Entries: {serendipity_getTotalCount what='entries'}<br />
Total Comments: {serendipity_getTotalCount what='comments'}<br />
Total Trackbacks: {serendipity_getTotalCount what='trackbacks'}<br />
HTH,
Garvin