[PHP] core.viewtopic_post_rowset_data

These requests for events in core phpBB have been merged into 3.1/Ascraeus and will be available with the next release.
Post Reply
rechosen
Registered User
Posts: 4
Joined: Thu Apr 11, 2013 8:15 am

[PHP] core.viewtopic_post_rowset_data

Post by rechosen »

Identifier: core.viewtopic_post_rowset_data

Location: viewtopic.php in the while loop that fills $rowset. Instead of setting $rowset[$row['post_id']] directly, put the row to be added in $rowset_data and then allow listeners to modify that before it is added to $rowset.

Parameters: $rowset_data, $row

Explanation: The existing core.viewtopic_get_post_data event allows extending the query that retrieves data on posts from the database. However, any extra fields I make the query retrieve are conveniently thrown away because only a hardcoded set of fields ends up in the post rowset. If I want to use the extra fields where the template variables are generated, I need to be able to copy the field values from the database row to the rowset. Therefore, I propose to add this core.viewtopic_post_rowset_data event. I will use it in the GSoC karma extension.

Post Reply