From: Henry S. <kel...@ph...> - 2009-08-12 10:31:22
|
Author: Kellanved Date: Wed Aug 12 11:30:37 2009 New Revision: 9961 Log: populate who is online only where required Modified: branches/phpBB-3_0_0/phpBB/faq.php branches/phpBB-3_0_0/phpBB/includes/functions.php branches/phpBB-3_0_0/phpBB/memberlist.php branches/phpBB-3_0_0/phpBB/posting.php branches/phpBB-3_0_0/phpBB/viewforum.php branches/phpBB-3_0_0/phpBB/viewtopic.php Modified: branches/phpBB-3_0_0/phpBB/faq.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/faq.php (original) --- branches/phpBB-3_0_0/phpBB/faq.php Wed Aug 12 11:30:37 2009 *************** *** 77,83 **** 'SWITCH_COLUMN_MANUALLY' => (!$found_switch) ? true : false, )); ! page_header($l_title); $template->set_filenames(array( 'body' => 'faq_body.html') --- 77,83 ---- 'SWITCH_COLUMN_MANUALLY' => (!$found_switch) ? true : false, )); ! page_header($l_title, false); $template->set_filenames(array( 'body' => 'faq_body.html') Modified: branches/phpBB-3_0_0/phpBB/includes/functions.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/functions.php (original) --- branches/phpBB-3_0_0/phpBB/includes/functions.php Wed Aug 12 11:30:37 2009 *************** *** 3861,3867 **** /** * Generate page header */ ! function page_header($page_title = '', $display_online_list = true) { global $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path; --- 3861,3867 ---- /** * Generate page header */ ! function page_header($page_title = '', $display_online_list = true, $forum_id = 0) { global $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path; *************** *** 3917,3926 **** * } * </code> */ ! ! $item_id = max(request_var('f', 0), 0); $item = 'forum'; - $online_users = obtain_users_online($item_id, $item); $user_online_strings = obtain_users_online_string($online_users, $item_id, $item); --- 3917,3934 ---- * } * </code> */ ! ! if ($forum_id) ! { ! $item_id = max($forum_id, 0); ! } ! else ! { ! $item_id = 0; ! } ! ! // workaround legacy code $item = 'forum'; $online_users = obtain_users_online($item_id, $item); $user_online_strings = obtain_users_online_string($online_users, $item_id, $item); Modified: branches/phpBB-3_0_0/phpBB/memberlist.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/memberlist.php (original) --- branches/phpBB-3_0_0/phpBB/memberlist.php Wed Aug 12 11:30:37 2009 *************** *** 1531,1537 **** } // Output the page ! page_header($page_title); $template->set_filenames(array( 'body' => $template_html) --- 1531,1537 ---- } // Output the page ! page_header($page_title, false); $template->set_filenames(array( 'body' => $template_html) Modified: branches/phpBB-3_0_0/phpBB/posting.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/posting.php (original) --- branches/phpBB-3_0_0/phpBB/posting.php Wed Aug 12 11:30:37 2009 *************** *** 1492,1498 **** posting_gen_attachment_entry($attachment_data, $filename_data, $allowed); // Output page ... ! page_header($page_title); $template->set_filenames(array( 'body' => 'posting_body.html') --- 1492,1498 ---- posting_gen_attachment_entry($attachment_data, $filename_data, $allowed); // Output page ... ! page_header($page_title, false); $template->set_filenames(array( 'body' => 'posting_body.html') *************** *** 1520,1526 **** ($forum_style) ? $user->setup('posting', $forum_style) : $user->setup('posting'); ! page_header($user->lang['PROGRESS_BAR']); $template->set_filenames(array( 'popup' => 'posting_progress_bar.html') --- 1520,1526 ---- ($forum_style) ? $user->setup('posting', $forum_style) : $user->setup('posting'); ! page_header($user->lang['PROGRESS_BAR'], false); $template->set_filenames(array( 'popup' => 'posting_progress_bar.html') Modified: branches/phpBB-3_0_0/phpBB/viewforum.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/viewforum.php (original) --- branches/phpBB-3_0_0/phpBB/viewforum.php Wed Aug 12 11:30:37 2009 *************** *** 142,148 **** } // Dump out the page header and load viewforum template ! page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name']); $template->set_filenames(array( 'body' => 'viewforum_body.html') --- 142,148 ---- } // Dump out the page header and load viewforum template ! page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name'], true, $forum_id); $template->set_filenames(array( 'body' => 'viewforum_body.html') Modified: branches/phpBB-3_0_0/phpBB/viewtopic.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/viewtopic.php (original) --- branches/phpBB-3_0_0/phpBB/viewtopic.php Wed Aug 12 11:30:37 2009 *************** *** 1675,1681 **** } // Output the page ! page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title']); $template->set_filenames(array( 'body' => ($view == 'print') ? 'viewtopic_print.html' : 'viewtopic_body.html') --- 1675,1681 ---- } // Output the page ! page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title'], true, $forum_id); $template->set_filenames(array( 'body' => ($view == 'print') ? 'viewtopic_print.html' : 'viewtopic_body.html') |