I couldn't get to the site, it gives me a 404 error.
I think, though, that $userinfo[xxx] is info for the logged in user and $post[xxx] is the info for the person who's post it is.
So $userinfo[username] would be John Doe if John Doe was the one logged in and viewing the thread, and if the thread was started by Jim Doe, then $post[username] would be Jim Doe.
So, basically, replacing $userinfo[posts] with $post[posts] should work.
(it's a while since I've looked at it, though, so that may not be it

)