diff options
author | Michael Cullum <unknownbliss@phpbbdevelopers.net> | 2012-03-15 20:47:59 +0000 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2012-08-01 10:18:37 +0200 |
commit | 57c417157761cea7e4c0cdece0bdf9068f25dbbe (patch) | |
tree | 098a3c8bb3ca42ea7a754f157d5ad4e85c0874ea /phpBB/viewforum.php | |
parent | ca8de4129cbedf8eff2d97350300f59b4bf47230 (diff) | |
download | forums-57c417157761cea7e4c0cdece0bdf9068f25dbbe.tar forums-57c417157761cea7e4c0cdece0bdf9068f25dbbe.tar.gz forums-57c417157761cea7e4c0cdece0bdf9068f25dbbe.tar.bz2 forums-57c417157761cea7e4c0cdece0bdf9068f25dbbe.tar.xz forums-57c417157761cea7e4c0cdece0bdf9068f25dbbe.zip |
[feature/events] Add core.viewforum_forumrow
PHPBB3-9550
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r-- | phpBB/viewforum.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 18d247f0b6..2d5b7e0758 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -690,7 +690,7 @@ if (sizeof($topic_list)) $u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$topic_id", true, $user->session_id) : ''; // Send vars to template - $template->assign_block_vars('topicrow', array( + $forumrow = array( 'FORUM_ID' => $row['forum_id'], 'TOPIC_ID' => $topic_id, 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), @@ -742,11 +742,18 @@ if (sizeof($topic_list)) 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=reports&f=' . $row['forum_id'] . '&t=' . $topic_id, true, $user->session_id), 'U_MCP_QUEUE' => $u_mcp_queue, - 'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test) + 'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test ); + $vars = array('forumrow'); + $event = new phpbb_event_data(compact($vars)); + $phpbb_dispatcher->dispatch('core.viewforum_forumrow', $event); + extract($event->get_data_filtered($vars)); + + $template->assign_block_vars('topicrow', $forumrow); + phpbb_generate_template_pagination($template, $view_topic_url, 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true); - + $s_type_switch = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0; if ($unread_topic) |