|
From: OryNider <ory...@us...> - 2008-02-10 02:34:58
|
Update of /cvsroot/mxbb/mx_blogs/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18506/includes Modified Files: functions_weblog.php weblogs_common.php weblogs_constants.php Log Message: Index: weblogs_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_blogs/includes/weblogs_common.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** weblogs_common.php 8 Feb 2008 23:37:23 -0000 1.4 --- weblogs_common.php 10 Feb 2008 02:34:51 -0000 1.5 *************** *** 36,65 **** // 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,48 ---- // 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'; } *************** *** 154,156 **** ! ?> \ No newline at end of file --- 137,139 ---- ! ?> Index: functions_weblog.php =================================================================== RCS file: /cvsroot/mxbb/mx_blogs/includes/functions_weblog.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions_weblog.php 8 Feb 2008 23:37:23 -0000 1.2 --- functions_weblog.php 10 Feb 2008 02:34:51 -0000 1.3 *************** *** 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 // *************** *** 51,55 **** if ( extension_loaded('zlib') ) { ! @ob_end_clean(); ob_start('ob_gzhandler'); } --- 85,89 ---- if ( extension_loaded('zlib') ) { ! @ob_end_clean(); ob_start('ob_gzhandler'); } *************** *** 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'], *************** *** 350,354 **** { $preview = 'mood_none.gif'; ! } $select = ( $selected == $mood_set_data[$i]['set_id'] ) ? ' selected="selected"' : ''; $set_select .= '<option value="' . $mood_set_data[$i]['set_id'] . '"' . $select . ' id="' . $preview . '">' . $mood_set_data[$i]['set_name'] . '</option>'; --- 385,389 ---- { $preview = 'mood_none.gif'; ! } $select = ( $selected == $mood_set_data[$i]['set_id'] ) ? ' selected="selected"' : ''; $set_select .= '<option value="' . $mood_set_data[$i]['set_id'] . '"' . $select . ' id="' . $preview . '">' . $mood_set_data[$i]['set_name'] . '</option>'; *************** *** 420,424 **** @chmod ($mx_root_path . 'modules/mx_blogs/weblogs/templates/' . $template_dir . '/weblog_header.htm', 0755); @chmod ($mx_root_path . 'modules/mx_blogs/weblogs/templates/' . $template_dir . '/weblog_footer.htm', 0755); ! @chmod ($mx_root_path . 'modules/mx_blogs/weblogs/templates/' . $template_dir . '/weblog_faceplate_body.htm', 0755); if ( file_exists($mx_root_path . 'modules/mx_blogs/weblogs/templates/' . $template_dir . '/weblog_body.htm') ) --- 455,459 ---- @chmod ($mx_root_path . 'modules/mx_blogs/weblogs/templates/' . $template_dir . '/weblog_header.htm', 0755); @chmod ($mx_root_path . 'modules/mx_blogs/weblogs/templates/' . $template_dir . '/weblog_footer.htm', 0755); ! @chmod ($mx_root_path . 'modules/mx_blogs/weblogs/templates/' . $template_dir . '/weblog_faceplate_body.htm', 0755); if ( file_exists($mx_root_path . 'modules/mx_blogs/weblogs/templates/' . $template_dir . '/weblog_body.htm') ) *************** *** 471,475 **** // Open for writing $f = @fopen($filename, 'w' ); ! // Write the stuff @fwrite( $f, $file_body ); // Close the file --- 506,510 ---- // Open for writing $f = @fopen($filename, 'w' ); ! // Write the stuff @fwrite( $f, $file_body ); // Close the file *************** *** 483,487 **** // Open for writing $f = @fopen($filename, 'w' ); ! // Write the stuff @fwrite( $f, $file_faceplate ); // Close the file --- 518,522 ---- // Open for writing $f = @fopen($filename, 'w' ); ! // Write the stuff @fwrite( $f, $file_faceplate ); // Close the file *************** *** 518,522 **** // Open for writing $f = @fopen($filename, 'w' ); ! // Write the stuff @fwrite( $f, $weblog_body ); // Close the file --- 553,557 ---- // Open for writing $f = @fopen($filename, 'w' ); ! // Write the stuff @fwrite( $f, $weblog_body ); // Close the file *************** *** 536,540 **** // Open for writing $f = @fopen($filename, 'w' ); ! // Write the stuff @fwrite( $f, $weblog_faceplate ); // Close the file --- 571,575 ---- // Open for writing $f = @fopen($filename, 'w' ); ! // Write the stuff @fwrite( $f, $weblog_faceplate ); // Close the file *************** *** 634,638 **** { global $template_data; ! for ( $i = 0; $i < count ($template_data); $i++) { --- 669,673 ---- { global $template_data; ! for ( $i = 0; $i < count ($template_data); $i++) { *************** *** 802,804 **** return $sorted_data; } ! ?> \ No newline at end of file --- 837,839 ---- return $sorted_data; } ! ?> Index: weblogs_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_blogs/includes/weblogs_constants.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** weblogs_constants.php 8 Feb 2008 23:37:23 -0000 1.3 --- weblogs_constants.php 10 Feb 2008 02:34:51 -0000 1.4 *************** *** 44,46 **** define('WEBLOG_AUTH_OWNER', 3); ! ?> \ No newline at end of file --- 44,46 ---- define('WEBLOG_AUTH_OWNER', 3); ! ?> |