[Easymod-cvs] easymod2/mods/easymod easymod_display_functions.php,1.11,1.12 easymod_install.php,1.17
Status: Beta
Brought to you by:
wgeric
From: Brendan K. <bk...@us...> - 2005-06-19 22:46:52
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18229/mods/easymod Modified Files: easymod_display_functions.php easymod_install.php Removed Files: lang_easymod.php Log Message: Finishing off lang support. (add guess_lang()?). Hope I didn't break anything :) Index: easymod_display_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_display_functions.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** easymod_display_functions.php 11 Jun 2005 23:05:53 -0000 1.11 --- easymod_display_functions.php 19 Jun 2005 22:46:41 -0000 1.12 *************** *** 365,369 **** function get_install_info( &$variables, $prev_em_version) { ! global $phpEx, $lang, $easymod_install_version, $phpBB_version, $phpbb_root_path, $script_path ; $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.' . $phpEx ; --- 365,369 ---- function get_install_info( &$variables, $prev_em_version) { ! global $phpEx, $lang, $easymod_install_version, $phpBB_version, $language, $phpbb_root_path, $script_path ; $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.' . $phpEx ; *************** *** 374,378 **** $variables['EM_EasyMOD_version'] = $lang['EM_EasyMOD_version'] ; ! $variables['LANG_OPTIONS'] = '<option value="english" selected="selected">English</option>' ; // HARD CODED $variables['GO'] = $lang['Go'] ; $variables['SQL_LAYER'] = SQL_LAYER ; --- 374,392 ---- $variables['EM_EasyMOD_version'] = $lang['EM_EasyMOD_version'] ; ! // Read lang directory and build list ! $dir = $phpbb_root_path . $script_path . 'language/'; ! $variables['LANG_OPTIONS'] = ''; ! if ($handle = opendir($dir)) ! { ! while (false !== ($file = @readdir($handle))) ! { ! if ($file != "." && $file != "..") ! { ! $selected = ($file == $language) ? 'selected="selected"': ''; ! $variables['LANG_OPTIONS'] .= '<option value="' . $file . '" ' . $selected . '>' . $file . '</option>'; ! } ! } ! } ! $variables['GO'] = $lang['Go'] ; $variables['SQL_LAYER'] = SQL_LAYER ; --- lang_easymod.php DELETED --- Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** easymod_install.php 15 Jun 2005 02:10:24 -0000 1.17 --- easymod_install.php 19 Jun 2005 22:46:41 -0000 1.18 *************** *** 77,110 **** $hidden = "<input type=\"hidden\" name=\"language\" value=\"$language\">\n" ; ! ! // load the appropriate lang pack ! if ($language == 'english') ! { ! // make sure the lang file exists ! if (!file_exists($phpbb_root_path . $script_path . 'lang_easymod.'.$phpEx)) ! { ! // display error message (obviously we can't use the lang system for this error) ;-) ! echo "<b>CRITICAL ERROR:</b> the lang_easymod.$phpEx file could not be found in the easymod directory. EasyMOD cannot be installed without this file present.\n" ; ! exit ; ! } ! ! include( $phpbb_root_path . $script_path . 'lang_easymod.'.$phpEx); ! } ! else { ! // make sure the lang file exists ! if (!file_exists($phpbb_root_path . $script_path . 'lang_easymod.'.$phpEx)) ! { ! // display error message (obviously we can't use the lang system from this ;-) ! echo "<b>CRITICAL ERROR:</b> the lang_easymod.$phpEx file could not be found in the easymod directory. EasyMOD cannot be installed without this file present.\n" ; ! exit ; ! } ! ! include( $phpbb_root_path . $script_path . 'lang_easymod.'.$phpEx); } ! ! ! ! // --------- --- 77,88 ---- $hidden = "<input type=\"hidden\" name=\"language\" value=\"$language\">\n" ; ! // make sure the lang file exists ! if (!file_exists($phpbb_root_path . $script_path . 'language/' . $language . '/lang_easymod.'.$phpEx)) { ! // display error message (obviously we can't use the lang system for this error) ;-) ! echo "<b>CRITICAL ERROR:</b> the lang_easymod.$phpEx file could not be found in the easymod directory. EasyMOD cannot be installed without this file present.\n" ; ! exit ; } ! include( $phpbb_root_path . $script_path . 'language/' . $language . '/lang_easymod.'.$phpEx); // --------- *************** *** 310,314 **** while( list($name, $paragraphs) = @each($lang['help']) ) { ! echo '<a name="' . $name . '" /><p>' . implode('<br />',$paragraphs) . "</p>\n"; } ?></span></td> --- 288,292 ---- while( list($name, $paragraphs) = @each($lang['help']) ) { ! echo '<a name="' . $name . '" /></a><p>' . implode('<br />',$paragraphs) . "</p>\n"; } ?></span></td> *************** *** 650,654 **** //////////// //////////// ! echo "<p>Write stuff about checking permissions and how to.</p>\n" ; form_settings( $hidden, 3, '', true) ; exit ; --- 628,632 ---- //////////// //////////// ! echo '<p>' . $lang['EM_checking_permissions'] . "</p>\n" ; form_settings( $hidden, 3, '', true) ; exit ; *************** *** 658,662 **** //////// hard coded lang //////// also... what is the "3" in the error?? should be a defined constant ! echo "<p>Undefined move method.</p>\n" ; form_settings( $hidden, 3, '', true) ; exit ; --- 636,640 ---- //////// hard coded lang //////// also... what is the "3" in the error?? should be a defined constant ! echo '<p>' . $lang['EM_undefined_move_method'] . "</p>\n" ; form_settings( $hidden, 3, '', true) ; exit ; *************** *** 785,796 **** $search_array['module'][] = "\$lang['Styles']" ; $insert['module'][] = '// EASYMOD-start' ; ! $insert['module'][] = "\$lang['Modifications'] = 'MOD Center';" ; $insert['module'][] = '// EASYMOD-end' ; $search_array['entries'][] = "\$lang['Restore_DB']" ; $insert['entries'][] = '// EASYMOD-start' ; ! $insert['entries'][] = "\$lang['MOD_ainstall'] = 'Install MODs';" ; ! $insert['entries'][] = "\$lang['MOD_settings'] = 'EasyMOD Settings';" ; ! $insert['entries'][] = "\$lang['MOD_history'] = 'EasyMOD History';" ; $insert['entries'][] = "\$lang['MOD_control_tag'] = '$easymod_install_version';" ; $insert['entries'][] = '// EASYMOD-end' ; --- 763,774 ---- $search_array['module'][] = "\$lang['Styles']" ; $insert['module'][] = '// EASYMOD-start' ; ! $insert['module'][] = "\$lang['Modifications'] = '" . $lang['EM_MOD_center'] . "';" ; $insert['module'][] = '// EASYMOD-end' ; $search_array['entries'][] = "\$lang['Restore_DB']" ; $insert['entries'][] = '// EASYMOD-start' ; ! $insert['entries'][] = "\$lang['MOD_install'] = '" . $lang['EM_install_MODs'] . "';" ; ! $insert['entries'][] = "\$lang['MOD_settings'] = '" . $lang['EM_settings'] . "';" ; ! $insert['entries'][] = "\$lang['MOD_history'] = '" . $lang['EM_history'] . "';" ; $insert['entries'][] = "\$lang['MOD_control_tag'] = '$easymod_install_version';" ; $insert['entries'][] = '// EASYMOD-end' ; *************** *** 808,814 **** $insert['entries'][] = '// EASYMOD-start' ; ! $insert['entries'][] = "\$lang['MOD_ainstall'] = 'Install MODs';" ; ! $insert['entries'][] = "\$lang['MOD_settings'] = 'EasyMOD Settings';" ; ! $insert['entries'][] = "\$lang['MOD_history'] = 'EasyMOD History';" ; $insert['entries'][] = "\$lang['MOD_control_tag'] = '" . $easymod_install_version . "';" ; $insert['entries'][] = '// EASYMOD-end' ; --- 786,792 ---- $insert['entries'][] = '// EASYMOD-start' ; ! $insert['entries'][] = "\$lang['MOD_install'] = '" . $lang['EM_install_MODs'] . "';" ; ! $insert['entries'][] = "\$lang['MOD_settings'] = '" . $lang['EM_settings'] . "';" ; ! $insert['entries'][] = "\$lang['MOD_history'] = '" . $lang['EM_history'] . "';" ; $insert['entries'][] = "\$lang['MOD_control_tag'] = '" . $easymod_install_version . "';" ; $insert['entries'][] = '// EASYMOD-end' ; *************** *** 825,831 **** $search_array['entries'][0] = '// EASYMOD-start' ; ! $insert['entries'][] = "\$lang['MOD_ainstall'] = 'Install MODs';" ; ! $insert['entries'][] = "\$lang['MOD_settings'] = 'EasyMOD Settings';" ; ! $insert['entries'][] = "\$lang['MOD_history'] = 'EasyMOD History';" ; $insert['entries'][] = "\$lang['MOD_control_tag'] = '" . $easymod_install_version . "';" ; } --- 803,809 ---- $search_array['entries'][0] = '// EASYMOD-start' ; ! $insert['entries'][] = "\$lang['MOD_install'] = '" . $lang['EM_install_MODs'] . "';" ; ! $insert['entries'][] = "\$lang['MOD_settings'] = '" . $lang['EM_settings'] . "';" ; ! $insert['entries'][] = "\$lang['MOD_history'] = '" . $lang['EM_history'] . "';" ; $insert['entries'][] = "\$lang['MOD_control_tag'] = '" . $easymod_install_version . "';" ; } *************** *** 1554,1558 **** $insert = "// EASYMOD-start\n" ; ! $insert .= "\$lang['Modifications'] = 'MOD Center';\n" ; $insert .= "// EASYMOD-end\n" ; write_find_array( $find_array, $file_list) ; --- 1532,1536 ---- $insert = "// EASYMOD-start\n" ; ! $insert .= "\$lang['Modifications'] = '" . $lang['EM_MOD_center'] . "';\n" ; $insert .= "// EASYMOD-end\n" ; write_find_array( $find_array, $file_list) ; *************** *** 1570,1576 **** /////////////// $insert = "// EASYMOD-start\n" ; ! $insert .= "\$lang['MOD_ainstall'] = 'Install MODs';\n" ; ! $insert .= "\$lang['MOD_settings'] = 'EasyMOD Settings';\n" ; ! $insert .= "\$lang['MOD_history'] = 'EasyMOD History';\n" ; $insert .= "\$lang['MOD_control_tag'] = '" . $easymod_install_version . "';\n" ; $insert .= "// EASYMOD-end\n" ; --- 1548,1554 ---- /////////////// $insert = "// EASYMOD-start\n" ; ! $insert .= "\$lang['MOD_install'] = '" . $lang['EM_install_MODs'] . "';" ; ! $insert .= "\$lang['MOD_settings'] = '" . $lang['EM_settings'] . "';" ; ! $insert .= "\$lang['MOD_history'] = '" . $lang['EM_history'] . "';" ; $insert .= "\$lang['MOD_control_tag'] = '" . $easymod_install_version . "';\n" ; $insert .= "// EASYMOD-end\n" ; *************** *** 1701,1705 **** if (!$found) { ! $error = $lang['EM_err_find'] . ' <b>admin_easymod.php</b> in [admin/admin_easymod.php].' ; display_error( $error) ; } --- 1679,1683 ---- if (!$found) { ! $error = $lang['EM_err_find'] . ' <b>admin_easymod.php</b> [admin/admin_easymod.php].' ; display_error( $error) ; } |