|
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-serv28609 Modified Files: mx_functions_style.php Log Message: see the forum about this two functions Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** mx_functions_style.php 8 Mar 2008 07:00:42 -0000 1.58 --- mx_functions_style.php 8 Mar 2008 08:29:20 -0000 1.59 *************** *** 487,490 **** --- 487,491 ---- define('MX_IMAGES' , 50); define('MX_IMAGES_NONE' , 60); + define('MX_LANG_CUSTOM' , 70); /**#@-*/ *************** *** 1274,1277 **** --- 1275,1289 ---- @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'); + } // *************** *** 1331,1340 **** if ($lang_mode == MX_LANG_MAIN || $lang_mode == MX_LANG_ALL) { // ------------------------------------------------------------------------- // Read Module Main Language Definition // ------------------------------------------------------------------------- ! if ((@include $mx_root_path . $mx_block->module_root_path . "language/lang_" . $default_lang . "/lang_main.$phpEx") === false) { ! if ((@include $mx_root_path . $mx_block->module_root_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.'); --- 1343,1361 ---- 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.'); *************** *** 1348,1354 **** // Read Module Admin Language Definition // ------------------------------------------------------------------------- ! if ((@include $mx_root_path . $mx_block->module_root_path . "language/lang_" . $default_lang . "/lang_admin.$phpEx") === false) { ! if ((@include $mx_root_path . $mx_block->module_root_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.'); --- 1369,1375 ---- // 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.'); *************** *** 1687,1690 **** --- 1708,1725 ---- $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 |