|
From: Jon O. <jon...@us...> - 2006-12-17 11:38:10
|
Update of /cvsroot/mxbb/mx_phpbb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4646/modules/mx_phpbb/includes Modified Files: forum_hack.php Log Message: fix for using avatars Index: forum_hack.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/includes/forum_hack.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** forum_hack.php 16 Dec 2006 18:07:24 -0000 1.19 --- forum_hack.php 17 Dec 2006 11:38:01 -0000 1.20 *************** *** 276,279 **** --- 276,282 ---- } + // + // We have a problem here, when p denotes a pm_id, and not a post_id!!!!!!!!!!!!!!!!!!! + // if ( $sql ) { *************** *** 308,312 **** 'viewforum' => $this->phpbb_config['index'], 'viewtopic' => $this->phpbb_config['index'], - 'faq' => $this->phpbb_config['faq'], 'groupcp' => $this->phpbb_config['groupcp'], --- 311,314 ---- *************** *** 347,351 **** ); } - } --- 349,352 ---- *************** *** 353,365 **** // Tricky but useful method to retrieve Portal Table names from phpBB scope... // -------------------------------------------------------------------------------- - /* - function _get_mx_table_name( $table_suffix ) - { - global $mx_root_path, $phpEx; - include( $mx_root_path . 'config.' . $phpEx ); - return $mx_table_prefix . $table_suffix; - } - */ - function _get_mx_table_name( $table_suffix ) { --- 354,357 ---- *************** *** 670,673 **** --- 662,715 ---- } + /* + // -------------------------------------------------------------------------------- + // Hook into some phpBB functions to append phpBB path to URLs... + // -------------------------------------------------------------------------------- + function phpbb_realpath( $url ) + { + global $phpbb_root_path; + // + // Replaces same function in sessions.php + // + return str_replace('./', '', $phpbb_root_path . $url); + } + + // -------------------------------------------------------------------------------- + // Hook into some phpBB functions to append phpBB path to URLs... + // -------------------------------------------------------------------------------- + function opendir( $url ) + { + global $phpbb_root_path; + // + // Replaces same function in sessions.php + // + return @opendir(str_replace('./', '', $phpbb_root_path . $url)); + } + + // -------------------------------------------------------------------------------- + // Hook into some phpBB functions to append phpBB path to URLs... + // -------------------------------------------------------------------------------- + function is_file( $url ) + { + global $phpbb_root_path; + // + // Replaces same function in sessions.php + // + return is_file(str_replace('./', '', $phpbb_root_path . $url)); + } + + // -------------------------------------------------------------------------------- + // Hook into some phpBB functions to append phpBB path to URLs... + // -------------------------------------------------------------------------------- + function is_link( $url ) + { + global $phpbb_root_path; + // + // Replaces same function in sessions.php + // + return is_link(str_replace('./', '', $phpbb_root_path . $url)); + } + */ + // -------------------------------------------------------------------------------- // *************** *** 756,761 **** generate_smilies( $mode, $page_id ); $board_config['smilies_path'] = $smilies_path; ! $template->assign_vars( array( 'U_MORE_SMILIES' => $this->append_sid( "posting.$phpEx?mode=smilies" ) ) ! ); } --- 798,802 ---- generate_smilies( $mode, $page_id ); $board_config['smilies_path'] = $smilies_path; ! $template->assign_vars( array( 'U_MORE_SMILIES' => $this->append_sid( "posting.$phpEx?mode=smilies" ) ) ); } *************** *** 1232,1236 **** function read_file( $phpbb_file, $sub_call = false ) { ! global $phpbb_root_path, $mx_root_path, $phpEx, $template, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $db, $userdata, $mode, $theme, $lang, $table_prefix, $mx_table_prefix, $board_config, $portal_config; global $html_entities_match, $html_entities_replace, $unhtml_specialchars_match, $unhtml_specialchars_replace; global $mx_forum; --- 1273,1277 ---- function read_file( $phpbb_file, $sub_call = false ) { ! global $phpbb_root_path, $mx_root_path, $phpEx, $template, $HTTP_POST_VARS, $HTTP_POST_FILES, $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $db, $userdata, $mode, $theme, $lang, $table_prefix, $mx_table_prefix, $board_config, $portal_config; global $html_entities_match, $html_entities_replace, $unhtml_specialchars_match, $unhtml_specialchars_replace; global $mx_forum; *************** *** 1279,1282 **** --- 1320,1327 ---- // $code = str_replace('append_sid(', '$mx_forum->append_sid(', $code); + //$code = str_replace('@phpbb_realpath(', '$mx_forum->phpbb_realpath(', $code); + //$code = str_replace('@opendir(', '$mx_forum->opendir(', $code); + //$code = str_replace('is_file(', '$mx_forum->is_file(', $code); + //$code = str_replace('is_link(', '$mx_forum->is_link(', $code); $code = str_replace('redirect(', '$mx_forum->redirect(', $code); $code = str_replace('make_jumpbox(', '$mx_forum->make_jumpbox(', $code); *************** *** 1343,1352 **** break; - // - // Sub Calls Fix - // case 'profile': $code = str_replace('exit;', 'return;', $code); break; } --- 1388,1419 ---- break; case 'profile': + // + // Sub Calls Fix + // $code = str_replace('exit;', 'return;', $code); break; + + case 'includes/usercp_register': + // + // Avatars and ranks + // + $code = str_replace('\'./\' . $board_config[\'avatar_gallery_path\']', '$board_config[\'avatar_gallery_path\']', $code); + $code = str_replace('\'./\' . $board_config[\'avatar_path\']', '$board_config[\'avatar_path\']', $code); + + $code = str_replace('$board_config[\'avatar_gallery_path\']', '\''.$phpbb_root_path.'\' . $board_config[\'avatar_gallery_path\']', $code); + $code = str_replace('$board_config[\'avatar_path\']', '\''.$phpbb_root_path.'\' . $board_config[\'avatar_path\']', $code); + break; + + case 'includes/usercp_avatar': + // + // Avatars and ranks + // + $code = str_replace('\'./\' . $board_config[\'avatar_gallery_path\']', '$board_config[\'avatar_gallery_path\']', $code); + $code = str_replace('\'./\' . $board_config[\'avatar_path\']', '$board_config[\'avatar_path\']', $code); + + $code = str_replace('$board_config[\'avatar_gallery_path\']', '\''.$phpbb_root_path.'\' . $board_config[\'avatar_gallery_path\']', $code); + $code = str_replace('$board_config[\'avatar_path\']', '\''.$phpbb_root_path.'\' . $board_config[\'avatar_path\']', $code); + break; } *************** *** 1434,1437 **** --- 1501,1505 ---- session_start(); $_SESSION['mxbb_post_vars'] = $_POST; + $_SESSION['mxbb_post_files'] = $_FILES; // |