From 05f1315ebb96b46ea384df73d387aeb05602d2b5 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 8 Jul 2004 22:41:04 +0000 Subject: - remove output buffering options from download.php (not needed anymore) - optimized viewtopic.php a little bit - removed the create_function (was consuming too much memory) from viewtopic - check for manually added convert[.exe] program name to imagemagick path in admin_attachments - reduced filesize checking for imagemagick program (some installations require less than 20k) - added checked="checked" for "not selected" topic icon - moved parse_text_display function from functions_posting.php to functions.php (see comment above function) - check for user_id != ANONYMOUS in page_footer for displaying the administration link (there seems to be a problem checking for global options) - rewrote attachment thumbnail functions - utilize GD2 functions if available, more uptodate checks... - changed final thumbnail size calculation - define S_ROW_COUNT within template class itself - added SID to template vars in page_header - added ability to view topic/forum within admin_viewlogs - added optional acl checking to make_jumpbox, no need to duplicate the function for this small need - added custom body file for confirm_box git-svn-id: file:///svn/phpbb/trunk@4920 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewforum.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'phpBB/viewforum.php') diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index ec1b8c20e7..9dc50e7958 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -393,7 +393,7 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) $mark_forum_read = true; - $i = $s_type_switch = 0; + $s_type_switch = 0; foreach ($topic_list as $topic_id) { $row =& $rowset[$topic_id]; @@ -531,14 +531,10 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) // Generate all the URIs ... $view_topic_url = "viewtopic.$phpEx$SID&f=" . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id"; - $last_post_img = "' . $user->img('icon_post_latest', 'VIEW_LATEST_POST') . ''; - $topic_author = ($row['topic_poster'] != ANONYMOUS) ? "' : ''; $topic_author .= ($row['topic_poster'] != ANONYMOUS) ? $row['topic_first_poster_name'] : (($row['topic_first_poster_name'] != '') ? $row['topic_first_poster_name'] : $user->lang['GUEST']); $topic_author .= ($row['topic_poster'] != ANONYMOUS) ? '' : ''; - $last_post_author = ($row['topic_last_poster_id'] == ANONYMOUS) ? (($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] . ' ' : $user->lang['GUEST'] . ' ') : "' . $row['topic_last_poster_name'] . ''; - // This will allow the style designer to output a different header // or even seperate the list of announcements from sticky and normal // topics @@ -552,20 +548,19 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) 'FIRST_POST_TIME' => $user->format_date($row['topic_time'], $config['board_timezone']), 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), - 'LAST_POST_AUTHOR' => $last_post_author, + 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'], 'GOTO_PAGE' => $goto_page, 'REPLIES' => ($auth->acl_get('m_approve')) ? $row['topic_replies_real'] : $row['topic_replies'], 'VIEWS' => $row['topic_views'], 'TOPIC_TITLE' => censor_text($row['topic_title']), 'TOPIC_TYPE' => $topic_type, - 'LAST_POST_IMG' => $last_post_img, + 'LAST_POST_IMG' => $user->img('icon_post_latest', 'VIEW_LATEST_POST'), 'NEWEST_POST_IMG' => $newest_post_img, 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? '' : '', 'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', sprintf($user->lang['TOTAL_ATTACHMENTS'], $row['topic_attachment'])) : '', - 'S_ROW_COUNT' => $i, 'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test, 'S_TOPIC_TYPE' => $row['topic_type'], 'S_USER_POSTED' => (!empty($row['mark_type'])) ? true : false, @@ -573,14 +568,14 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) 'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_gets('m_', $forum_id)) ? TRUE : FALSE, 'S_TOPIC_UNAPPROVED' => (!$row['topic_approved'] && $auth->acl_gets('m_approve', $forum_id)) ? TRUE : FALSE, - 'U_LAST_POSTER' => '', + 'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#' . $row['topic_last_post_id'], + 'U_LAST_POST_AUTHOR'=> ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? "memberlist.$phpEx$SID&mode=viewprofile&u={$row['topic_last_poster_id']}" : '', 'U_VIEW_TOPIC' => $view_topic_url, 'U_MCP_REPORT' => "mcp.$phpEx?sid={$user->session_id}&mode=reports&t=$topic_id", 'U_MCP_QUEUE' => "mcp.$phpEx?sid={$user->session_id}&mode=mod_queue&t=$topic_id") ); $s_type_switch = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0; - $i++; if ($config['load_db_lastread']) { -- cgit v1.2.1