Find How Many Times a User Posted in a Thread


Well-known member
I've been working on a simple mod to view how many times a user has posted in a thread (using thread_view). I've been running something like:
<xen:foreach loop="$posts" as ="$post">
{$post.username} - {xen:count $post.username}
As you can guess, it comes out as:
James - 1
Test - 1
James - 1
James - 1

I'm not sure (perhaps I was just tired at 3am) how to merge all the 'James' posts into one, with accumulating post numbers.

I get the feeling I'm gonna facepalm when I find out a quick method.


Well-known member
Btw, the $posts array wouldn't contain all the posts from a thread. So you won't be able to determine the correct post count in any multi-page thread; from the thread_view template itself.