My apologies, I was merely showing what I had done so that it could be copy pasted directly into the file if needs be. Ok what I have done there is taken the template inside the foreach loop and placed it inside a template function postViewTemplate($forum, $topic, $post, $displayData)
Currently the section of the topicViewTemplate dealing with posts is structured like so: <if test="hasPosts:|:is_array( $post_data ) AND count( $post_data )">
<!-- skinnote: Posts by ignored users are not hidden, check _ignored -->
<foreach loop="post_data:$post_data as $pid => $post">
.
.
Lots of post template stuff in here
.
.
</foreach>
</if>
<!-- MOD LINKS -->
and I changed it to this
<if test="hasPosts:|:is_array( $post_data ) AND count( $post_data )">
<!-- skinnote: Posts by ignored users are not hidden, check _ignored -->
<foreach loop="post_data:$post_data as $pid => $post">
{$this->postViewTemplate($forum, $topic, $post, $displayData)}
</foreach>
</if>
<!-- MOD LINKS -->
where the postViewTemplate function is structured like so:
//===========================================================================
// Name: postViewTemplate
//===========================================================================
function postViewTemplate($forum, $topic, $post, $displayData) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<EOF
.
.
Lots of post template stuff in here
.
.
EOF;
//--endhtml--//
return $IPBHTML;
}
This change should allow hook authors to extract post specific data from each post iteration to use in their hooks.