aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-11-13 16:24:25 +0100
committerJoas Schilling <nickvergessen@gmx.de>2013-11-13 16:24:25 +0100
commitc2c976fe031b2904b3acbefb73f03827c55aa441 (patch)
tree3b291e692df354cab1d50f00f06e6c61c2ca4f87 /phpBB/viewtopic.php
parent1efab9ec772f0b62572d28d1c2d57fdb998c5f8f (diff)
downloadforums-c2c976fe031b2904b3acbefb73f03827c55aa441.tar
forums-c2c976fe031b2904b3acbefb73f03827c55aa441.tar.gz
forums-c2c976fe031b2904b3acbefb73f03827c55aa441.tar.bz2
forums-c2c976fe031b2904b3acbefb73f03827c55aa441.tar.xz
forums-c2c976fe031b2904b3acbefb73f03827c55aa441.zip
[ticket/12015] Add post counting information to event
PHPBB3-12015
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 2f9a869bc6..36669e7383 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -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'];