aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-05-26 12:47:27 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-05-26 12:47:27 +0000
commit8a60622f0f5a5923e71ec035371e3b6722c8cae2 (patch)
tree7ae4db8c8f70d3dbd08c0218834eac46ed03abdc /phpBB
parentbb1679af9a8079e5531ef743e51c548a6e7e820b (diff)
downloadforums-8a60622f0f5a5923e71ec035371e3b6722c8cae2.tar
forums-8a60622f0f5a5923e71ec035371e3b6722c8cae2.tar.gz
forums-8a60622f0f5a5923e71ec035371e3b6722c8cae2.tar.bz2
forums-8a60622f0f5a5923e71ec035371e3b6722c8cae2.tar.xz
forums-8a60622f0f5a5923e71ec035371e3b6722c8cae2.zip
Altered displayed text for previous x days select
git-svn-id: file:///svn/phpbb/trunk@329 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rwxr-xr-xphpBB/language/lang_english.php9
-rw-r--r--phpBB/viewforum.php24
2 files changed, 20 insertions, 13 deletions
diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php
index 09dcb0cf29..d5cf1acf87 100755
--- a/phpBB/language/lang_english.php
+++ b/phpBB/language/lang_english.php
@@ -54,6 +54,15 @@ $l_log_me_in = "Log me in automatically";
$l_all_times = "All times are";
$l_hours = "hours";
+$l_All_Topics = "All Topics";
+$l_Day = "Day";
+$l_Days = "Days";
+$l_Week = "Week";
+$l_Weeks = "Weeks";
+$l_Month = "Month";
+$l_Months = "Months";
+$l_Year = "Year";
+
$l_anonymous = "Anonymous"; // Post
$l_guest = "Guest"; // Whosonline
$l_noposts = "No $l_posts";
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index b8cd3ea7f4..0aac1e0e97 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -39,6 +39,8 @@ else
$forum_id = ($HTTP_GET_VARS['forum']) ? $HTTP_GET_VARS['forum'] : $HTTP_POST_VARS['forum'];
}
+$start = (isset($HTTP_GET_VARS['start'])) ? $HTTP_GET_VARS['start'] : 0;
+
//
// Start session management
//
@@ -80,6 +82,7 @@ if(!$total_rows = $db->sql_numrows($result))
//
// Start auth check
//
+
//
// End of auth check
//
@@ -105,17 +108,6 @@ for($x = 0; $x < $db->sql_numrows($result); $x++)
$forum_moderators .= "<a href=\"".append_sid("profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$forum_row[$x]['user_id'])."\">".$forum_row[$x]['username']."</a>";
}
-//
-// Check for start
-//
-if(!isset($HTTP_GET_VARS['start']))
-{
- $start = 0;
-}
-else
-{
- $start = $HTTP_GET_VARS['start'];
-}
//
// Generate a 'Show posts in previous x days'
@@ -124,7 +116,8 @@ else
// with dates newer than it (to properly handle
// pagination) and alter the main query
//
-$previous_days = array(0, 1, 7, 14, 20, 30, 60, 90, 120);
+$previous_days = array(0, 1, 7, 14, 30, 60, 180, 364);
+$previous_days_text = array("$l_All_Topics", "1 $l_Day", "7 $l_Days", "2 $l_Weeks", "1 $l_Month", "2 $l_Months", "6 $l_Months", "1 $l_Year");
if(!empty($HTTP_POST_VARS['postdays']))
{
@@ -157,7 +150,7 @@ for($i = 0; $i < count($previous_days); $i++)
{
$selected = ($HTTP_POST_VARS['postdays'] == $previous_days[$i]) ? " selected" : "";
}
- $select_post_days .= ($previous_days[$i] == 0) ? "<option value=\"0\"$selected>$l_All_posts</option>" : "<option value=\"".$previous_days[$i]."\"$selected>".$previous_days[$i]." $l_Days</option>";
+ $select_post_days .= "<option value=\"".$previous_days[$i]."\"$selected>".$previous_days_text[$i]."</option>";
}
$select_post_days .= "</select>";
@@ -296,6 +289,11 @@ if($total_topics)
}
else
{
+ //
+ // This will be present in the templates
+ // at some future point when if...else
+ // constructs are available
+ //
error_die(NO_POSTS);
}