Thanks Chris. Well maybe I am going about this the wrong way then. I have a listener listening on the template_hook event. I am trying to get the threads reply_count value but I don't think this info is available in any of the arguments passed to the event, but maybe I am wrong? I obviously don't want to query thread info for each time a post in a thread is parsed.
I really need to know exactly what you want to achieve.
It may be that you have to query it if the reply_count value isn't available in that template hook. Without knowing what template hook, it's going to be difficult.
Also, template hooks are officially deprecated so you should be using the built in Template Modification system for templates; though, again, if the parameter isn't available to the template then maybe the template hook is more appropriate.
Chris, thanks, this is the first I have used the Template Modification System so bear with me.
I would like to hook into the message template where currently the message_content hook is located. Right after the tag: </article>
I would like it if I had the the thread info there, without having to query it each time. From what I have read of the documentation, the only thing passed to a callback template modification is the match. I need to know the current post position and the total reply_count if the thread in the callback method..