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
number of comments, trackbacks, entries, & when last upd
-
carl_galloway
- Regular
- Posts: 1331
- Joined: Sun Dec 04, 2005 5:43 pm
- Location: Andalucia, Spain
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: number of comments, trackbacks, entries, & when last
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:
HTH,
Garvin
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 />
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/