Explanation: Allow extensions to get modify the topic data $sql_array when viewing a forum. For example, Topic Preview MOD does this, it adds the first_post_text to $sql_array using LEFT_JOIN statements.
Last edited by MattF on Fri Jul 19, 2013 4:20 am, edited 2 times in total.
I'm trying to implement this event to join on another database table to restrict the result set. The SQL being generated works fine, but it looks like that SQL in some places gets reused partially, and in other places not at all.
1) Retrieving the announcements preserves the JOIN, but omits the WHERE (ideally, both should actually be removed, or trigger another SQL event)
2) Retrieving the topics/stickies does not preserve the WHERE clause, again this should probably be yet another event
3) Retrieving the topic IDs doesn't use any of the original SQL changes
4) There needs to be another event used for retrieving the forum total posts
With those limitations, having full control over which topics are displayed on a forums listing page seems impossible.
The main core.viewforum_get_topic_data event could possibly pass in multiple SQL arrays, so they can be changed as needed.