My first plugin is a simple one. It’s to count posts in a category. Previously (forum thread) i used to insert query module stuff, now just use {exp:exp_catcount cat_id='x'}
{exp:weblog:categories weblog="news"}
{category_name} : {exp:exp_catcount cat_id="{category_id}" status="closed"} posts
{/exp:weblog:categories}Hope this comes in handy for some of you.
usage
{exp:exp_catcount cat_id="x" [weblog_id="x"] [status="x"] }returns:
parameters: cat_id : cat_id of the category (mandatory) weblog_id : (optional) limit to weblog (otherwise counts posts of all weblogs using the same category group) status : (optional) limit to post with status=…
edit: Description updated edit: Todo: weblog_id=2|4|7 and status=open|draft|new
Does this ignore future dated posts in the category count?
See here for my example… http://ellislab.com/forums/viewthread/53346/P18/#407733
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.