aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewforum.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-09-16 18:33:22 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-09-16 18:33:22 +0000
commit2fa463cdeb5d8e4f2373aa834154ca27ea21c97a (patch)
tree87059418d9b487f76bf1c99ae7ec3184a62cd8ef /phpBB/viewforum.php
parentd80f8d577ebdc1489b2dcf49bdb9a266d29d1ef1 (diff)
downloadforums-2fa463cdeb5d8e4f2373aa834154ca27ea21c97a.tar
forums-2fa463cdeb5d8e4f2373aa834154ca27ea21c97a.tar.gz
forums-2fa463cdeb5d8e4f2373aa834154ca27ea21c97a.tar.bz2
forums-2fa463cdeb5d8e4f2373aa834154ca27ea21c97a.tar.xz
forums-2fa463cdeb5d8e4f2373aa834154ca27ea21c97a.zip
- 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
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r--phpBB/viewforum.php15
1 files changed, 8 insertions, 7 deletions
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 .= "<a href=\"viewtopic.$phpEx$SID&amp;f=" . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&amp;t=$topic_id&amp;start=$j\">$times</a>";
+ $pagination .= "<a href=\"viewtopic.$phpEx$SID&amp;f=" . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&amp;t=$topic_id&amp;start=$j\">$times</a>";
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']),