############################################################## ## MOD Title: WP-UNITED Upgrade to v0.9.5 ## MOD Author: Jhong < admin@wp-united.com > (John Wells) www.wp-united.com ## MOD Description: Upgrades WP-United from v0.9.2.0 to v0.9.5.0 ## MOD Version: 0.9.5-beta ## ## Installation Level: (Easy) ## Installation Time: 8 Minutes ## Files To Edit: ## includes/usercp_register.php ## ## Included Files: templates/subsilver/blog.tpl ## blog.php ## wp-united/wordpress-entry-point.php ## wp-united/wp-functions.php ## wp-united/wp-template-loader.php ## wp-united/mod-settings.php ## wp-united/wp-integration-class.php ## wp-united/wpu-actions.php ## wp-united/wpu-plugin.php ## wp-united/wpu-latest-posts.php ## wp-united/wpu-template-funcs.php ## wp-united/widgets.php ## wp-united/abstractify.php ## wp-united/wpu-helper-funcs.php ## wp-united/options.php ## wp-united/cache/cache_readme.txt ## admin/wpu_usermap.php ## admin/admin_wordpress.tpl ## language/lang_english/lang_wordpress_admin.php ## language/lang_english/lang_wp-united.php ## templates/subSilver/blog.tpl ## templates/subSilver/wpu-blogs-homepage.css ## templates/subSilver/images/lang_english/icon_wpu_blog.gif ## templates/subSilver/images/lang_english/wpu_no_avatar.gif ## templates/subSilver/images/lang_english/wpu_unregistered.gif ## templates/subSilver/admin/wordpress_admin_body.tpl ## templates/subSilver/images/wp-united-working.gif ## templates/subSilver/images/wp-united-logo.gif ## ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ############################################################## ## For security purposes, please check: http://www.phpbb.com/mods/ ## for the latest version of this MOD. Although MODs are checked ## before being allowed in the MODs Database there is no guarantee ## that there are no security problems within the MOD. No support ## will be given for MODs not found within the MODs Database which ## can be found at http://www.phpbb.com/mods/ ############################################################## ## Author Notes: Make sure you follow the instructions in the DIY INSTRUCTIONS section, in order for this MOD to work properly! ## The reverse integration (i.e. phpBB IN WordPress is new and considered ALPHA ############################################################## ## Last updated: 31 May 2007 ## ## MOD History: Refer to the included changelog for details. ## ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ DIY INSTRUCTIONS ]------------------------------------------ # WARNING! THIS VERSION OF WP-UNITED CHANGES THE PERMISSIONS MAPPING SYSTEM. IF YOU ARE ALLOWING INTEGRATED LOGINS, THE OLD PERMISSIONS MAPPING SETTINGS NO LONGER APPLY. PLEASE VISIT THE SETUP WIZARD AND REVIEW THE NEW PERMISSIONS SETTING PANEL, THEN RUN THE WIZARD ALL THE WAY THROUGH. # #-----[ SQL ]------------------------------------------ # # (Use correct table prefix if not phpbb) # ALTER TABLE phpbb_wpu_integration ADD permMapping VARCHAR( 511 ) NOT NULL; ALTER TABLE phpbb_wpu_integration DROP UserMapping; ALTER TABLE phpbb_wpu_integration DROP modMapping; ALTER TABLE phpbb_wpu_integration DROP adminMapping; # #-----[ COPY ]------------------------------------------ # # Note: blog.php is the entry point to your integrated blog. You can put it anywhere you like, and rename it to anything you # like, provided you open it and provide the correct path to phpBB where shown. If you want to put it in your WordPress root # as index.php, it is OK to rename the existing WordPress' index.php to something like index-old.php copy blog.php to blog.php copy wp-united/wordpress-entry-point.php to wp-united/wordpress-entry-point.php copy wp-united/wp-functions.php to wp-united/wp-functions.php copy wp-united/wp-template-loader.php to wp-united/wp-template-loader.php copy wp-united/wp-integration-class.php to wp-united/wp-integration-class.php copy wp-united/mod-settings.php to wp-united/mod-settings.php copy wp-united/wpu-actions.php to wp-united/wpu-actions.php copy wp-united/wpu-plugin.php to wp-united/wpu-plugin.php copy wp-united/wpu-latest-posts.php to wp-united/wpu-latest-posts.php copy wp-united/wpu-template-funcs.php to wp-united/wpu-template-funcs.php copy wp-united/wpu-widgets.php to wp-united/wpu-widgets.php copy wp-united/abstractify.php to wp-united/abstractify.php copy wp-united/options.php to wp-united/options.php copy wp-united/cache/cache_readme.txt to wp-united/cache/cache_readme.txt copy wp-united/wpu-helper-funcs.php to wp-united/wpu-helper-funcs.php copy admin/admin_wordpress.php to admin/admin_wordpress.php copy admin/wpu_usermap.php to admin/wpu_usermap.php copy templates/subSilver/blog.tpl to templates/subSilver/blog.tpl copy templates/subSilver/wpu-blogs-homepage.css to templates/subSilver/wpu-blogs-homepage.css copy templates/subSilver/admin/wordpress_admin_body.tpl to templates/subSilver/admin/wordpress_admin_body.tpl copy templates/subSilver/images/wp-united-working.gif to templates/subSilver/images/wp-united-working.gif copy templates/subSilver/images/wp-united-logo.gif to templates/subSilver/images/wp-united-logo.gif copy language/lang_english/lang_wordpress_admin.php to language/lang_english/lang_wordpress_admin.php copy language/lang_english/lang_wp-united.php to language/lang_english/lang_wp-united.php copy templates/subSilver/images/lang_english/icon_wpu_blog.gif to templates/subSilver/images/lang_english/icon_wpu_blog.gif copy templates/subSilver/images/lang_english/wpu_no_avatar.gif to templates/subSilver/images/lang_english/wpu_no_avatar.gif copy templates/subSilver/images/lang_english/wpu_unregistered.gif to templates/subSilver/images/lang_english/wpu_unregistered.gif # #-----[ OPEN ]------------------------------------------ # includes/usercp_register.php # #-----[ FIND ]-------------------------------------------- # //WP-United -- update the user in WP require_once($phpbb_root_path . 'wp-united/mod-settings.' . $phpEx); $wpSettings = get_integration_settings(); if ( ($wpSettings == FALSE) || ($wpSettings['wpPath'] == "") ) { message_die(GENERAL_ERROR, $lang['WP_DBErr_Gen'], __LINE__, __FILE__, $sql); } if ( !empty($wpSettings['integrateLogin']) ) { $wpID = $userdata['user_wpuint_id']; if (!empty($wpID)) { $pass = $avImg = $avType = ''; if ( !empty($avatar_sql) ) { $avDetails = explode(',', $avatar_sql); $avImg = explode('\'', $avDetails[1]); $avType = explode('=', $avDetails[2]); $avImg = $avImg[1]; $avType = (int)trim($avType[1]); } if ( !empty($passwd_sql) ) { $pass = explode('\'', $passwd_sql); $pass=$pass[1]; } $newDetails = array( 'username' => $username, 'user_email' => $email, 'user_password' => $pass, 'user_website' => $website, 'user_aim' => $aim, 'user_yim' => $yim, 'user_avatar_type' => $avType, 'user_allow_avatar' => $userdata['user_allow_avatar'], 'user_avatar' => $avImg ); //enter the integration require_once($phpbb_root_path . 'wp-united/wp-integration-class.' . $phpEx); require_once($phpbb_root_path . 'wp-united/abstractify.' . $phpEx); $wpUtdInt = WPU_Integration::getInstance(get_defined_vars()); if ( !$wpUtdInt->can_connect_to_wp() ) { message_die(GENERAL_ERROR, $lang['WP_Not_Installed_Yet'],'','',''); } $wpUtdInt->enter_wp_integration(); eval($wpUtdInt->exec()); $wpUsrData = get_userdata($wpID); $wpUpdateData = $wpUtdInt->check_details_consistency($wpUsrData, $newDetails); if ( $wpUpdateData ) { wp_update_user($wpUpdateData); } $wpUtdInt->exit_wp_integration(); $wpUtdInt = null; unset($wpUtdInt); } } // End of WP-United Integration # #-----[ REPLACE WITH ]------------------------------------------ # //WP-United -- update the user in WP $wpuAction = 'PROFILE UPDATE'; require_once($phpbb_root_path . 'wp-united/wpu-actions.' . $phpEx); # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM