Heres how to make bp-facebookconnect and the welcome plugin work togeather >>
-
I ran into this problem, and figured someone else might also run into it along the way…so I am writing my fix for the community:
1. Inside bp-facebook connect (file fbconnect.php) you need to change:
add_action(‘plugins_loaded’, ‘fbc_init_auth’, 2 );
to this:
add_action(‘plugins_loaded’, ‘fbc_init_auth’, 7 ); //this will ensure it loads AFTER the globals necissary for the welcome plugin to work.
2. Then go into bp-fbconnect.php file
And add this:
do_action(‘fb_done_inserting’ , $user_id);
Put that do_action (above) right above the closing bracket at the bottom of the function below (found in bp-fbconnect.php):
bp_fbconnect_insert_data( $user_id, $usermeta) {
///random insert functions
do_action(‘fb_done_inserting’ , $user_id);
}
3. Finally you need to add these three lines to the welcome plugin..inside the file (welcome-pack.php)
add_action( ‘fb_done_inserting’, ‘dp_welcomepack_defaultfriend’, 1, 3 );
add_action( ‘fb_done_inserting’, ‘dp_welcomepack_defaultgroup’, 1, 3 );
add_action( ‘fb_done_inserting’, ‘dp_welcomepack_welcomemessage’, 1, 3 );
Add it around the bottom of the file where the other add_actions are
////////////////
If your using the bp-fbconnect plugin at all for registration/login…its prob worthwhile to do the first two steps (even if your not using the welcome plugin) — doing this will give you access to all of the bp global functions at the time of registration for any future registration style plugins you might install.
////Side note, you may need to consider modifications if your users can have their own blogs..in my setup, my users can register but don’t get their own blogs…so I havent tested what needs to be modified (if user blogs are allowed)
- The topic ‘Heres how to make bp-facebookconnect and the welcome plugin work togeather >>’ is closed to new replies.