|
From: Bart v. B. <ba...@us...> - 2002-01-14 23:24:56
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv29707
Modified Files:
viewforum.php
Log Message:
Changed pagination of multi-page topics
Index: viewforum.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewforum.php,v
retrieving revision 1.119
retrieving revision 1.120
diff -C2 -r1.119 -r1.120
*** viewforum.php 2002/01/12 17:00:32 1.119
--- viewforum.php 2002/01/14 23:24:53 1.120
***************
*** 465,468 ****
--- 465,469 ----
if( ( $replies + 1 ) > $board_config['posts_per_page'] )
{
+ $total_pages = ceil(($replies+1)/$board_config['posts_per_page']);
$goto_page = " [ <img src=\"" . $images['icon_gotopost'] . "\" alt=\"" . $lang['Goto_page'] . "\" title=\"" . $lang['Goto_page'] . "\" />" . $lang['Goto_page'] . ": ";
***************
*** 470,487 ****
for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page'])
{
! if( $times > 4 )
{
! if( $j + $board_config['posts_per_page'] >= $replies + 1 )
! {
! $goto_page .= " ... <a href=\"".append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$j") . "\">$times</a>";
! }
}
! else
{
! if( $times != 1 )
! {
! $goto_page .= ", ";
! }
! $goto_page .= "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$j") . "\">$times</a>";
}
$times++;
--- 471,484 ----
for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page'])
{
! $goto_page .= "<a href=\"".append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$j") . "\">$times</a>";
! if( $times == 1 && $total_pages > 4)
{
! $goto_page .= " ... ";
! $times = $total_pages - 3;
! $j += ($total_pages-4) * $board_config['posts_per_page'];
}
! else if ($times < $total_pages)
{
! $goto_page .= ", ";
}
$times++;
|