From 2fa463cdeb5d8e4f2373aa834154ca27ea21c97a Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 16 Sep 2004 18:33:22 +0000 Subject: - more updates, mostly bugfixes to the bbcode parser - changed current_user in sessions (please review) - give more flexibility to style authors in regard to the pagination elements - profile fields updates (included a sample constuct into viewtopic_body.html - have to be documented extensivly) - code optimizations (use of strpos, sizeof, loops not iterating functions on every call, memory savings...) - and last but not least --- hopefully not introduced more bugs than healthy (*cough*) git-svn-id: file:///svn/phpbb/trunk@4984 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewforum.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'phpBB/viewforum.php') diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index afafb1d457..1b03061a2e 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -277,6 +277,8 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) 'REPORTED_IMG' => $user->img('icon_reported', 'TOPIC_REPORTED'), 'UNAPPROVED_IMG' => $user->img('icon_unapproved', 'TOPIC_UNAPPROVED'), + 'GOTO_PAGE_IMG' => $user->img('icon_post', 'GOTO_PAGE'), + 'L_NO_TOPICS' => ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->lang['POST_FORUM_LOCKED'] : $user->lang['NO_TOPICS'], 'S_IS_POSTABLE' => ($forum_data['forum_type'] == FORUM_POST) ? true : false, @@ -503,29 +505,28 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) if (($replies + 1) > $config['posts_per_page']) { $total_pages = ceil(($replies + 1) / $config['posts_per_page']); - $goto_page = ' [ ' . $user->img('icon_post', 'GOTO_PAGE') . $user->lang['GOTO_PAGE'] . ': '; + $pagination = ''; $times = 1; for($j = 0; $j < $replies + 1; $j += $config['posts_per_page']) { - $goto_page .= "$times"; + $pagination .= "$times"; if ($times == 1 && $total_pages > 4) { - $goto_page .= ' ... '; + $pagination .= ' ... '; $times = $total_pages - 3; $j += ($total_pages - 4) * $config['posts_per_page']; } else if ($times < $total_pages) { - $goto_page .= $user->theme['primary']['pagination_sep']; + $pagination .= $user->theme['primary']['pagination_sep']; } $times++; } - $goto_page .= ' ] '; } else { - $goto_page = ''; + $pagination = ''; } // Generate all the URIs ... @@ -549,7 +550,7 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) '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' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'], - 'GOTO_PAGE' => $goto_page, + 'PAGINATION' => $pagination, 'REPLIES' => ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'], 'VIEWS' => $row['topic_views'], 'TOPIC_TITLE' => censor_text($row['topic_title']), -- cgit v1.2.1