1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 15:16:16 +02:00

[ticket/12015] Add post counting information to event

PHPBB3-12015
This commit is contained in:
Joas Schilling 2013-11-13 16:24:25 +01:00
parent 1efab9ec77
commit c2c976fe03

View File

@ -1008,10 +1008,11 @@ $sql_ary = array(
* @var int sort_days Display posts of previous x days
* @var string sort_key Key the posts are sorted by
* @var string sort_dir Direction the posts are sorted by
* @var int start Pagination information
* @var array sql_ary The SQL array to get the data of posts and posters
* @since 3.1-A1
*/
$vars = array('forum_id', 'topic_id', 'topic_data', 'post_list', 'sort_days', 'sort_key', 'sort_dir', 'sql_ary');
$vars = array('forum_id', 'topic_id', 'topic_data', 'post_list', 'sort_days', 'sort_key', 'sort_dir', 'start', 'sql_ary');
extract($phpbb_dispatcher->trigger_event('core.viewtopic_get_post_data', compact($vars)));
$sql = $db->sql_build_query('SELECT', $sql_ary);
@ -1704,6 +1705,9 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
* Modify the posts template block
*
* @event core.viewtopic_modify_post_row
* @var int start Start item of this page
* @var int i Number of the post on this page
* @var int end Number of posts on this page
* @var array row Array with original post and user data
* @var array cp_row Custom profile field data of the poster
* @var array attachments List of attachments
@ -1711,7 +1715,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
* @var array post_row Template block array of the post
* @since 3.1-A1
*/
$vars = array('row', 'cp_row', 'attachments', 'user_poster_data', 'post_row');
$vars = array('start', 'i', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row');
extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_post_row', compact($vars)));
if (isset($cp_row['row']) && sizeof($cp_row['row']))
@ -1751,6 +1755,9 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
* Event after the post data has been assigned to the template
*
* @event core.viewtopic_post_row_after
* @var int start Start item of this page
* @var int i Number of the post on this page
* @var int end Number of posts on this page
* @var array row Array with original post and user data
* @var array cp_row Custom profile field data of the poster
* @var array attachments List of attachments
@ -1758,7 +1765,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
* @var array post_row Template block array of the post
* @since 3.1-A2
*/
$vars = array('row', 'cp_row', 'attachments', 'user_poster_data', 'post_row');
$vars = array('start', 'i', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row');
extract($phpbb_dispatcher->trigger_event('core.viewtopic_post_row_after', compact($vars)));
$prev_post_id = $row['post_id'];