|
From: Paul S. O. <ps...@us...> - 2002-03-21 01:39:03
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv16715
Modified Files:
search.php
Log Message:
Update goto page code
Index: search.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/search.php,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -r1.67 -r1.68
*** search.php 20 Mar 2002 15:57:21 -0000 1.67
--- search.php 21 Mar 2002 01:38:58 -0000 1.68
***************
*** 826,836 ****
if( $userdata['session_logged_in'] && $searchset[$i]['post_time'] > $userdata['user_lastvisit'] )
{
! if( !empty($tracking_topics['' . $topic_id . '']) && !empty($tracking_forums['' . $forum_id . '']) )
{
! $topic_last_read = ( $tracking_topics['' . $topic_id . ''] > $tracking_forums['' . $forum_id . ''] ) ? $tracking_topics['' . $topic_id . ''] : $tracking_forums['' . $forum_id . ''];
}
! else if( !empty($tracking_topics['' . $topic_id . '']) || !empty($tracking_forums['' . $forum_id . '']) )
{
! $topic_last_read = ( !empty($tracking_topics['' . $topic_id . '']) ) ? $tracking_topics['' . $topic_id . ''] : $tracking_forums['' . $forum_id . ''];
}
--- 826,836 ----
if( $userdata['session_logged_in'] && $searchset[$i]['post_time'] > $userdata['user_lastvisit'] )
{
! if( !empty($tracking_topics[$topic_id]) && !empty($tracking_forums[$forum_id]) )
{
! $topic_last_read = ( $tracking_topics[$topic_id] > $tracking_forums[$forum_id] ) ? $tracking_topics[$topic_id] : $tracking_forums[$forum_id];
}
! else if( !empty($tracking_topics[$topic_id]) || !empty($tracking_forums[$forum_id]) )
{
! $topic_last_read = ( !empty($tracking_topics[$topic_id]) ) ? $tracking_topics[$topic_id] : $tracking_forums[$forum_id];
}
***************
*** 868,872 ****
else
{
! $message = "";
if( count($orig_word) )
--- 868,872 ----
else
{
! $message = '';
if( count($orig_word) )
***************
*** 898,930 ****
$replies = $searchset[$i]['topic_replies'];
! if( $replies > $board_config['topics_per_page'] )
{
! $goto_page = '[ <img src="' . $images['icon_gotopost'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" />' . $lang['Goto_page'] . ': ';
$times = 1;
for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page'])
{
! $base_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$j&highlight=$highlight_active");
!
! if( $times > 4 )
{
! if( $j + $board_config['topics_per_page'] >= $replies + 1 )
! {
! $goto_page .= ' ... <a href="' . $base_url . '">' . $times . '</a>';
! }
}
! else
{
! if( $times != 1 )
! {
! $goto_page .= ', ';
! }
!
! $goto_page .= '<a href="' . $base_url . '">' . $times . '</a>';
}
-
$times++;
}
! $goto_page .= ' ]';
}
else
--- 898,923 ----
$replies = $searchset[$i]['topic_replies'];
! 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'] . ': ';
$times = 1;
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++;
}
! $goto_page .= ' ] ';
}
else
***************
*** 976,980 ****
if( $searchset[$i]['post_time'] > $userdata['user_lastvisit'] )
{
! if( !empty($tracking_topics) || !empty($tracking_forums) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_all"]) )
{
--- 969,973 ----
if( $searchset[$i]['post_time'] > $userdata['user_lastvisit'] )
{
! if( !empty($tracking_topics) || !empty($tracking_forums) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
***************
*** 1009,1013 ****
$folder_image = '<img src="' . $folder_new . '" alt="' . $lang['New_posts'] . '" title="' . $lang['New_posts'] . '" />';
! $newest_post_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest\"><img src=\"" . $images['icon_newest_reply'] . "\" alt=\"" . $lang['View_newest_post'] . "\" title=\"" . $lang['View_newest_post'] . "\" border=\"0\" /></a> ";
}
else
--- 1002,1006 ----
$folder_image = '<img src="' . $folder_new . '" alt="' . $lang['New_posts'] . '" title="' . $lang['New_posts'] . '" />';
! $newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
}
else
***************
*** 1024,1028 ****
$folder_image = '<img src="' . $folder_new . '" alt="' . $lang['New_posts'] . '" title="' . $lang['New_posts'] . '" />';
! $newest_post_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest\"><img src=\"" . $images['icon_newest_reply'] . "\" alt=\"" . $lang['View_newest_post'] . "\" title=\"" . $lang['View_newest_post'] . "\" border=\"0\" /></a> ";
}
else
--- 1017,1021 ----
$folder_image = '<img src="' . $folder_new . '" alt="' . $lang['New_posts'] . '" title="' . $lang['New_posts'] . '" />';
! $newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
}
else
|