|
From: OryNider <ory...@us...> - 2008-02-10 02:25:45
|
Update of /cvsroot/mxbb/mx_blogs/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14725/includes Modified Files: Tag: core28x functions_weblog.php weblogs_common.php Log Message: MX-Publisher Index: weblogs_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_blogs/includes/weblogs_common.php,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -d -r1.2.2.1 -r1.2.2.2 *** weblogs_common.php 31 Jan 2008 03:31:55 -0000 1.2.2.1 --- weblogs_common.php 10 Feb 2008 02:25:42 -0000 1.2.2.2 *************** *** 36,66 **** // Read theme definition and language in theme definition // ********************************************************************** ! if ( file_exists( $module_root_path . "templates/" . $theme['template_name'] . "/" . $theme['template_name'] . ".cfg" ) ) ! { ! // ---------- ! include($module_root_path . "templates/" . $theme['template_name'] . "/" . $theme['template_name'] . ".cfg"); ! // ---------- ! } ! else ! { ! // ---------- ! include($module_root_path . "templates/" . "subSilver/" . "subSilver.cfg"); ! // ---------- ! } ! ! // include the weblog language file ! $use_lang = ( !file_exists($mx_root_path . 'modules/mx_blogs/language/lang_' . $board_config['default_lang'] . '/lang_weblog_main.'.$phpEx) ) ? 'english' : $board_config['default_lang']; ! ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_weblog_main.' . $phpEx ) ) { ! include_once( $module_root_path . 'language/lang_english/lang_weblog_main.' . $phpEx ); ! $link_language='lang_english'; } - else - { - include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_weblog_main.' . $phpEx ); - $link_language='lang_' . $board_config['default_lang']; - } // --- 36,49 ---- // Read theme definition and language in theme definition // ********************************************************************** + $use_lang = $default_lang = ($mx_user->lang['default_lang']) ? $mx_user->lang['default_lang'] : (($board_config['default_lang']) ? $board_config['default_lang'] : 'english'); ! if ((@include $module_root_path . "language/lang_" . $default_lang . "/lang_weblog_main.$phpEx") === false) { ! if ((@include $module_root_path . "language/lang_english/lang_weblog_main.$phpEx") === false) ! { ! mx_message_die(CRITICAL_ERROR, 'Language file ' . $module_root_path . "language/lang_" . $default_lang . "/lang_weblog_main.$phpEx" . ' couldn\'t be opened.'); ! } ! $use_lang = $default_lang = 'english'; } // Index: functions_weblog.php =================================================================== RCS file: /cvsroot/mxbb/mx_blogs/includes/functions_weblog.php,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** functions_weblog.php 7 Jun 2007 22:01:33 -0000 1.1 --- functions_weblog.php 10 Feb 2008 02:25:41 -0000 1.1.2.1 *************** *** 20,36 **** ***************************************************************************/ function use_weblog_header ( $weblog_data, $template_dir, $parse = TRUE ) { global $board_config, $template, $template_data, $phpEx, $phpbb_root_path, $lang, $page_title, $userdata; ! global $module_root_path,$mx_root_path,$weblog_config; // // Start output of page // - - // include the weblog lang file - $use_lang = ( !file_exists($module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_weblog_main.'.$phpEx) ) ? 'english' : $board_config['default_lang']; - - - // // Copied from includes/page_header.php // --- 20,70 ---- ***************************************************************************/ + if (!function_exists('bbencode_second_pass') && !function_exists(dss_rand)) + { + include_once($mx_root_path . 'includes/shared/phpbb2/includes/bbcode.' .$phpEx); + + function dss_rand() + { + mx_dss_rand(); + } + } + + if (!function_exists('bbencode_second_pass')) + { + include_once($phpbb_root_path . 'includes/bbcode.' .$phpEx); + } + + if(!function_exists(create_date)) + { + function create_date($format, $gmepoch, $tz) + { + return phpBB2::create_date($format, $gmepoch, $tz); + } + } + + if(!function_exists(decode_ip)) + { + function decode_ip($int_ip) + { + return phpBB2::decode_ip($int_ip); + } + } + + if(!function_exists(obtain_word_list)) + { + function obtain_word_list($orig_word, $replacement_word) + { + phpBB2::obtain_word_list($orig_word, $replacement_word); + } + } + function use_weblog_header ( $weblog_data, $template_dir, $parse = TRUE ) { global $board_config, $template, $template_data, $phpEx, $phpbb_root_path, $lang, $page_title, $userdata; ! global $module_root_path, $mx_root_path, $weblog_config, $use_lang; ! // // Start output of page // // Copied from includes/page_header.php // *************** *** 133,136 **** --- 167,171 ---- 'SITE_DESCRIPTION' => $board_config['site_desc'], 'PAGE_TITLE' => $page_title, + 'S_USER_LANG' => $use_lang, 'BACKGROUND_COLOR' => $weblog_data['background_color'], |