From 5c5f38ba4002e2de1c8239e6fea062916bd77849 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sat, 28 Jul 2001 14:54:42 +0000 Subject: [PATCH] Languagified the admin index git-svn-id: file:///svn/phpbb/trunk@757 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/admin/index.php | 45 ++++++++--- phpBB/language/lang_english.php | 56 ++++++++++---- .../templates/PSO/admin/admin_index_body.tpl | 74 +++++++++---------- 3 files changed, 112 insertions(+), 63 deletions(-) diff --git a/phpBB/admin/index.php b/phpBB/admin/index.php index c83ef0a572..cea59c40c5 100644 --- a/phpBB/admin/index.php +++ b/phpBB/admin/index.php @@ -44,7 +44,7 @@ if( !$userdata['session_logged_in'] ) } else if( $userdata['user_level'] != ADMIN ) { - message_die(GENERAL_MESSAGE, "You are not authorised to administer this board"); + message_die(GENERAL_MESSAGE, $lang['Not_admin']); } // @@ -89,6 +89,8 @@ if( $HTTP_GET_VARS['pane'] == 'left' ) $row_color = "#" . ( ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2']); $row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2']; + $action = preg_replace("'_'", " ", $action); + $template->assign_block_vars("catrow.actionrow", array( "ROW_COLOR" => $row_color, "ROW_CLASS" => $row_class, @@ -112,19 +114,42 @@ elseif( $HTTP_GET_VARS['pane'] == 'right' ) "body" => "admin/admin_index_body.tpl") ); + $template->assign_vars(array( + "L_WELCOME" => $lang['Welcome_phpBB'], + "L_ADMIN_INTRO" => $lang['Admin_intro'], + "L_FORUM_STATS" => $lang['Forum_stats'], + "L_WHO_IS_ONLINE" => $lang['Who_is_Online'], + "L_LOCATION" => $lang['Location'], + "L_LAST_UPDATE" => $lang['Last_updated'], + "L_IP_ADDRESS" => $lang['IP_Address'], + "L_STATISTIC" => $lang['Statistic'], + "L_VALUE" => $lang['Value'], + "L_NUMBER_POSTS" => $lang['Number_posts'], + "L_POSTS_PER_DAY" => $lang['Posts_per_day'], + "L_NUMBER_TOPICS" => $lang['Number_topics'], + "L_TOPICS_PER_DAY" => $lang['Topics_per_day'], + "L_NUMBER_USERS" => $lang['Number_users'], + "L_USERS_PER_DAY" => $lang['Users_per_day'], + "L_BOARD_STARTED" => $lang['Board_started'], + "L_AVATAR_DIR_SIZE" => $lang['Avatar_dir_size'], + "L_DB_SIZE" => $lang['Database_size']) + ); + // // Get forum statistics // $total_posts = get_db_stat('postcount'); $total_users = get_db_stat('usercount'); $total_topics = get_db_stat('topiccount'); - $start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['default_timezone']); - $boarddays = (time() - $board_config['board_startdate']) / (24*60*60); $posts_per_day = sprintf("%.2f", $total_posts / $boarddays); $topics_per_day = sprintf("%.2f", $total_topics / $boarddays); $users_per_day = sprintf("%.2f", $total_users / $boarddays); + $start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['default_timezone']); + + $boarddays = (time() - $board_config['board_startdate']) / (24*60*60); + $avatar_dir_size = 0; if ($avatar_dir = opendir($phpbb_root_path . $board_config['avatar_path'])) @@ -190,7 +215,7 @@ elseif( $HTTP_GET_VARS['pane'] == 'right' ) $dbsize = 0; for($i = 0; $i < count($tabledata_ary); $i++) { - if($tabledata_ary[$i]['Type'] != "MRG_MyISAM") + if($tabledata_ary[$i]['Type'] != "MRG_MyISAM" && strstr($tabledata_ary[$i]['Name'], $table_prefix) ) { $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; } @@ -211,7 +236,7 @@ elseif( $HTTP_GET_VARS['pane'] == 'right' ) } else { - $dbsize = "N/A"; + $dbsize = $lang['Not_available']; } $template->assign_vars(array( @@ -354,17 +379,12 @@ elseif( $HTTP_GET_VARS['pane'] == 'right' ) "LOGGED_ON" => $logged_on, "LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow[$i]['session_time'], $board_config['default_timezone']), "LOCATION" => $location, - "IPADDRESS" => $ip_address, + "IP_ADDRESS" => $ip_address, "U_USER_PROFILE" => append_sid("admin_user.$phpEx?" . POST_USERS_URL . "=" . $onlinerow[$i]['user_id']), "U_FORUM_LOCATION" => append_sid($location_url)) ); } } - $template->assign_vars(array("L_USERNAME" => $lang['Username'], - "L_LOCATION" => $lang['Location'], - "L_LAST_UPDATE" => $lang['Last_updated'], - "L_IPADDRESS" => $lang['IP_Address']) - ); $template->pparse("body"); @@ -385,6 +405,9 @@ else "S_FRAME_MAIN" => "index.$phpEx?pane=right") ); + header ("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT"); + header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + $template->pparse("body"); exit; diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php index 0b09e8d676..eec15778e8 100755 --- a/phpBB/language/lang_english.php +++ b/phpBB/language/lang_english.php @@ -401,7 +401,7 @@ $lang['Current_Image'] = "Current Image"; $lang['Notify_on_privmsg'] = "Notify on Private Message"; $lang['Hide_user'] = "Hide your online status"; -$lang['Profile_updated'] = "Your profile has been updated

" . $lang['Click_index']; +$lang['Profile_updated'] = "Your profile has been updated

" . $lang['Click_index']; $lang['Password_mismatch'] = "The passwords you entered did not match"; $lang['Invalid_username'] = "The username you requested has been taken or disallowed"; @@ -455,7 +455,7 @@ Thank you for registering. "; // END $lang['COPPA'] = "Your account has been created but has to be approved, please check your email for details."; -$lang['Welcome_COPPA'] = "Your account has been created, however in complance with the COPPA act you must print out this page and have you parent or guardian mail it to:
" . $lang['Mailing_address'] . "
Or fax it to:
" . $lang['Fax_info'] . "
Once this information has been received your account will be activated by the administrator and you will receive an email notification."; +$lang['Welcome_COPPA'] = "Your account has been created, however in complance with the COPPA act you must print out this page and have you parent or guardian mail it to:
" . $lang['Mailing_address'] . "
Or fax it to:
" . $lang['Fax_info'] . "
Once this information has been received your account will be activated by the administrator and you will receive an email notification."; // // Memberslist @@ -556,8 +556,8 @@ $lang['Viewing_FAQ'] = "Viewing FAQ"; $lang['Information'] = "Information"; $lang['Critical_Information'] = "Critical Information"; -$lang['You_been_banned'] = "You have been banned from this forum
Please contact the webmaster or board administrator for more information"; -$lang['No_topics_post_one'] = "There are no posts in this forum
Click on the Post New Topic link on this page to post one"; +$lang['You_been_banned'] = "You have been banned from this forum
Please contact the webmaster or board administrator for more information"; +$lang['No_topics_post_one'] = "There are no posts in this forum
Click on the Post New Topic link on this page to post one"; $lang['Board_disable'] = "Sorry but this board is currently unavailable, please try again later"; $lang['General_Error'] = "General Error"; @@ -565,7 +565,7 @@ $lang['Critical_Error'] = "Critical Error"; $lang['An_error_occured'] = "An Error Occured"; $lang['A_critical_error'] = "A Critical Error Occured"; -$lang['Error_login'] = "Login Failed
You have specified an incorrect/inactive username or invalid password, please go back and try again"; +$lang['Error_login'] = "Login Failed
You have specified an incorrect/inactive username or invalid password, please go back and try again"; $lang['Not_Moderator'] = "You are not a moderator of this forum"; $lang['Not_Authorised'] = "Not Authorised"; @@ -633,6 +633,32 @@ $lang[10] = "EST (Australia)"; $lang[11] = "GMT + 11" . " " . $lang['Hours']; $lang[12] = "GMT + 12" . " " . $lang['Hours']; +// +// Main Admin section/s +// + +// Index +$lang['Not_admin'] = "You are not authorised to administer this board"; +$lang['Welcome_phpBB'] = "Welcome to phpBB"; +$lang['Admin_intro'] = "Thank you for choosing phpBB as your forum solution. This screen will give you a quick overview of all the various statistics of your board. You can get back to this page by clicking on the Admin Index link in the left pane. To return to the index of your board, click the phpBB logo also in the left pane. The other links on the left hand side of this screen will allow you to control every aspect of your forum experience, each screen will have instructions on how to use the tools."; +$lang['Forum_stats'] = "Forum Statistics"; + +$lang['Statistic'] = "Statistic"; +$lang['Value'] = "Value"; +$lang['Number_posts'] = "Number of posts"; +$lang['Posts_per_day'] = "Posts per day"; +$lang['Number_topics'] = "Number of topics"; +$lang['Topics_per_day'] = "Topics per day"; +$lang['Number_users'] = "Number of users"; +$lang['Users_per_day'] = "Users per day"; +$lang['Board_started'] = "Board started"; +$lang['Avatar_dir_size'] = "Avatar directory size"; +$lang['Database_size'] = "Database size"; +$lang['Not_available'] = "Not available"; + + + + // // End // ------------------------------------------------- @@ -643,21 +669,21 @@ $lang[12] = "GMT + 12" . " " . $lang['Hours']; // Register $l_mailingaddress = " - James Atkinson
- c/o 100World.com Inc.
- 512-1529 West 6th Ave.
- Vancouver BC, V6J 1R1
- Canada
+ James Atkinson
+ c/o 100World.com Inc.
+ 512-1529 West 6th Ave.
+ Vancouver BC, V6J 1R1
+ Canada
"; $l_faxinfo = " Mark Fax with: - ATTN: James Atkinson
- RE: Forum Registration
-
- Fax Number: +1-604-742-1770
+ ATTN: James Atkinson
+ RE: Forum Registration
+
+ Fax Number: +1-604-742-1770
"; -$l_coppa = "Your account has been created, however in complance with the COPPA act you must print out this page and have you parent or guardian mail it to:
$l_mailingaddress
Or fax it to:
$l_faxinfo
Once this information has been recived your account will be activated by the administrator and you will recive and email notification."; +$l_coppa = "Your account has been created, however in complance with the COPPA act you must print out this page and have you parent or guardian mail it to:
$l_mailingaddress
Or fax it to:
$l_faxinfo
Once this information has been recived your account will be activated by the administrator and you will recive and email notification."; $l_welcomesubj = "Welcome to ".$board_config['sitename']." Forums"; $l_welcomemail = " $l_welcomesubj, diff --git a/phpBB/templates/PSO/admin/admin_index_body.tpl b/phpBB/templates/PSO/admin/admin_index_body.tpl index bcea64e37f..1fc5f405b3 100644 --- a/phpBB/templates/PSO/admin/admin_index_body.tpl +++ b/phpBB/templates/PSO/admin/admin_index_body.tpl @@ -1,47 +1,48 @@ -
-

Welcome to phpBB

+
-

Thank you for choosing phpBB as your forum solution. This screen will give you a quick overview of all the various statistics of your board. You can get back to this page by clicking on the Admin Index link in the left pane. To return to the index of your board, click the Board Index link also in the left pane. The other links on the left hand side of this screen will allow you to control every aspect of your forum experience, each screen will have instructions on how to use the tools.

+

{L_WELCOME}

-

Forum Statistics

+

{L_ADMIN_INTRO}

+ +

{L_FORUM_STATS}

- - - - + + + + - + - + - + - + - + - + - + - + - + @@ -51,28 +52,27 @@
StatisticValueStatisticValue{L_STATISTIC}{L_VALUE}{L_STATISTIC}{L_VALUE}
Current number of posts:{L_NUMBER_POSTS}: {NUMBER_OF_POSTS}Posts per day:{L_POSTS_PER_DAY}: {POSTS_PER_DAY}
Current number of topics:{L_NUMBER_TOPICS}: {NUMBER_OF_TOPICS}Topics per day:{L_TOPICS_PER_DAY}: {TOPICS_PER_DAY}
Current number of users:{L_NUMBER_USERS}: {NUMBER_OF_USERS}Users per day:{L_USERS_PER_DAY}: {USERS_PER_DAY}
Board started on:{L_BOARD_STARTED}: {START_DATE}Avatar directory size:{L_AVATAR_DIR_SIZE}: {AVATAR_DIR_SIZE}
Database size:{L_DB_SIZE}: {DB_SIZE}    
-

Users Online

+

{L_WHO_IS_ONLINE}

+ - +
- - - - - - - - - - - - - - - -
 {L_USERNAME}  {L_LAST_UPDATE}  {L_LOCATION}  {L_IPADDRESS} 
 {userrow.USERNAME}  {userrow.LASTUPDATE}  {userrow.LOCATION}  {userrow.IPADDRESS} 
-
+ + + + + + + + + + + + + + +
 {L_USERNAME}  {L_LAST_UPDATE}  {L_LOCATION}  {L_IP_ADDRESS} 
 {userrow.USERNAME}  {userrow.LASTUPDATE}  {userrow.LOCATION}  {userrow.IP_ADDRESS} 
-
+