|
From: Paul S. O. <ps...@us...> - 2001-10-25 23:21:14
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv20465
Modified Files:
viewtopic.php viewforum.php index.php privmsg.php
Log Message:
Altered various language constructs + new quote changes for PM + altered pagination
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -r1.124 -r1.125
*** viewtopic.php 2001/10/16 23:34:45 1.124
--- viewtopic.php 2001/10/25 23:21:11 1.125
***************
*** 57,61 ****
if( $HTTP_GET_VARS["view"] == "newest" )
{
! if(isset($HTTP_COOKIE_VARS[$board_config['cookie_name']]))
{
$sessiondata = unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name']]));
--- 57,61 ----
if( $HTTP_GET_VARS["view"] == "newest" )
{
! if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name']]) )
{
$sessiondata = unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name']]));
***************
*** 69,73 ****
ORDER BY post_time ASC
LIMIT 1";
! if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain newer/older topic information", "", __LINE__, __FILE__, $sql);
--- 69,73 ----
ORDER BY post_time ASC
LIMIT 1";
! if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain newer/older topic information", "", __LINE__, __FILE__, $sql);
***************
*** 89,98 ****
}
}
! else if($HTTP_GET_VARS["view"] == "next")
{
$sql_condition = ">";
$sql_ordering = "ASC";
}
! else if($HTTP_GET_VARS["view"] == "previous")
{
$sql_condition = "<";
--- 89,98 ----
}
}
! else if( $HTTP_GET_VARS["view"] == "next" )
{
$sql_condition = ">";
$sql_ordering = "ASC";
}
! else if( $HTTP_GET_VARS["view"] == "previous" )
{
$sql_condition = "<";
***************
*** 117,121 ****
if( !$row = $db->sql_fetchrow($result) )
{
! if($HTTP_GET_VARS["view"] == "next")
{
message_die(GENERAL_MESSAGE, 'No_newer_topics');
--- 117,121 ----
if( !$row = $db->sql_fetchrow($result) )
{
! if( $HTTP_GET_VARS["view"] == "next" )
{
message_die(GENERAL_MESSAGE, 'No_newer_topics');
***************
*** 486,489 ****
--- 486,516 ----
}
+ //
+ // Was a highlight request part of the URI? Yes, this idea was
+ // taken from vB but we did already have a highlighter in place
+ // in search itself ... it's just been extended a bit!
+ //
+
+ if( isset($HTTP_GET_VARS['highlight']) )
+ {
+ //
+ // Split words and phrases
+ //
+ $words = explode(" ", $HTTP_GET_VARS['highlight']);
+
+ for($i = 0; $i < count($words); $i++)
+ {
+ $highlight_match[] = "#\b(" . str_replace("\*", ".*?", preg_quote($words[$i], "#")) . ")\b#i";
+ $highlight_replace[] = "<font color=\"#FF0000\"><b>\\1</b></font>";
+ }
+
+ $highlight_active = ( count($words) ) ? true : false;
+
+ }
+ else
+ {
+ $highlight_active = false;
+ }
+
$template->assign_vars(array(
"FORUM_NAME" => $forum_name,
***************
*** 673,677 ****
{
case USER_AVATAR_UPLOAD:
! $poster_avatar = "<img src=\"" . $board_config['avatar_path'] . "/" . $postrow[$i]['user_avatar'] . "\" alt=\"\" />";
break;
case USER_AVATAR_REMOTE:
--- 700,704 ----
{
case USER_AVATAR_UPLOAD:
! $poster_avatar = ( $board_config['avatar_upload_db'] ) ? "<img src=\"avatar.$phpEx?p=" . $postrow[$i]['post_id'] . "\" alt=\"\" />" : "<img src=\"" . $board_config['avatar_path'] . "/" . $postrow[$i]['user_avatar'] . "\" alt=\"\" />";
break;
case USER_AVATAR_REMOTE:
***************
*** 807,811 ****
$quote_img = "<a href=\"" . append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_quote'] . "\" alt=\"" . $lang['Reply_with_quote'] ."\" border=\"0\" /></a>";
! $search_img = "<a href=\"" . append_sid("search.$phpEx?a=" . urlencode($poster) . "&f=all&b=0&d=DESC&c=100&dosearch=1") . "\"><img src=\"" . $images['icon_search'] . "\" border=\"0\" /></a>";
if( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] )
--- 834,838 ----
$quote_img = "<a href=\"" . append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_quote'] . "\" alt=\"" . $lang['Reply_with_quote'] ."\" border=\"0\" /></a>";
! $search_img = "<a href=\"" . append_sid("search.$phpEx?search_author=" . urlencode($poster)) . "\"><img src=\"" . $images['icon_search'] . "\" border=\"0\" /></a>";
if( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] )
***************
*** 873,876 ****
--- 900,908 ----
}
+ if( $highlight_active )
+ {
+ $message = preg_replace($highlight_match, $highlight_replace, $message);
+ }
+
$message = make_clickable($message);
***************
*** 886,890 ****
}
! if($board_config['allow_smilies'] && $postrow[$i]['enable_smilies'])
{
$message = smilies_pass($message);
--- 918,922 ----
}
! if( $board_config['allow_smilies'] && $postrow[$i]['enable_smilies'] )
{
$message = smilies_pass($message);
***************
*** 896,904 ****
// Editing information
//
! if($postrow[$i]['post_edit_count'])
{
! $l_edit_total = ($postrow[$i]['post_edit_count'] == 1) ? $lang['time_in_total'] : $lang['times_in_total'];
!
! $message = $message . "<br /><br /><font size=\"-2\">" . $lang['Edited_by'] . " " . $poster . " " . $lang['on'] . " " . create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']) . ", " . $lang['edited'] . " " . $postrow[$i]['post_edit_count'] . " $l_edit_total</font>";
}
--- 928,936 ----
// Editing information
//
! if( $postrow[$i]['post_edit_count'] )
{
! $l_edit_time_total = ( $postrow[$i]['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total'];
!
! $l_edited_by = "<br /><br />" . sprintf($l_edit_time_total, $poster, create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']), $postrow[$i]['post_edit_count']);
}
***************
*** 914,917 ****
--- 946,950 ----
"ROW_CLASS" => $row_class,
"MINI_POST_IMG" => $mini_post_img,
+
"POSTER_NAME" => $poster,
"POSTER_RANK" => $poster_rank,
***************
*** 921,927 ****
"POSTER_FROM" => $poster_from,
"POSTER_AVATAR" => $poster_avatar,
"POST_DATE" => $post_date,
"POST_SUBJECT" => $post_subject,
! "MESSAGE" => $message,
"PROFILE_IMG" => $profile_img,
"SEARCH_IMG" => $search_img,
--- 954,963 ----
"POSTER_FROM" => $poster_from,
"POSTER_AVATAR" => $poster_avatar,
+
"POST_DATE" => $post_date,
"POST_SUBJECT" => $post_subject,
! "MESSAGE" => $message,
! "EDITED_MESSAGE" => $l_edited_by,
!
"PROFILE_IMG" => $profile_img,
"SEARCH_IMG" => $search_img,
***************
*** 934,937 ****
--- 970,974 ----
"MSN_IMG" => $msn_img,
"YIM_IMG" => $yim_img,
+
"EDIT_IMG" => $edit_img,
"QUOTE_IMG" => $quote_img,
***************
*** 947,968 ****
// User authorisation levels output
//
! $s_auth_can = $lang['You'] . " " . ( ($is_auth['auth_post']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['post_topics'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_reply']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['reply_posts'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_edit']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['edit_posts'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_delete']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['delete_posts'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_vote']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['vote_polls'] . "<br />";
! /*
! $s_auth_post_img = "<img src=\"" . ( ($is_auth['auth_post']) ? $image['auth_can_post'] : $image['auth_cannot_post'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_post']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['post_topics'] . "\" />";
! $s_auth_reply_img = "<img src=\"" . ( ($is_auth['auth_reply']) ? $image['auth_can_reply'] : $image['auth_cannot_reply'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_reply']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['reply_posts'] . "\" />";
! $s_auth_edit_img = "<img src=\"" . ( ($is_auth['auth_edit']) ? $image['auth_can_edit'] : $image['auth_cannot_edit'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_edit']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['edit_posts'] . "\" />";
! $s_auth_delete_img = "<img src=\"" . ( ($is_auth['auth_delete']) ? $image['auth_can_delete'] : $image['auth_cannot_delete'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_delete']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['delete_posts'] . "\" />";
! $s_auth_delete_img = "<img src=\"" . ( ($is_auth['auth_vote']) ? $image['auth_can_vote'] : $image['auth_cannot_vote'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_vote']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['vote_polls'] . "\" />";
! */
if( $is_auth['auth_mod'] )
{
! $s_auth_can .= $lang['You'] . " " . $lang['can'] . " <a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">" . $lang['moderate_forum'] . "</a><br />";
!
! // $s_auth_mod_img = "<a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\"><img src=\"" . $images['auth_mod'] . "\" alt=\"" . $lang['You'] . " " . $lang['can'] . " " . $lang['moderate_forum'] . "\" border=\"0\"/></a>";
$topic_mod = "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete") . "\"><img src=\"" . $images['topic_mod_delete'] . "\" alt = \"" . $lang['Delete_topic'] . "\" border=\"0\" /></a> ";
--- 984,996 ----
// User authorisation levels output
//
! $s_auth_can = ( ( $is_auth['auth_post'] ) ? $lang['Rules_post_can'] : $lang['Rules_post_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_reply'] ) ? $lang['Rules_reply_can'] : $lang['Rules_reply_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_edit'] ) ? $lang['Rules_edit_can'] : $lang['Rules_edit_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_delete'] ) ? $lang['Rules_delete_can'] : $lang['Rules_delete_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . "<br />";
if( $is_auth['auth_mod'] )
{
! $s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">", "</a>");
$topic_mod = "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete") . "\"><img src=\"" . $images['topic_mod_delete'] . "\" alt = \"" . $lang['Delete_topic'] . "\" border=\"0\" /></a> ";
***************
*** 984,990 ****
// Topic watch information
//
! if($can_watch_topic)
{
! if($is_watching_topic)
{
$s_watching_topic = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start") . "\">" . $lang['Stop_watching_topic'] . "</a>";
--- 1012,1018 ----
// Topic watch information
//
! if( $can_watch_topic )
{
! if( $is_watching_topic )
{
$s_watching_topic = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start") . "\">" . $lang['Stop_watching_topic'] . "</a>";
***************
*** 1004,1022 ****
$template->assign_vars(array(
"PAGINATION" => generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order", $total_replies, $board_config['posts_per_page'], $start),
! "ON_PAGE" => ( floor( $start / $board_config['posts_per_page'] ) + 1 ),
! "TOTAL_PAGES" => ceil( $total_replies / $board_config['posts_per_page'] ),
"S_AUTH_LIST" => $s_auth_can,
- "S_AUTH_READ_IMG" => $s_auth_read_img,
- "S_AUTH_POST_IMG" => $s_auth_post_img,
- "S_AUTH_REPLY_IMG" => $s_auth_reply_img,
- "S_AUTH_EDIT_IMG" => $s_auth_edit_img,
- "S_AUTH_MOD_IMG" => $s_auth_mod_img,
"S_TOPIC_ADMIN" => $topic_mod,
"S_WATCH_TOPIC" => $s_watching_topic,
- "S_WATCH_TOPIC_IMG" => $s_watching_topic_img,
- "L_OF" => $lang['of'],
- "L_PAGE" => $lang['Page'],
"L_GOTO_PAGE" => $lang['Goto_page'])
);
--- 1032,1041 ----
$template->assign_vars(array(
"PAGINATION" => generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order", $total_replies, $board_config['posts_per_page'], $start),
! "PAGE_NUMBER" => sprintf($lang['Page_of'], ( floor( $start / $board_config['posts_per_page'] ) + 1 ), ceil( $total_replies / $board_config['posts_per_page'] )),
"S_AUTH_LIST" => $s_auth_can,
"S_TOPIC_ADMIN" => $topic_mod,
"S_WATCH_TOPIC" => $s_watching_topic,
"L_GOTO_PAGE" => $lang['Goto_page'])
);
Index: viewforum.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewforum.php,v
retrieving revision 1.94
retrieving revision 1.95
diff -C2 -r1.94 -r1.95
*** viewforum.php 2001/10/16 16:21:23 1.94
--- viewforum.php 2001/10/25 23:21:11 1.95
***************
*** 118,123 ****
AND p.post_id = t.topic_last_post_id
AND p.post_time > " . $userdata['session_last_visit'] . "
! AND t.topic_moved_id IS NULL
! LIMIT $start, " . $board_config['topics_per_page'];
if(!$t_result = $db->sql_query($sql))
{
--- 118,122 ----
AND p.post_id = t.topic_last_post_id
AND p.post_time > " . $userdata['session_last_visit'] . "
! AND t.topic_moved_id IS NULL";
if(!$t_result = $db->sql_query($sql))
{
***************
*** 149,156 ****
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=viewforum.' . $phpEx . '?' . POST_FORUM_URL . '=' . $forum_id . '">')
);
! $message = $lang['Topics_marked_read'] . "<br /><br />" . $lang['Click'] . " <a href=\"viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id\">" . $lang['HERE'] . "</a> " . $lang['to_return_forum'];
message_die(GENERAL_MESSAGE, $message);
}
--- 148,155 ----
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">')
);
! $message = $lang['Topics_marked_read'] . "<br /><br />" . sprintf($lang['Click_return_forum'], "<a href=\"" . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">", "</a> ");
message_die(GENERAL_MESSAGE, $message);
}
***************
*** 338,360 ****
// User authorisation levels output
//
! $s_auth_can = $lang['You'] . " " . ( ($is_auth['auth_read']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['read_posts'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_post']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['post_topics'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_reply']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['reply_posts'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_edit']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['edit_posts'] . "<br />";
! $s_auth_can .= $lang['You'] . " " . ( ($is_auth['auth_delete']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['delete_posts'] . "<br />";
!
! /*
! $s_auth_read_img = "<img src=\"" . ( ($is_auth['auth_read']) ? $image['auth_can_read'] : $image['auth_cannot_read'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_read']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['read_posts'] . "\" />";
! $s_auth_post_img = "<img src=\"" . ( ($is_auth['auth_post']) ? $image['auth_can_post'] : $image['auth_cannot_post'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_post']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['post_topics'] . "\" />";
! $s_auth_reply_img = "<img src=\"" . ( ($is_auth['auth_reply']) ? $image['auth_can_reply'] : $image['auth_cannot_reply'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_reply']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['reply_posts'] . "\" />";
! $s_auth_edit_img = "<img src=\"" . ( ($is_auth['auth_edit']) ? $image['auth_can_edit'] : $image['auth_cannot_edit'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_edit']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['edit_posts'] . "\" />";
! $s_auth_delete_img = "<img src=\"" . ( ($is_auth['auth_delete']) ? $image['auth_can_delete'] : $image['auth_cannot_delete'] ) . "\" alt=\"" . $lang['You'] . " " . ( ($is_auth['auth_delete']) ? $lang['can'] : $lang['cannot'] ) . " " . $lang['delete_posts'] . "\" />";
! */
if( $is_auth['auth_mod'] )
{
! $s_auth_can .= $lang['You'] . " " . $lang['can'] . " <a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">" . $lang['moderate_forum'] . "</a><br />";
!
! // $s_auth_mod_img = "<a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\"><img src=\"" . $images['auth_mod'] . "\" alt=\"" . $lang['You'] . " " . $lang['can'] . " " . $lang['moderate_forum'] . "\" border=\"0\"/></a>";
!
}
else
--- 337,349 ----
// User authorisation levels output
//
! $s_auth_can = ( ( $is_auth['auth_post'] ) ? $lang['Rules_post_can'] : $lang['Rules_post_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_reply'] ) ? $lang['Rules_reply_can'] : $lang['Rules_reply_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_edit'] ) ? $lang['Rules_edit_can'] : $lang['Rules_edit_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_delete'] ) ? $lang['Rules_delete_can'] : $lang['Rules_delete_cannot'] ) . "<br />";
! $s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . "<br />";
!
if( $is_auth['auth_mod'] )
{
! $s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">", "</a>");
}
else
***************
*** 456,460 ****
if( ( $replies + 1 ) > $board_config['posts_per_page'] )
{
! $goto_page = " (<img src=\"" . $images['icon_minipost'] . "\" alt=\"" . $lang['Goto_page'] . "\" />" . $lang['Goto_page'] . ": ";
$times = 1;
--- 445,449 ----
if( ( $replies + 1 ) > $board_config['posts_per_page'] )
{
! $goto_page = " [ <img src=\"" . $images['icon_minipost'] . "\" alt=\"" . $lang['Goto_page'] . "\" />" . $lang['Goto_page'] . ": ";
$times = 1;
***************
*** 478,482 ****
$times++;
}
! $goto_page .= ")";
}
else
--- 467,471 ----
$times++;
}
! $goto_page .= " ] ";
}
else
***************
*** 485,494 ****
}
! if($topic_rowset[$i]['topic_status'] == TOPIC_LOCKED)
{
$folder_image = "<img src=\"" . $images['folder_locked'] . "\" alt=\"" . $lang['Topic_locked'] . "\" />";
$newest_post_img = "";
}
! else if($topic_rowset[$i]['topic_status'] == TOPIC_MOVED)
{
$topic_type = $lang['Topic_Moved'] . " ";
--- 474,483 ----
}
! if( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED )
{
$folder_image = "<img src=\"" . $images['folder_locked'] . "\" alt=\"" . $lang['Topic_locked'] . "\" />";
$newest_post_img = "";
}
! else if( $topic_rowset[$i]['topic_status'] == TOPIC_MOVED )
{
$topic_type = $lang['Topic_Moved'] . " ";
***************
*** 500,509 ****
else
{
! if($topic_rowset[$i]['topic_type'] == POST_ANNOUNCE)
{
$folder = $images['folder_announce'];
$folder_new = $images['folder_announce_new'];
}
! else if($topic_rowset[$i]['topic_type'] == POST_STICKY)
{
$folder = $images['folder_sticky'];
--- 489,498 ----
else
{
! if( $topic_rowset[$i]['topic_type'] == POST_ANNOUNCE )
{
$folder = $images['folder_announce'];
$folder_new = $images['folder_announce_new'];
}
! else if( $topic_rowset[$i]['topic_type'] == POST_STICKY )
{
$folder = $images['folder_sticky'];
***************
*** 556,566 ****
$view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
! $topic_poster = $topic_rowset[$i]['username'];
! $topic_poster_profile_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $topic_rowset[$i]['user_id']);
$last_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['board_timezone']);
$last_post = $last_post_time . "<br />" . $lang['by'] . " ";
! $last_post .= ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? $topic_rowset[$i]['user2'] . " " : "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $topic_rowset[$i]['id2']) . "\">" . $topic_rowset[$i]['user2'] . "</a> ";
$last_post .= "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $topic_rowset[$i]['topic_last_post_id']) . "#" . $topic_rowset[$i]['topic_last_post_id'] . "\"><img src=\"" . $images['icon_latest_reply'] . "\" border=\"0\" alt=\"" . $lang['View_latest_post'] . "\" /></a>";
--- 545,556 ----
$view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
! $topic_poster = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $topic_rowset[$i]['user_id']) . "\">" : "";
! $topic_poster .= $topic_rowset[$i]['username'];
! $topic_poster .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? "</a>" : "";
$last_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['board_timezone']);
$last_post = $last_post_time . "<br />" . $lang['by'] . " ";
! $last_post .= ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? ( ($topic_rowset[$i]['post_username'] != "" ) ? $topic_rowset[$i]['post_username'] . " " : $lang['Guest'] . " " ) : "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $topic_rowset[$i]['id2']) . "\">" . $topic_rowset[$i]['user2'] . "</a> ";
$last_post .= "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $topic_rowset[$i]['topic_last_post_id']) . "#" . $topic_rowset[$i]['topic_last_post_id'] . "\"><img src=\"" . $images['icon_latest_reply'] . "\" border=\"0\" alt=\"" . $lang['View_latest_post'] . "\" /></a>";
***************
*** 580,585 ****
"LAST_POST" => $last_post,
! "U_VIEW_TOPIC" => $view_topic_url,
! "U_TOPIC_POSTER_PROFILE" => $topic_poster_profile_url)
);
}
--- 570,574 ----
"LAST_POST" => $last_post,
! "U_VIEW_TOPIC" => $view_topic_url)
);
}
***************
*** 587,595 ****
$template->assign_vars(array(
"PAGINATION" => generate_pagination("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&topicdays=$topic_days", $topics_count, $board_config['topics_per_page'], $start),
! "ON_PAGE" => ( floor( $start / $board_config['topics_per_page'] ) + 1 ),
! "TOTAL_PAGES" => ceil( $topics_count / $board_config['topics_per_page'] ),
- "L_OF" => $lang['of'],
- "L_PAGE" => $lang['Page'],
"L_GOTO_PAGE" => $lang['Goto_page'],
--- 576,581 ----
$template->assign_vars(array(
"PAGINATION" => generate_pagination("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&topicdays=$topic_days", $topics_count, $board_config['topics_per_page'], $start),
! "PAGE_NUMBER" => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $topics_count / $board_config['topics_per_page'] )),
"L_GOTO_PAGE" => $lang['Goto_page'],
Index: index.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/index.php,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -r1.76 -r1.77
*** index.php 2001/10/14 18:22:32 1.76
--- index.php 2001/10/25 23:21:11 1.77
***************
*** 86,93 ****
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=index.' . $phpEx . '">')
);
! $message = $lang['Forums_marked_read'] . "<br /><br />" . $lang['Click'] . " <a href=\"index.$phpEx\">" . $lang['HERE'] . "</a> " . $lang['to_return_index'];
message_die(GENERAL_MESSAGE, $message);
--- 86,93 ----
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=' .append_sid("index.$phpEx") . '">')
);
! $message = $lang['Forums_marked_read'] . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a> ");
message_die(GENERAL_MESSAGE, $message);
***************
*** 105,109 ****
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
- $total_topics = get_db_stat('topiccount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
--- 105,108 ----
***************
*** 137,141 ****
$limit_forums = ($viewcat != -1) ? "AND f.cat_id = $viewcat " : "";
! $sql = "SELECT f.*, p.post_time, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id
--- 136,140 ----
$limit_forums = ($viewcat != -1) ? "AND f.cat_id = $viewcat " : "";
! $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id
***************
*** 143,147 ****
$limit_forums
UNION (
! SELECT f.*, NULL, NULL, NULL
FROM " . FORUMS_TABLE . " f
WHERE NOT EXISTS (
--- 142,146 ----
$limit_forums
UNION (
! SELECT f.*, NULL, NULL, NULL, NULL
FROM " . FORUMS_TABLE . " f
WHERE NOT EXISTS (
***************
*** 157,161 ****
$limit_forums = ($viewcat != -1) ? "AND f.cat_id = $viewcat " : "";
! $sql = "SELECT f.*, p.post_time, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id(+)
--- 156,160 ----
$limit_forums = ($viewcat != -1) ? "AND f.cat_id = $viewcat " : "";
! $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id(+)
***************
*** 168,172 ****
$limit_forums = ($viewcat != -1) ? "WHERE f.cat_id = $viewcat " : "";
! $sql = "SELECT f.*, p.post_time, u.username, u.user_id
FROM (( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
--- 167,171 ----
$limit_forums = ($viewcat != -1) ? "WHERE f.cat_id = $viewcat " : "";
! $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM (( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
***************
*** 192,196 ****
AND p.post_id = t.topic_last_post_id
AND p.post_time > " . $userdata['session_last_visit'] . "
! AND t.topic_moved_id IS NULL";
if(!$new_topic_ids = $db->sql_query($sql))
{
--- 191,196 ----
AND p.post_id = t.topic_last_post_id
AND p.post_time > " . $userdata['session_last_visit'] . "
! AND t.topic_moved_id IS NULL
! AND t.topic_status <> " . TOPIC_LOCKED;
if(!$new_topic_ids = $db->sql_query($sql))
{
***************
*** 248,257 ****
$template->assign_vars(array(
! "TOTAL_POSTS" => $total_posts,
! "TOTAL_USERS" => $total_users,
! "TOTAL_TOPICS" => $total_topics,
! "NEWEST_USER" => $newest_user,
! "NEWEST_UID" => $newest_uid,
! "USERS_BROWSING" => $users_browsing,
"L_FORUM_LOCKED" => $lang['Forum_is_locked'],
--- 248,254 ----
$template->assign_vars(array(
! "TOTAL_POSTS" => sprintf($lang['Posted_total'], $total_posts),
! "TOTAL_USERS" => ( $total_users == 1 ) ? sprintf($lang['Registered_user_total'], $total_users) : sprintf($lang['Registered_users_total'], $total_users),
! "NEWEST_USER" => sprintf($lang['Newest_user'], "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . "\">", $newest_user, "</a>"),
"L_FORUM_LOCKED" => $lang['Forum_is_locked'],
***************
*** 260,265 ****
"U_SEARCH_NEW" => append_sid("search.$phpEx?search_id=newposts"),
! "U_MARK_READ" => append_sid("index.$phpEx?mark=forums"),
! "U_NEWEST_USER_PROFILE" => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid"))
);
--- 257,261 ----
"U_SEARCH_NEW" => append_sid("search.$phpEx?search_id=newposts"),
! "U_MARK_READ" => append_sid("index.$phpEx?mark=forums"))
);
***************
*** 327,332 ****
$last_post = $last_post_time . "<br />" . $lang['by'] . " ";
- $last_post .= ( $forum_rows[$j]['user_id'] == ANONYMOUS ) ? $forum_rows[$j]['username'] . " " : "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $forum_rows[$j]['user_id']) . "\">" . $forum_rows[$j]['username'] . "</a> ";
$last_post .= "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $forum_rows[$j]['forum_last_post_id']) . "#" . $forum_rows[$j]['forum_last_post_id'] . "\"><img src=\"" . $images['icon_latest_reply'] . "\" border=\"0\" alt=\"" . $lang['View_latest_post'] . "\" /></a>";
}
--- 323,329 ----
$last_post = $last_post_time . "<br />" . $lang['by'] . " ";
+ $last_post .= ( $forum_rows[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_rows[$j]['post_username'] != "" ) ? $forum_rows[$j]['post_username'] . " " : $lang['Guest'] . " " ) : "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $forum_rows[$j]['user_id']) . "\">" . $forum_rows[$j]['username'] . "</a> ";
+
$last_post .= "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $forum_rows[$j]['forum_last_post_id']) . "#" . $forum_rows[$j]['forum_last_post_id'] . "\"><img src=\"" . $images['icon_latest_reply'] . "\" border=\"0\" alt=\"" . $lang['View_latest_post'] . "\" /></a>";
}
Index: privmsg.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/privmsg.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** privmsg.php 2001/10/16 14:43:03 1.36
--- privmsg.php 2001/10/25 23:21:11 1.37
***************
*** 785,789 ****
$attach_sig = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['attach_sig']) ) ? TRUE : 0 ) : $userdata['user_attachsig'];
-
$user_sig = ( $userdata['user_sig'] != "" ) ? $userdata['user_sig'] : "";
--- 785,788 ----
***************
*** 999,1006 ****
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=privmsg.' . $phpEx . '?folder=inbox">')
);
! $msg = $lang['Message_sent'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("privmsg.$phpEx?folder=inbox") . "\">" . $lang['Here'] . "</a> " . $lang['to_return_inbox'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("index.$phpEx") . "\">" . $lang['Here'] . "</a> ". $lang['to_return_index'];
message_die(GENERAL_MESSAGE, $msg);
--- 998,1005 ----
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("privmsg.$phpEx?folder=inbox") . '">')
);
! $msg = $lang['Message_sent'] . "<br /><br />" . sprintf($lang['Click_return_inbox'], "<a href=\"" . append_sid("privmsg.$phpEx?folder=inbox") . "\">", "</a> ") . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $msg);
***************
*** 1168,1174 ****
message_die(GENERAL_ERROR, "Could not obtain private message for editing.", "", __LINE__, __FILE__, $sql);
}
if( !$db->sql_numrows($pm_reply_status) )
{
! // header("Location: " . append_sid("privmsg.$phpEx?folder=$folder", true));
}
$privmsg = $db->sql_fetchrow($pm_reply_status);
--- 1167,1174 ----
message_die(GENERAL_ERROR, "Could not obtain private message for editing.", "", __LINE__, __FILE__, $sql);
}
+
if( !$db->sql_numrows($pm_reply_status) )
{
! header("Location: " . append_sid("privmsg.$phpEx?folder=$folder", true));
}
$privmsg = $db->sql_fetchrow($pm_reply_status);
***************
*** 1179,1182 ****
--- 1179,1187 ----
$to_userid = $privmsg['user_id'];
+ $privmsg_message = preg_replace("/\:$post_bbcode_uid(|\:[a-z])/si", "", $privmsg_message);
+ $privmsg_message = str_replace("<br />", "\n", $privmsg_message);
+ $privmsg_message = preg_replace($html_entities_match, $html_entities_replace, $privmsg_message);
+ $privmsg_message = preg_replace('#</textarea>#si', '</textarea>', $privmsg_message);
+
if( $mode == "quote" )
{
***************
*** 1184,1197 ****
$msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['board_timezone']); //"[date]" . $privmsg['privmsgs_time'] . "[/date]";
-
- $privmsg_message = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $privmsg_message);
- $privmsg_message = str_replace("<br />", "\n", $privmsg_message);
- $privmsg_message = preg_replace($html_entities_match, $html_entities_replace, $privmsg_message);
- $privmsg_message = preg_replace('#</textarea>#si', '</textarea>', $privmsg_message);
! $msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['default_timezone']);
- $privmsg_message = $to_username . " wrote:\n\n[quote]\n" . $privmsg_message . "\n[/quote]";
-
$mode = "reply";
}
--- 1189,1195 ----
$msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['board_timezone']); //"[date]" . $privmsg['privmsgs_time'] . "[/date]";
! $privmsg_message = "[quote=" . $to_username . "]\n" . $privmsg_message . "\n[/quote]";
$mode = "reply";
}
***************
*** 1707,1712 ****
$template->assign_block_vars("box_size_notice", array());
! $l_box_size_status = $lang['Your'] . " " . $l_box_name . " " . $lang['is'] . " " . $inbox_limit_pct . "% " . $lang['full'];
}
--- 1705,1714 ----
$template->assign_block_vars("box_size_notice", array());
+
+ // $lang_match = array("'{BOXNAME}'", "'{BOXSIZE}'");
+ // $lang_replace = array($l_box_name, $inbox_limit_pct);
+ // $l_box_size_status = preg_replace($lang_match, $lang_replace, $lang['Box_size']);
! $l_box_size_status = sprintf($lang['Box_size'], $l_box_name, $inbox_limit_pct);
}
|