|
From: Paul S. O. <ps...@us...> - 2002-03-21 01:38:48
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv16671
Modified Files:
viewforum.php
Log Message:
A few coding style alterations
Index: viewforum.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewforum.php,v
retrieving revision 1.132
retrieving revision 1.133
diff -C2 -r1.132 -r1.133
*** viewforum.php 18 Mar 2002 13:35:43 -0000 1.132
--- viewforum.php 21 Mar 2002 01:38:45 -0000 1.133
***************
*** 22,26 ****
define('IN_PHPBB', true);
! $phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
--- 22,26 ----
define('IN_PHPBB', true);
! $phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
***************
*** 29,37 ****
// Start initial var setup
//
! if( isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]) )
{
$forum_id = ( isset($HTTP_GET_VARS[POST_FORUM_URL]) ) ? intval($HTTP_GET_VARS[POST_FORUM_URL]) : intval($HTTP_POST_VARS[POST_FORUM_URL]);
}
! else if( isset($HTTP_GET_VARS['forum']))
{
$forum_id = $HTTP_GET_VARS['forum'];
--- 29,37 ----
// Start initial var setup
//
! if ( isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]) )
{
$forum_id = ( isset($HTTP_GET_VARS[POST_FORUM_URL]) ) ? intval($HTTP_GET_VARS[POST_FORUM_URL]) : intval($HTTP_POST_VARS[POST_FORUM_URL]);
}
! else if ( isset($HTTP_GET_VARS['forum']))
{
$forum_id = $HTTP_GET_VARS['forum'];
***************
*** 39,48 ****
else
{
! $forum_id = "";
}
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
! if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
{
$mark_read = (isset($HTTP_POST_VARS['mark'])) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];
--- 39,48 ----
else
{
! $forum_id = '';
}
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
! if ( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
{
$mark_read = (isset($HTTP_POST_VARS['mark'])) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];
***************
*** 50,54 ****
else
{
! $mark_read = "";
}
//
--- 50,54 ----
else
{
! $mark_read = '';
}
//
***************
*** 60,71 ****
// If not give them a nice error page.
//
! if( !empty($forum_id) )
{
$sql = "SELECT *
FROM " . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
! if( !$result = $db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql);
}
}
--- 60,71 ----
// If not give them a nice error page.
//
! if ( !empty($forum_id) )
{
$sql = "SELECT *
FROM " . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
}
***************
*** 79,83 ****
// the user.
//
! if( !($forum_row = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, 'Forum_not_exist');
--- 79,83 ----
// the user.
//
! if ( !($forum_row = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, 'Forum_not_exist');
***************
*** 99,103 ****
$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_row);
! if( !$is_auth['auth_read'] || !$is_auth['auth_view'] )
{
if ( !$userdata['session_logged_in'] )
--- 99,103 ----
$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_row);
! if ( !$is_auth['auth_read'] || !$is_auth['auth_view'] )
{
if ( !$userdata['session_logged_in'] )
***************
*** 120,143 ****
// Handle marking posts
//
! if( $mark_read == "topics" )
{
! if( $userdata['session_logged_in'] )
{
$sql = "SELECT MAX(post_time) AS last_post
FROM " . POSTS_TABLE . "
WHERE forum_id = $forum_id";
! if( !$result = $db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql);
}
! if( $db->sql_numrows($result) )
{
! $row = $db->sql_fetchrow($result);
! $tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();
! $tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
!
! if( ( count($tracking_forums) + count($tracking_topics) ) >= 150 && empty($tracking_forums['' . $forum_id . '']) )
{
asort($tracking_forums);
--- 120,141 ----
// Handle marking posts
//
! if ( $mark_read == 'topics' )
{
! if ( $userdata['session_logged_in'] )
{
$sql = "SELECT MAX(post_time) AS last_post
FROM " . POSTS_TABLE . "
WHERE forum_id = $forum_id";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
! if ( $row = $db->sql_fetchrow($result) )
{
! $tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();
! $tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();
! if ( ( count($tracking_forums) + count($tracking_topics) ) >= 150 && empty($tracking_forums[$forum_id]) )
{
asort($tracking_forums);
***************
*** 145,162 ****
}
! if( $row['last_post'] > $userdata['user_lastvisit'] )
{
! $tracking_forums['' . $forum_id . ''] = time();
! setcookie($board_config['cookie_name'] . "_f", serialize($tracking_forums), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
}
$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);
}
--- 143,160 ----
}
! if ( $row['last_post'] > $userdata['user_lastvisit'] )
{
! $tracking_forums[$forum_id] = time();
! setcookie($board_config['cookie_name'] . '_f', serialize($tracking_forums), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
}
$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);
}
***************
*** 165,177 ****
//
! $tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : "";
! $tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : "";
//
// Do the forum Prune
//
! if( $is_auth['auth_mod'] && $board_config['prune_enable'] )
{
! if( $forum_row['prune_next'] < time() && $forum_row['prune_enable'] )
{
include($phpbb_root_path . 'includes/prune.'.$phpEx);
--- 163,175 ----
//
! $tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : '';
! $tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : '';
//
// Do the forum Prune
//
! if ( $is_auth['auth_mod'] && $board_config['prune_enable'] )
{
! if ( $forum_row['prune_next'] < time() && $forum_row['prune_enable'] )
{
include($phpbb_root_path . 'includes/prune.'.$phpEx);
***************
*** 198,204 ****
GROUP BY u.user_id, u.username
ORDER BY u.user_id";
! if(!$result = $db->sql_query($sql))
{
! message_die(GENERAL_ERROR, "Could not query forum moderator information", "", __LINE__, __FILE__, $sql);
}
--- 196,202 ----
GROUP BY u.user_id, u.username
ORDER BY u.user_id";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}
***************
*** 219,225 ****
GROUP BY g.group_id, g.group_name
ORDER BY g.group_id";
! if(!$result = $db->sql_query($sql))
{
! message_die(GENERAL_ERROR, "Could not query forum moderator information", "", __LINE__, __FILE__, $sql);
}
--- 217,223 ----
GROUP BY g.group_id, g.group_name
ORDER BY g.group_id";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}
***************
*** 230,234 ****
$l_moderators = ( count($moderators) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
! $forum_moderators = ( count($moderators) ) ? implode(", ", $moderators) : $lang['None'];
unset($moderators);
--- 228,232 ----
$l_moderators = ( count($moderators) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
! $forum_moderators = ( count($moderators) ) ? implode(', ', $moderators) : $lang['None'];
unset($moderators);
***************
*** 241,245 ****
$previous_days_text = array($lang['All_Topics'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);
! if( !empty($HTTP_POST_VARS['topicdays']) || !empty($HTTP_GET_VARS['topicdays']) )
{
$topic_days = ( !empty($HTTP_POST_VARS['topicdays']) ) ? $HTTP_POST_VARS['topicdays'] : $HTTP_GET_VARS['topicdays'];
--- 239,243 ----
$previous_days_text = array($lang['All_Topics'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);
! if ( !empty($HTTP_POST_VARS['topicdays']) || !empty($HTTP_GET_VARS['topicdays']) )
{
$topic_days = ( !empty($HTTP_POST_VARS['topicdays']) ) ? $HTTP_POST_VARS['topicdays'] : $HTTP_GET_VARS['topicdays'];
***************
*** 252,258 ****
AND p.post_time >= $min_topic_time";
! if( !$result = $db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain limited topics count information", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
--- 250,256 ----
AND p.post_time >= $min_topic_time";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not obtain limited topics count information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
***************
*** 261,265 ****
$limit_topics_time = "AND p.post_time >= $min_topic_time";
! if( !empty($HTTP_POST_VARS['topicdays']) )
{
$start = 0;
--- 259,263 ----
$limit_topics_time = "AND p.post_time >= $min_topic_time";
! if ( !empty($HTTP_POST_VARS['topicdays']) )
{
$start = 0;
***************
*** 270,284 ****
$topics_count = $forum_row['forum_topics'];
! $limit_topics_time = "";
$topic_days = 0;
}
! $select_topic_days = "<select name=\"topicdays\">";
for($i = 0; $i < count($previous_days); $i++)
{
! $selected = ($topic_days == $previous_days[$i]) ? " selected=\"selected\"" : "";
! $select_topic_days .= "<option value=\"" . $previous_days[$i] . "\"$selected>" . $previous_days_text[$i] . "</option>";
}
! $select_topic_days .= "</select>";
--- 268,282 ----
$topics_count = $forum_row['forum_topics'];
! $limit_topics_time = '';
$topic_days = 0;
}
! $select_topic_days = '<select name="topicdays">';
for($i = 0; $i < count($previous_days); $i++)
{
! $selected = ($topic_days == $previous_days[$i]) ? ' selected="selected"' : '';
! $select_topic_days .= '<option value="' . $previous_days[$i] . '"' . $selected . '>' . $previous_days_text[$i] . '</option>';
}
! $select_topic_days .= '</select>';
***************
*** 295,301 ****
AND t.topic_type = " . POST_ANNOUNCE . "
ORDER BY t.topic_last_post_id DESC ";
! if( !$result = $db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain topic information", "", __LINE__, __FILE__, $sql);
}
--- 293,299 ----
AND t.topic_type = " . POST_ANNOUNCE . "
ORDER BY t.topic_last_post_id DESC ";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
***************
*** 325,331 ****
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
! if( !$result = $db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain topic information", "", __LINE__, __FILE__, $sql);
}
--- 323,329 ----
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
***************
*** 355,364 ****
//
$template->assign_vars(array(
! "L_DISPLAY_TOPICS" => $lang['Display_topics'],
! "U_POST_NEW_TOPIC" => append_sid("posting.$phpEx?mode=newtopic&" . POST_FORUM_URL . "=$forum_id"),
! "S_SELECT_TOPIC_DAYS" => $select_topic_days,
! "S_POST_DAYS_ACTION" => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_id . "&start=$start"))
);
--- 353,362 ----
//
$template->assign_vars(array(
! 'L_DISPLAY_TOPICS' => $lang['Display_topics'],
! 'U_POST_NEW_TOPIC' => append_sid("posting.$phpEx?mode=newtopic&" . POST_FORUM_URL . "=$forum_id"),
! 'S_SELECT_TOPIC_DAYS' => $select_topic_days,
! 'S_POST_DAYS_ACTION' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_id . "&start=$start"))
);
***************
*** 366,378 ****
// 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>");
}
--- 364,376 ----
// 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>');
}
***************
*** 388,436 ****
// Dump out the page header and load viewforum template
//
! $page_title = $lang['View_forum'] . " - " . $forum_row['forum_name'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
! "body" => "viewforum_body.tpl",
! "jumpbox" => "jumpbox.tpl")
);
$jumpbox = make_jumpbox();
$template->assign_vars(array(
! "L_GO" => $lang['Go'],
! "L_JUMP_TO" => $lang['Jump_to'],
! "L_SELECT_FORUM" => $lang['Select_forum'],
! "S_JUMPBOX_LIST" => $jumpbox,
! "S_JUMPBOX_ACTION" => append_sid("viewforum.$phpEx"))
);
! $template->assign_var_from_handle("JUMPBOX", "jumpbox");
$template->assign_vars(array(
! "FORUM_ID" => $forum_id,
! "FORUM_NAME" => $forum_row['forum_name'],
! "MODERATORS" => $forum_moderators,
! "IMG_POST" => ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $images['post_locked'] : $images['post_new'],
!
! "FOLDER_IMG" => $images['folder'],
! "FOLDER_NEW_IMG" => $images['folder_new'],
! "FOLDER_HOT_IMG" => $images['folder_hot'],
! "FOLDER_HOT_NEW_IMG" => $images['folder_hot_new'],
! "FOLDER_LOCKED_IMG" => $images['folder_locked'],
! "FOLDER_LOCKED_NEW_IMG" => $images['folder_locked_new'],
! "FOLDER_STICKY_IMG" => $images['folder_sticky'],
! "FOLDER_STICKY_NEW_IMG" => $images['folder_sticky_new'],
! "FOLDER_ANNOUNCE_IMG" => $images['folder_announce'],
! "FOLDER_ANNOUNCE_NEW_IMG" => $images['folder_announce_new'],
!
! "L_MODERATOR" => $l_moderators,
! "L_MARK_TOPICS_READ" => $lang['Mark_all_topics'],
! "L_POST_NEW_TOPIC" => ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $lang['Forum_locked'] : $lang['Post_new_topic'],
! "S_AUTH_LIST" => $s_auth_can,
! "U_VIEW_FORUM" => append_sid("viewforum.$phpEx?" . POST_FORUM_URL ."=$forum_id"),
! "U_MARK_READ" => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&mark=topics"))
);
//
--- 386,434 ----
// Dump out the page header and load viewforum template
//
! $page_title = $lang['View_forum'] . ' - ' . $forum_row['forum_name'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
! 'body' => 'viewforum_body.tpl',
! 'jumpbox' => 'jumpbox.tpl')
);
$jumpbox = make_jumpbox();
$template->assign_vars(array(
! 'L_GO' => $lang['Go'],
! 'L_JUMP_TO' => $lang['Jump_to'],
! 'L_SELECT_FORUM' => $lang['Select_forum'],
! 'S_JUMPBOX_LIST' => $jumpbox,
! 'S_JUMPBOX_ACTION' => append_sid("viewforum.$phpEx"))
);
! $template->assign_var_from_handle('JUMPBOX', 'jumpbox');
$template->assign_vars(array(
! 'FORUM_ID' => $forum_id,
! 'FORUM_NAME' => $forum_row['forum_name'],
! 'MODERATORS' => $forum_moderators,
! 'IMG_POST' => ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $images['post_locked'] : $images['post_new'],
!
! 'FOLDER_IMG' => $images['folder'],
! 'FOLDER_NEW_IMG' => $images['folder_new'],
! 'FOLDER_HOT_IMG' => $images['folder_hot'],
! 'FOLDER_HOT_NEW_IMG' => $images['folder_hot_new'],
! 'FOLDER_LOCKED_IMG' => $images['folder_locked'],
! 'FOLDER_LOCKED_NEW_IMG' => $images['folder_locked_new'],
! 'FOLDER_STICKY_IMG' => $images['folder_sticky'],
! 'FOLDER_STICKY_NEW_IMG' => $images['folder_sticky_new'],
! 'FOLDER_ANNOUNCE_IMG' => $images['folder_announce'],
! 'FOLDER_ANNOUNCE_NEW_IMG' => $images['folder_announce_new'],
!
! 'L_MODERATOR' => $l_moderators,
! 'L_MARK_TOPICS_READ' => $lang['Mark_all_topics'],
! 'L_POST_NEW_TOPIC' => ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $lang['Forum_locked'] : $lang['Post_new_topic'],
! 'S_AUTH_LIST' => $s_auth_can,
! 'U_VIEW_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL ."=$forum_id"),
! 'U_MARK_READ' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&mark=topics"))
);
//
***************
*** 455,477 ****
if( $topic_type == POST_ANNOUNCE )
{
! $topic_type = $lang['Topic_Announcement'] . " ";
}
else if( $topic_type == POST_STICKY )
{
! $topic_type = $lang['Topic_Sticky'] . " ";
}
else
{
! $topic_type = "";
}
if( $topic_rowset[$i]['topic_vote'] )
{
! $topic_type .= $lang['Topic_Poll'] . " ";
}
if( $topic_rowset[$i]['topic_status'] == TOPIC_MOVED )
{
! $topic_type = $lang['Topic_Moved'] . " ";
$topic_id = $topic_rowset[$i]['topic_moved_id'];
--- 453,475 ----
if( $topic_type == POST_ANNOUNCE )
{
! $topic_type = $lang['Topic_Announcement'] . ' ';
}
else if( $topic_type == POST_STICKY )
{
! $topic_type = $lang['Topic_Sticky'] . ' ';
}
else
{
! $topic_type = '';
}
if( $topic_rowset[$i]['topic_vote'] )
{
! $topic_type .= $lang['Topic_Poll'] . ' ';
}
if( $topic_rowset[$i]['topic_status'] == TOPIC_MOVED )
{
! $topic_type = $lang['Topic_Moved'] . ' ';
$topic_id = $topic_rowset[$i]['topic_moved_id'];
***************
*** 510,525 ****
}
! $newest_post_img = "";
if( $userdata['session_logged_in'] )
{
if( $topic_rowset[$i]['post_time'] > $userdata['user_lastvisit'] )
{
! if( !empty($tracking_topics) || !empty($tracking_forums) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_all"]) )
{
$unread_topics = true;
! if( !empty($tracking_topics['' . $topic_id . '']) )
{
! if( $tracking_topics['' . $topic_id . ''] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
--- 508,523 ----
}
! $newest_post_img = '';
if( $userdata['session_logged_in'] )
{
if( $topic_rowset[$i]['post_time'] > $userdata['user_lastvisit'] )
{
! if( !empty($tracking_topics) || !empty($tracking_forums) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
$unread_topics = true;
! if( !empty($tracking_topics[$topic_id]) )
{
! if( $tracking_topics[$topic_id] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
***************
*** 527,533 ****
}
! if( !empty($tracking_forums['' . $forum_id . '']) )
{
! if( $tracking_forums['' . $forum_id . ''] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
--- 525,531 ----
}
! if( !empty($tracking_forums[$forum_id]) )
{
! if( $tracking_forums[$forum_id] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
***************
*** 535,541 ****
}
! if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_all"]) )
{
! if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_all"] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
--- 533,539 ----
}
! if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
{
! if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] >= $topic_rowset[$i]['post_time'] )
{
$unread_topics = false;
***************
*** 581,585 ****
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'] . ': ';
--- 579,583 ----
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'] . ': ';
***************
*** 625,651 ****
$template->assign_block_vars("topicrow", array(
! "FORUM_ID" => $forum_id,
! "TOPIC_ID" => $topic_id,
! "FOLDER" => $folder_image,
! "TOPIC_POSTER" => $topic_poster,
! "GOTO_PAGE" => $goto_page,
! "REPLIES" => $replies,
! "NEWEST_POST_IMG" => $newest_post_img,
! "TOPIC_TITLE" => $topic_title,
! "TOPIC_TYPE" => $topic_type,
! "VIEWS" => $views,
! "LAST_POST" => $last_post,
! "ROW_COLOR" => $row_color,
! "ROW_CLASS" => $row_class,
! "U_VIEW_TOPIC" => $view_topic_url)
);
}
$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'])
);
--- 623,649 ----
$template->assign_block_vars("topicrow", array(
! 'FORUM_ID' => $forum_id,
! 'TOPIC_ID' => $topic_id,
! 'FOLDER' => $folder_image,
! 'TOPIC_POSTER' => $topic_poster,
! 'GOTO_PAGE' => $goto_page,
! 'REPLIES' => $replies,
! 'NEWEST_POST_IMG' => $newest_post_img,
! 'TOPIC_TITLE' => $topic_title,
! 'TOPIC_TYPE' => $topic_type,
! 'VIEWS' => $views,
! 'LAST_POST' => $last_post,
! 'ROW_COLOR' => $row_color,
! 'ROW_CLASS' => $row_class,
! 'U_VIEW_TOPIC' => $view_topic_url)
);
}
$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'])
);
***************
*** 656,665 ****
// No topics
//
! $no_topics_msg = ($forum_row['forum_status'] == FORUM_LOCKED) ? $lang['Forum_locked'] : $lang['No_topics_post_one'];
$template->assign_vars(array(
! "L_NO_TOPICS" => $no_topics_msg)
);
! $template->assign_block_vars("notopicsrow", array() );
}
--- 654,663 ----
// No topics
//
! $no_topics_msg = ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $lang['Forum_locked'] : $lang['No_topics_post_one'];
$template->assign_vars(array(
! 'L_NO_TOPICS' => $no_topics_msg)
);
! $template->assign_block_vars('notopicsrow', array() );
}
***************
*** 668,672 ****
// Parse the page and print
//
! $template->pparse("body");
//
--- 666,670 ----
// Parse the page and print
//
! $template->pparse('body');
//
***************
*** 675,677 ****
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
--- 673,675 ----
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
\ No newline at end of file
|