|
From: OryNider <ory...@us...> - 2008-03-08 08:29:26
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28025 Modified Files: Tag: core28x mx_functions_style.php Log Message: I will post this modification to forums Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.17.2.19 retrieving revision 1.17.2.20 diff -C2 -d -r1.17.2.19 -r1.17.2.20 *** mx_functions_style.php 8 Mar 2008 02:53:55 -0000 1.17.2.19 --- mx_functions_style.php 8 Mar 2008 08:28:34 -0000 1.17.2.20 *************** *** 773,776 **** --- 773,787 ---- @include($mx_root_path . $module_root_path . $this->default_current_template_path . '/' . $this->default_template_name . '.cfg'); } + + // + // If use default template with difrent modules config file name + // + if ( (!$mx_template_config) && !empty($this->module_cfg_name[$module_root_path])) + { + $current_template_path = $module_root_path . $this->default_current_template_path; + $template_name = $this->default_template_name; + + @include($module_root_path . $this->default_current_template_path . '/' . $this->module_cfg_name[$module_root_path] . '.cfg'); + } // *************** *** 818,835 **** global $lang, $board_config, $mx_block, $phpEx, $mx_root_path; if (!isset($this->loaded_langs[$mx_block->module_root_path])) { if ($lang_mode == MX_LANG_MAIN || $lang_mode == MX_LANG_ALL) { ! // ------------------------------------------------------------------------- ! // Read Module Main Language Definition ! // ------------------------------------------------------------------------- ! if ( !file_exists( $mx_root_path . $mx_block->module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { ! include( $mx_root_path . $mx_block->module_root_path . 'language/lang_english/lang_main.' . $phpEx ); } else { ! include( $mx_root_path . $mx_block->module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); } } --- 829,862 ---- global $lang, $board_config, $mx_block, $phpEx, $mx_root_path; + $default_lang = ($this->lang['default_lang']) ? $this->lang['default_lang'] : $board_config['default_lang']; + + if (empty($default_lang)) + { + // - populate $default_lang + $default_lang= 'english'; + } + if (!isset($this->loaded_langs[$mx_block->module_root_path])) { if ($lang_mode == MX_LANG_MAIN || $lang_mode == MX_LANG_ALL) { ! if (!empty($this->module_lang_path[$mx_block->module_root_path])) { ! $module_lang_path = $this->module_lang_path[$mx_block->module_root_path]; } else { ! $module_lang_path = $mx_root_path . $mx_block->module_root_path; ! } ! ! // ------------------------------------------------------------------------- ! // Read Module Main Language Definition ! // ------------------------------------------------------------------------- ! if ((@include $module_lang_path . "language/lang_" . $default_lang . "/lang_main.$phpEx") === false) ! { ! if ((@include $module_lang_path . "language/lang_english/lang_main.$phpEx") === false) ! { ! mx_message_die(CRITICAL_ERROR, 'Module main language file ' . $mx_root_path . $mx_block->module_root_path . "language/lang_" . $default_lang . "/lang_main.$phpEx" . ' couldn\'t be opened.'); ! } } } *************** *** 840,853 **** // Read Module Admin Language Definition // ------------------------------------------------------------------------- ! if ( !file_exists( $mx_root_path . $mx_block->module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) ! { ! include( $mx_root_path . $mx_block->module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); ! } ! else { ! include( $mx_root_path . $mx_block->module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } } - $this->loaded_langs[$mx_block->module_root_path] = '1'; } --- 867,878 ---- // Read Module Admin Language Definition // ------------------------------------------------------------------------- ! if ((@include $module_lang_path . "language/lang_" . $default_lang . "/lang_admin.$phpEx") === false) { ! if ((@include $module_lang_path . "language/lang_english/lang_admin.$phpEx") === false) ! { ! mx_message_die(CRITICAL_ERROR, 'Modiule admin language file ' . $mx_root_path . $mx_block->module_root_path . "language/lang_" . $default_lang . "/lang_admin.$phpEx" . ' couldn\'t be opened.'); ! } } } $this->loaded_langs[$mx_block->module_root_path] = '1'; } *************** *** 991,994 **** --- 1016,1033 ---- $this->loaded_default_styles[$mx_block->module_root_path] = $default_module_style; } + + function set_module_cfg_name($module_cfg_name = '') + { + global $mx_block; + + $this->module_cfg_name[$mx_block->module_root_path] = $module_cfg_name; + } + + function set_module_lang_path($module_lang_path = '') + { + global $mx_block; + + $this->module_lang_path[$mx_block->module_root_path] = $module_lang_path; + } } // class mx_user ?> \ No newline at end of file |