diff --git a/phpBB/index.php b/phpBB/index.php index 8c62327d5e..95711d4500 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -176,14 +176,14 @@ if($total_categories = $db->sql_numrows($q_categories)) { $forum_mods_single_user[$forum_mods_list[$i]['forum_id']][] = 1; - $forum_mods_name[$forum_mods_list[$i]['forum_id']][] = $forum_mods_list[$i]['username']; + $forum_mods_name[$forum_mods_list[$i]['forum_id']][] = stripslashes($forum_mods_list[$i]['username']); $forum_mods_id[$forum_mods_list[$i]['forum_id']][] = $forum_mods_list[$i]['user_id']; } else { $forum_mods_single_user[$forum_mods_list[$i]['forum_id']][] = 0; - $forum_mods_name[$forum_mods_list[$i]['forum_id']][] = $forum_mods_list[$i]['group_name']; + $forum_mods_name[$forum_mods_list[$i]['forum_id']][] = stripslashes($forum_mods_list[$i]['group_name']); $forum_mods_id[$forum_mods_list[$i]['forum_id']][] = $forum_mods_list[$i]['group_id']; } } @@ -193,12 +193,6 @@ if($total_categories = $db->sql_numrows($q_categories)) // $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_rows); - // - // Output page header and open the index body template - // - $page_title = $lang['Forum_Index']; - include($phpbb_root_path . 'includes/page_header.'.$phpEx); - $template->set_filenames(array( "body" => "index_body.tpl") ); @@ -248,37 +242,29 @@ if($total_categories = $db->sql_numrows($q_categories)) if($forum_rows[$j]['forum_status'] == FORUM_LOCKED) { $folder_image = "\"""; - } else { + $unread_topics = false; if( count($new_topic_data[$forum_id]) ) { for($k = 0; $k < count($new_topic_data[$forum_id]); $k++) { - if( isset($HTTP_COOKIE_VARS['phpbb2_' . $forum_id . '_' . $new_topic_data[$forum_id][$k]]) ) - { - $folder_image = "\"""; - } - else + if( !isset($HTTP_COOKIE_VARS['phpbb2_' . $forum_id . '_' . $new_topic_data[$forum_id][$k]]) ) { if($mark_read == "forums") { - setcookie('phpbb2_' . $forum_id . '_' . $new_topic_data[$forum_id][$k], time(), time()+6000, $cookiepath, $cookiedomain, $cookiesecure); - $folder_image = "\"""; + setcookie('phpbb2_' . $forum_id . '_' . $new_topic_data[$forum_id][$k], time(), 0, $cookiepath, $cookiedomain, $cookiesecure); } else { - $folder_image = "\"""; + $unread_topics = true; } } } } - else - { - $folder_image = "\"""; - } + $folder_image = ( $unread_topics ) ? "\""" : "\"""; } $posts = $forum_rows[$j]['forum_posts']; @@ -288,15 +274,15 @@ if($total_categories = $db->sql_numrows($q_categories)) { if($forum_rows[$j]['user_id'] == ANONYMOUS && $forum_rows[$j]['post_username'] != '') { - $last_poster = $forum_rows[$j]['post_username']; + $last_poster = stripslashes($forum_rows[$j]['post_username']); } else { - $last_poster = $forum_rows[$j]['username']; + $last_poster = stripslashes($forum_rows[$j]['username']); } $last_post_time = create_date($board_config['default_dateformat'], $forum_rows[$j]['post_time'], $board_config['default_timezone']); - $last_post = $last_post_time . "
by "; + $last_post = $last_post_time . "
" . $lang['by'] . " "; $last_post .= "" . $last_poster . " "; $last_post .= "\"""; @@ -380,6 +366,14 @@ else message_die(GENERAL_MESSAGE, $lang['No_forums']); } +// +// Output page header and open the index body template +// we do this here because of the mark topics read cookie +// code +// +$page_title = $lang['Forum_Index']; +include($phpbb_root_path . 'includes/page_header.'.$phpEx); + // // Generate the page // diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php index 9fcab40e73..d563892a24 100755 --- a/phpBB/language/lang_english.php +++ b/phpBB/language/lang_english.php @@ -6,7 +6,11 @@ * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * +<<<<<<< lang_english.php * $Id$ +======= + * $Id$ +>>>>>>> 1.104 * * ***************************************************************************/ @@ -141,6 +145,9 @@ $lang['Usergroups'] = "Usergroups"; $lang['Last_Post'] = "Last Post"; $lang['Moderator'] = "Moderator/s"; +$lang['Mark_all_topics'] = "Mark all topics read"; +$lang['Mark_all_forums'] = "Mark all forums read"; + // // Stats block text // @@ -188,8 +195,8 @@ $lang['Reached_on_error'] = "You have reached this page in error, please go back $lang['Display_topics'] = "Display topics from previous"; $lang['All_Topics'] = "All Topics"; -$lang['Annoucement'] = "Annoucement:"; -$lang['Sticky'] = "Sticky:"; +$lang['Topic_Announcement'] = "Announcement:"; +$lang['Topic_Sticky'] = "Sticky:"; // // Viewtopic @@ -242,7 +249,7 @@ $lang['Post_a_reply'] = "Post a reply"; $lang['Post_topic_as'] = "Post topic as"; $lang['Edit_Post'] = "Edit post"; $lang['Post_Normal'] = "Normal"; -$lang['Post_Annoucement'] = "Announcement"; +$lang['Post_Announcement'] = "Announcement"; $lang['Post_Sticky'] = "Sticky"; $lang['Options'] = "Options"; @@ -547,6 +554,7 @@ $lang['this_forum'] = " this forum"; // $lang['Who_is_online'] = "Who is online"; $lang['Online_explain'] = "This data is based on users active over the past five minutes"; +$lang['No_users_browsing'] = "There are no users currently browsing this forum"; $lang['Location'] = "Location"; $lang['Last_updated'] = "Last Updated"; @@ -911,4 +919,4 @@ $l_emailpass = "Email Lost Password"; $l_passexplain = "Please fill out the form, a new password will be sent to your Email address"; $l_sendpass = "Send Password"; -?> +?> \ No newline at end of file diff --git a/phpBB/templates/PSO/index_body.tpl b/phpBB/templates/PSO/index_body.tpl index 475cd3445f..ab00dea929 100644 --- a/phpBB/templates/PSO/index_body.tpl +++ b/phpBB/templates/PSO/index_body.tpl @@ -64,6 +64,8 @@ {L_FORUM_LOCKED} {L_FORUM_LOCKED} + +
{L_MARK_FORUMS_READ} {S_TIMEZONE}