|
From: Jon O. <jon...@us...> - 2007-09-09 20:19:46
|
Update of /cvsroot/mxbb/mx_phpbb/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24972/includes Modified Files: forum_hack.php phpbb_constants.php Log Message: for 2.9.x Index: forum_hack.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/includes/forum_hack.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** forum_hack.php 22 Jul 2007 22:31:04 -0000 1.24 --- forum_hack.php 9 Sep 2007 20:19:43 -0000 1.25 *************** *** 21,28 **** define( 'MX_FORUM_DEBUG', 1 ); ! include_once($phpbb_root_path . 'includes/functions_selects.' . $phpEx); ! include_once($phpbb_root_path . 'includes/functions_post.' . $phpEx); ! include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); ! include_once($phpbb_root_path . 'includes/auth.' . $phpEx); // -------------------------------------------------------------------------------- --- 21,41 ---- define( 'MX_FORUM_DEBUG', 1 ); ! include_once($phpbb_root_path . 'includes/functions.' . $phpEx); ! if (!function_exists('language_select')) ! { ! include_once($phpbb_root_path . 'includes/functions_selects.' . $phpEx); ! } ! if (!function_exists('prepare_message')) ! { ! include_once($phpbb_root_path . 'includes/functions_post.' . $phpEx); ! } ! if (!function_exists('bbencode_second_pass')) ! { ! include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); ! } ! if (!function_exists('auth_check_user')) ! { ! include_once($phpbb_root_path . 'includes/auth.' . $phpEx); ! } // -------------------------------------------------------------------------------- *************** *** 143,147 **** function init_paths() { ! global $mx_root_path, $db, $phpEx; if ( defined( PHPBB_URL ) && defined( PORTAL_URL ) ) --- 156,160 ---- function init_paths() { ! global $mx_root_path, $db, $phpEx, $board_config; if ( defined( PHPBB_URL ) && defined( PORTAL_URL ) ) *************** *** 162,167 **** { $row = $db->sql_fetchrow( $result ); ! $this->phpbb_url = $row['portal_phpbb_url']; ! $this->portal_url = $row['portal_url']; } $db->sql_freeresult($result); --- 175,193 ---- { $row = $db->sql_fetchrow( $result ); ! ! // ! // Define some general Defs ! // ! $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($row['script_path'])); ! $server_name = trim($row['server_name']); ! $server_protocol = ( $row['cookie_secure'] ) ? 'https://' : 'http://'; ! $server_port = ( $row['server_port'] <> 80 ) ? ':' . trim($row['server_port']) . '/' : '/'; ! $server_url = $server_protocol . $server_name . $server_port . $script_name; ! ! $script_name_phpbb = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])) . '/'; ! $server_url_phpbb = $server_protocol . $server_name . $server_port . $script_name_phpbb; ! ! $this->phpbb_url = $server_url_phpbb; ! $this->portal_url = $server_url; } $db->sql_freeresult($result); *************** *** 619,626 **** case 'index': //global $s_last_visit; // declared here: includes/page_header.php ! $s_last_visit = ( $userdata['session_logged_in'] ) ? create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : ''; $script_vars = array( 'LAST_VISIT_DATE' => sprintf( $lang['You_last_visit'], $s_last_visit ), ! 'CURRENT_TIME' => sprintf( $lang['Current_time'], create_date( $board_config['default_dateformat'], time(), $board_config['board_timezone'] ) ), 'L_SEARCH_NEW' => $lang['Search_new'], 'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'], --- 645,652 ---- case 'index': //global $s_last_visit; // declared here: includes/page_header.php ! $s_last_visit = ( $userdata['session_logged_in'] ) ? phpBB2::create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : ''; $script_vars = array( 'LAST_VISIT_DATE' => sprintf( $lang['You_last_visit'], $s_last_visit ), ! 'CURRENT_TIME' => sprintf( $lang['Current_time'], phpBB2::create_date( $board_config['default_dateformat'], time(), $board_config['board_timezone'] ) ), 'L_SEARCH_NEW' => $lang['Search_new'], 'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'], *************** *** 631,635 **** 'L_AUTO_LOGIN' => $lang['Log_me_in'], 'L_LOGIN_LOGOUT' => $lang['Login'], ! 'S_LOGIN_ACTION' => append_sid('login.'.$phpEx) ); // --- 657,661 ---- 'L_AUTO_LOGIN' => $lang['Log_me_in'], 'L_LOGIN_LOGOUT' => $lang['Login'], ! 'S_LOGIN_ACTION' => mx_append_sid('login.'.$phpEx) ); // *************** *** 668,672 **** // Replaces same function in sessions.php // ! return append_sid( $this->full_url( $url, $non_html_amp, $portal_url ), $non_html_amp ); } --- 694,698 ---- // Replaces same function in sessions.php // ! return mx_append_sid( $this->full_url( $url, $non_html_amp, $portal_url ), $non_html_amp ); } *************** *** 1246,1250 **** 'TOTAL_USERS_ONLINE' => $l_online_users, 'LOGGED_IN_USER_LIST' => $online_userlist, ! 'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])), 'L_WHO_IS_ONLINE' => $lang['Who_is_Online'], --- 1272,1276 ---- 'TOTAL_USERS_ONLINE' => $l_online_users, 'LOGGED_IN_USER_LIST' => $online_userlist, ! 'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], phpBB2::create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])), 'L_WHO_IS_ONLINE' => $lang['Who_is_Online'], Index: phpbb_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/includes/phpbb_constants.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** phpbb_constants.php 17 Jun 2006 20:14:00 -0000 1.5 --- phpbb_constants.php 9 Sep 2007 20:19:43 -0000 1.6 *************** *** 14,17 **** --- 14,22 ---- } + if ( PORTAL_BACKEND != 'phpbb2' ) + { + mx_message_die(GENERAL_MESSAGE, 'There are blocks on this page designed for mxBB with phpBB2 backend, thus not compatible with current setup.'); + } + define( 'PAGE_FORUM', -502 ); define( 'PHPBB_CONFIG_TABLE', $mx_table_prefix . 'phpbb_plugin_config' ); |