mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/php-events] Add additional vars and control to viewtopic_postrow event
PHPBB3-9550
This commit is contained in:
parent
45d534978b
commit
f01d742b56
1 changed files with 5 additions and 3 deletions
|
@ -1582,14 +1582,16 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
||||||
'L_IGNORE_POST' => ($row['hide_post']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), '<a href="' . $viewtopic_url . "&p={$row['post_id']}&view=show#p{$row['post_id']}" . '">', '</a>') : '',
|
'L_IGNORE_POST' => ($row['hide_post']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), '<a href="' . $viewtopic_url . "&p={$row['post_id']}&view=show#p{$row['post_id']}" . '">', '</a>') : '',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$user_poster_data = $user_cache[$poster_id];
|
||||||
|
|
||||||
|
$vars = array('row', 'cp_row', 'user_poster_data', 'postrow');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.viewtopic_postrow', compact($vars)));
|
||||||
|
|
||||||
if (isset($cp_row['row']) && sizeof($cp_row['row']))
|
if (isset($cp_row['row']) && sizeof($cp_row['row']))
|
||||||
{
|
{
|
||||||
$postrow = array_merge($postrow, $cp_row['row']);
|
$postrow = array_merge($postrow, $cp_row['row']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$vars = array('postrow');
|
|
||||||
extract($phpbb_dispatcher->trigger_event('core.viewtopic_postrow', compact($vars)));
|
|
||||||
|
|
||||||
// Dump vars into template
|
// Dump vars into template
|
||||||
$template->assign_block_vars('postrow', $postrow);
|
$template->assign_block_vars('postrow', $postrow);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue