XF 2.2 Help with SQL query to get who replied to a thread

Hi

The following SQL query will fetch who replied to any thread.

Code:
SELECT DISTINCT xf_post.user_id,
        xf_post.username, xf_user.user_group_id
        FROM xf_post, xf_user
        WHERE thread_id = ?
        AND xf_user.user_id = xf_post.user_id
        ORDER BY user_id ASC

I want to call it via simple callback (not addon)

Code:
<xf:callback class="\whoreplied\whoreplied" method="getHtml"></xf:callback>

The problem is how to get $thread_id automatically?

Can you help me with code

Thanks


 
Top Bottom