# HG changeset patch # User Dan # Date 1194466961 18000 # Node ID 09f8a9a03ccfbab64466d00b7a1c97eb5e6d69ff # Parent a7d0f2711df125a2a622548988c72fcb08635827 Localized installer database info page and finished localizing sysreqs page diff -r a7d0f2711df1 -r 09f8a9a03ccf includes/template.php --- a/includes/template.php Wed Nov 07 00:34:22 2007 -0500 +++ b/includes/template.php Wed Nov 07 15:22:41 2007 -0500 @@ -1925,10 +1925,13 @@ $title = ( is_object($paths) ) ? $paths->page : 'Critical error'; $headers = ''; + + $js_dynamic = ''; if ( defined('IN_ENANO_INSTALL') ) { - $headers .= ''; + $js_dynamic .= ''; } + $js_dynamic .= ''; // The rewritten template engine will process all required vars during the load_template stage instead of (cough) re-processing everything each time around. $tpl_strings = Array( @@ -1954,7 +1957,7 @@ 'TEMPLATE_DIR'=>scriptPath.'/themes/'.$this->theme, 'THEME_ID'=>$this->theme, 'STYLE_ID'=>$this->style, - 'JS_DYNAMIC_VARS'=>'', + 'JS_DYNAMIC_VARS'=>$js_dynamic, 'SIDEBAR_RIGHT'=>'', ); $this->tpl_strings = array_merge($tpl_strings, $this->tpl_strings); diff -r a7d0f2711df1 -r 09f8a9a03ccf install.php --- a/install.php Wed Nov 07 00:34:22 2007 -0500 +++ b/install.php Wed Nov 07 15:22:41 2007 -0500 @@ -1018,26 +1018,29 @@ echo ''; } ?> -
- - - - - -
- - -

- get('meta_lbl_before_continue'); ?>
- • Review the list above to ensure that you are satisfied with any of Enano's workarounds for your server. If you need a particular feature and that feature is listed as disabled above, you should take the opportunity now to correct the problem.
- • Have your database host, name, username, and password available -

-
-
- - + + + + + +
+ + +

+ get('meta_lbl_before_continue'); ?>
+ • get('sysreqs_objective_scalebacks'); ?>
+ • get('license_objective_have_db_info'); ?> +

+
+ + + '; run_test('return false;', $lang->get('sysreqs_summary_fail_title'), $lang->get('sysreqs_summary_fail_body')); echo '
'; @@ -1088,7 +1091,7 @@ v = verify(); if(!v) { - alert('One or more of the form fields is incorrect. Please correct any information in the form that has an "X" next to it.'); + alert($lang.get('meta_msg_err_verification')); return false; } var frm = document.forms.dbinfo; @@ -1111,10 +1114,10 @@ document.getElementById('s_db_name').src='images/good.gif'; document.getElementById('s_db_auth').src='images/good.gif'; document.getElementById('s_db_root').src='images/good.gif'; - if(t.match(/_creating_db/)) document.getElementById('e_db_name').innerHTML = 'Warning:<\/b> The database you specified does not exist. It will be created during installation.'; - if(t.match(/_creating_user/)) document.getElementById('e_db_auth').innerHTML = 'Warning:<\/b> The specified regular user does not exist or the password is incorrect. The user will be created during installation. If the user already exists, the password will be reset.'; + if(t.match(/_creating_db/)) document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_warn_creating_db'); + if(t.match(/_creating_user/)) document.getElementById('e_db_auth').innerHTML = $lang.get('database_msg_warn_creating_user'); document.getElementById('s_mysql_version').src='images/good.gif'; - document.getElementById('e_mysql_version').innerHTML = 'Your version of MySQL meets Enano requirements.'; + document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_info_mysql_good'); } else { @@ -1125,50 +1128,50 @@ document.getElementById('s_db_name').src='images/unknown.gif'; document.getElementById('s_db_auth').src='images/unknown.gif'; document.getElementById('s_db_root').src='images/unknown.gif'; - document.getElementById('e_db_host').innerHTML = 'Error:<\/b> The database server "'+document.forms.dbinfo.db_host.value+'" couldn\'t be contacted.
'+t; - document.getElementById('e_mysql_version').innerHTML = 'The MySQL version that your server is running could not be determined.'; + document.getElementById('e_db_host').innerHTML = $lang.get('database_msg_err_mysql_connect', { db_host: document.forms.dbinfo.db_host.value, mysql_error: t }); + document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version'); break; case 'auth': document.getElementById('s_db_host').src='images/good.gif'; document.getElementById('s_db_name').src='images/unknown.gif'; document.getElementById('s_db_auth').src='images/bad.gif'; document.getElementById('s_db_root').src='images/unknown.gif'; - document.getElementById('e_db_auth').innerHTML = 'Error:<\/b> Access to MySQL under the specified credentials was denied.
'+t; - document.getElementById('e_mysql_version').innerHTML = 'The MySQL version that your server is running could not be determined.'; + document.getElementById('e_db_auth').innerHTML = $lang.get('database_msg_err_mysql_auth', { mysql_error: t }); + document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version'); break; case 'perm': document.getElementById('s_db_host').src='images/good.gif'; document.getElementById('s_db_name').src='images/bad.gif'; document.getElementById('s_db_auth').src='images/good.gif'; document.getElementById('s_db_root').src='images/unknown.gif'; - document.getElementById('e_db_name').innerHTML = 'Error:<\/b> Access to the specified database using those login credentials was denied.
'+t; - document.getElementById('e_mysql_version').innerHTML = 'The MySQL version that your server is running could not be determined.'; + document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_err_mysql_dbperm', { mysql_error: t }); + document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version'); break; case 'name': document.getElementById('s_db_host').src='images/good.gif'; document.getElementById('s_db_name').src='images/bad.gif'; document.getElementById('s_db_auth').src='images/good.gif'; document.getElementById('s_db_root').src='images/unknown.gif'; - document.getElementById('e_db_name').innerHTML = 'Error:<\/b> The specified database does not exist
'+t; - document.getElementById('e_mysql_version').innerHTML = 'The MySQL version that your server is running could not be determined.'; + document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_err_mysql_dbexist', { mysql_error: t }); + document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version'); break; case 'root': document.getElementById('s_db_host').src='images/good.gif'; document.getElementById('s_db_name').src='images/unknown.gif'; document.getElementById('s_db_auth').src='images/unknown.gif'; document.getElementById('s_db_root').src='images/bad.gif'; - document.getElementById('e_db_root').innerHTML = 'Error:<\/b> Access to MySQL under the specified credentials was denied.
'+t; - document.getElementById('e_mysql_version').innerHTML = 'The MySQL version that your server is running could not be determined.'; + document.getElementById('e_db_root').innerHTML = $lang.get('database_msg_err_mysql_auth', { mysql_error: t }); + document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version'); break; case 'vers': document.getElementById('s_db_host').src='images/good.gif'; document.getElementById('s_db_name').src='images/good.gif'; document.getElementById('s_db_auth').src='images/good.gif'; document.getElementById('s_db_root').src='images/good.gif'; - if(t.match(/_creating_db/)) document.getElementById('e_db_name').innerHTML = 'Warning:<\/b> The database you specified does not exist. It will be created during installation.'; - if(t.match(/_creating_user/)) document.getElementById('e_db_auth').innerHTML = 'Warning:<\/b> The specified regular user does not exist or the password is incorrect. The user will be created during installation. If the user already exists, the password will be reset.'; + if(t.match(/_creating_db/)) document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_warn_creating_db'); + if(t.match(/_creating_user/)) document.getElementById('e_db_auth').innerHTML = $lang.get('database_msg_warn_creating_user'); - document.getElementById('e_mysql_version').innerHTML = 'Error:<\/b> Your version of MySQL ('+t+') is older than 4.1.17. Enano will still work, but there is a known bug with the comment system and MySQL 4.1.11 that involves some comments not being displayed, due to an issue with the PHP function mysql_fetch_row().'; + document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_err_mysql_version', { mysql_version: t }); document.getElementById('s_mysql_version').src='images/bad.gif'; default: alert(t); @@ -1241,45 +1244,150 @@ } window.onload = verify; -

Now we need some information that will allow Enano to contact your database server. Enano uses MySQL as a data storage backend, - and we need to have access to a MySQL server in order to continue.

-

If you do not have access to a MySQL server, and you are using your own server, you can download MySQL for free from - MySQL.com. Please note that, like Enano, MySQL is licensed under the GNU GPL. - If you need to modify MySQL and then distribute your modifications, you must either distribute them under the terms of the GPL - or purchase a proprietary license.

+

get('database_blurb_needdb'); ?>

+

get('database_blurb_howtomysql'); ?>

MySQL login information for this virtual appliance:

Database hostname: localhost
Database login: username "enano", password: "clurichaun" (without quotes)
Database name: enano_www1

'; + echo '

+ ' . $lang->get('database_vm_login_info', array( 'host' => 'localhost', 'user' => 'enano', 'pass' => 'clurichaun', 'name' => 'enano_www1' )) . ' +

'; } ?>
- - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Database information

Database hostname
This is the hostname (or sometimes the IP address) of your MySQL server. In many cases, this is "localhost".
Good/bad icon
Database name
The name of the actual database. If you don't already have a database, you can create one here, if you have the username and password of a MySQL user with administrative rights.
Good/bad icon
Database login
These fields should be the username and password of a user with "select", "insert", "update", "delete", "create table", and "replace" privileges for your database.
Good/bad icon

Optional information

Table prefix
The value that you enter here will be added to the beginning of the name of each Enano table. You may use lowercase letters (a-z), numbers (0-9), and underscores (_).
Good/bad icon
Database administrative login
If the MySQL database or username that you entered above does not exist yet, you can create them here, assuming that you have the login information for an administrative user (such as root). Leave these fields blank unless you need to use them.
Good/bad icon
MySQL versionMySQL version information will be checked when you click "Test Connection".Good/bad icon
Delete existing tables?
If this option is checked, all the tables that will be used by Enano will be dropped (deleted) before the schema is executed. Do NOT use this option unless specifically instructed to.
+

get('database_table_title'); ?>

+
+ get('database_field_hostname_title'); ?> +
get('database_field_hostname_body'); ?> +
+
+ + + Good/bad icon +
+ get('database_field_dbname_title'); ?>
+ get('database_field_dbname_body'); ?>
+ +
+ + + Good/bad icon +
+ get('database_field_dbauth_title'); ?>
+ get('database_field_dbauth_body'); ?>
+ +
+ + + Good/bad icon +
+ +
+

get('database_heading_optionalinfo'); ?>

+
+ get('database_field_tableprefix_title'); ?>
+ get('database_field_tableprefix_body'); ?> +
+ + + Good/bad icon +
+ get('database_field_rootauth_title'); ?>
+ get('database_field_rootauth_body'); ?>
+ +
+ + + Good/bad icon +
+ +
+ get('database_field_mysqlversion_title'); ?> + + get('database_field_mysqlversion_blurb_willbechecked'); ?> + + Good/bad icon +
+ get('database_field_droptables_title'); ?>
+ get('database_field_droptables_body'); ?> +
+ +
+ +
+ + + + + +
+ + +

+ get('meta_lbl_before_continue'); ?>
+ • get('database_objective_test'); ?>
+ • get('database_objective_uncrypt'); ?> +

+
+
restart the installation.'; $template->footer(); exit; diff -r a7d0f2711df1 -r 09f8a9a03ccf language/english/install.json --- a/language/english/install.json Wed Nov 07 00:34:22 2007 -0500 +++ b/language/english/install.json Wed Nov 07 15:22:41 2007 -0500 @@ -24,7 +24,11 @@ enano_copyright: 'Enano and all of its code, graphics, and more code is copyright © 2006 Dan Fuhry.
This program is Free Software; see the file "GPL" included with this package for details.', sidebar_heading: 'Installation progress', btn_article: 'installation page', + btn_continue: 'Continue', lbl_before_continue: 'Before continuing:', + + msg_err_verification: 'One or more of the form fields is incorrect. Please correct any information in the form that has an "X" next to it.', + }, welcome: { modetitle: 'Welcome', @@ -77,10 +81,53 @@ summary_warn_body: 'Enano has detected that some of the features or configuration settings on your server are not optimal for the best behavior and/or performance for Enano. As a result, Enano has disabled these features as a precaution to prevent errors and potential security issues.', summary_fail_title: 'Your server does not meet the requirements for Enano to run.', - summary_fail_body: 'As a precaution, Enano will not install until the above requirements have been met. Contact your server administrator or hosting company and convince them to upgrade. Good luck.' + summary_fail_body: 'As a precaution, Enano will not install until the above requirements have been met. Contact your server administrator or hosting company and convince them to upgrade. Good luck.', + + objective_scalebacks: 'Review the list above to ensure that you are satisfied with any of Enano\'s workarounds for your server. If you need a particular feature and that feature is listed as disabled above, you should take the opportunity now to correct the problem.' }, database: { modetitle: 'Database information', + heading_optionalinfo: 'Optional information', + + msg_err_mysql_connect: 'Error: The database server "%db_host%" couldn\'t be contacted.
%mysql_error%', + msg_err_mysql_auth: 'Error: Access to MySQL under the specified credentials was denied.
%mysql_error%', + msg_err_mysql_dbperm: 'Error: Access to the specified database using those login credentials was denied.
%mysql_error%', + msg_err_mysql_dbexist: 'Error: The specified database does not exist
%mysql_error%', + msg_err_mysql_version: 'Error: Your version of MySQL (%mysql_version%) is older than 4.1.17. Enano will still work, but there is a known bug with the comment system and MySQL 4.1.11 that involves some comments not being displayed, due to an issue with the PHP function mysql_fetch_row().', + + msg_warn_creating_db: 'Warning: The database you specified does not exist. It will be created during installation.', + msg_warn_creating_user: 'Warning: The specified regular user does not exist or the password is incorrect. The user will be created during installation. If the user already exists, the password will be reset.', + msg_warn_mysql_version: 'The MySQL version that your server is running could not be determined.', + + msg_info_mysql_good: 'Your version of MySQL meets Enano requirements.', + + blurb_needdb: 'Now we need some information that will allow Enano to contact your database server. Enano uses MySQL as a data storage backend, and we need to have access to a MySQL server in order to continue.', + blurb_howtomysql: 'If you do not have access to a MySQL server, and you are using your own server, you can download MySQL for free from MySQL.com. Please note that, like Enano, MySQL is licensed under the GNU GPL. If you need to modify MySQL and then distribute your modifications, you must either distribute them under the terms of the GPL or purchase a proprietary license.', + + vm_login_info: 'MySQL login information for this virtual appliance:

Database hostname: %host%
Database login: username "%user%", password: "%pass%" (without quotes)
Database name: %name%', + + table_title: 'Database information', + + field_hostname_title: 'Database hostname', + field_hostname_body: 'This is the hostname (or sometimes the IP address) of your MySQL server. In many cases, this is "localhost".', + field_dbname_title: 'Database name', + field_dbname_body: 'The name of the actual database. If you don\'t already have a database, you can create one here, if you have the username and password of a MySQL user with administrative rights.', + field_dbauth_title: 'Database login', + field_dbauth_body: 'These fields should be the username and password of a user with "select", "insert", "update", "delete", "create table", and "replace" privileges for your database.', + field_tableprefix_title: 'Table prefix', + field_tableprefix_body: 'The value that you enter here will be added to the beginning of the name of each Enano table. You may use lowercase letters (a-z), numbers (0-9), and underscores (_).', + field_rootauth_title: 'Database administrative login', + field_rootauth_body: 'If the MySQL database or username that you entered above does not exist yet, you can create them here, assuming that you have the login information for an administrative user (such as root). Leave these fields blank unless you need to use them.', + field_mysqlversion_title: 'MySQL version', + field_mysqlversion_blurb_willbechecked: 'MySQL version information will be checked when you click "Test Connection".', + field_droptables_title: 'Delete existing tables?', + field_droptables_body: 'If this option is checked, all the tables that will be used by Enano will be dropped (deleted) before the schema is executed. Do NOT use this option unless specifically instructed to.', + field_droptables_lbl: 'Drop existing tables', + + btn_testconnection: 'Test connection', + + objective_test: 'Check your MySQL connection using the "Test Connection" button.', + objective_uncrypt: 'Be aware that your database information will be transmitted unencrypted several times.', }, website: { modetitle: 'Website configuration',