diff options
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r-- | phpBB/viewforum.php | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 1f455494f7..92ac9171cb 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -370,7 +370,7 @@ $template->assign_vars(array( 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&i=main&mode=forum_view", true, $user->session_id) : '', 'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=post&f=' . $forum_id) : '', 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($start == 0) ? '' : "&start=$start")), - 'U_CANONICAL' => generate_board_url() . '/' . append_sid("viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($start) ? "&start=$start" : ''), true, ''), + 'U_CANONICAL' => generate_board_url() . '/' . append_sid("viewforum.$phpEx", "f=$forum_id" . (($start) ? "&start=$start" : ''), true, ''), 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics&mark_time=" . time()) : '', )); @@ -395,7 +395,7 @@ $sql_array = array( * @var array forum_data Array with forum data * @var array sql_array The SQL array to get the data of all topics * @since 3.1.0-a1 -* @change 3.1.0-RC4 Added forum_data var +* @change 3.1.0-RC4 Added forum_data var */ $vars = array( 'forum_data', @@ -554,6 +554,7 @@ $sql_ary = array( * Event to modify the SQL query before the topic ids data is retrieved * * @event core.viewforum_get_topic_ids_data +* @var array forum_data Data about the forum * @var array sql_ary SQL query array to get the topic ids data * @var string sql_approved Topic visibility SQL string * @var int sql_limit Number of records to select @@ -564,8 +565,11 @@ $sql_ary = array( * @var bool store_reverse Flag indicating if we select from the late pages * * @since 3.1.0-RC4 +* +* @changed 3.1.3 Added forum_data */ $vars = array( + 'forum_data', 'sql_ary', 'sql_approved', 'sql_limit', @@ -883,6 +887,28 @@ if (sizeof($topic_list)) $s_type_switch = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0; + /** + * Event after the topic data has been assigned to the template + * + * @event core.viewforum_topic_row_after + * @var array row Array with the topic data + * @var array rowset Array with topics data (in topic_id => topic_data format) + * @var bool s_type_switch Flag indicating if the topic type is [global] announcement + * @var int topic_id The topic ID + * @var array topic_list Array with current viewforum page topic ids + * @var array topic_row Template array with topic data + * @since 3.1.3-RC1 + */ + $vars = array( + 'row', + 'rowset', + 's_type_switch', + 'topic_id', + 'topic_list', + 'topic_row', + ); + extract($phpbb_dispatcher->trigger_event('core.viewforum_topic_row_after', compact($vars))); + if ($unread_topic) { $mark_forum_read = false; |