@goosenl
active 2 years, 2 months ago
Forum Replies Created
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
Ahh… It seemed I was a little quick to jump the gun and post this…
It works again, after having set the folder ’2011′ in uploads to chmod 777 ( although I have no idea as to why this is )… now setting all back to 755
Ah ok… i figured out what was going on, the $ sign was missing in front of the user_id. For all you quick copy’n'pasters (like myself), the correct code is as below:
`
function follow_deleted( $user_id ) {
global $wpdb, $bp;
$wpdb->query( $wpdb->prepare( “DELETE FROM {$bp->follow->table_name} WHERE leader_id = %d”, $user_id ) );
$wpdb->query( $wpdb->prepare( “DELETE FROM {$bp->follow->table_name} WHERE follower_id = %d”, $user_id ) );
}
add_action( ‘wpmu_delete_user’, ‘follow_deleted’ );
add_action( ‘delete_user’, ‘follow_deleted’ );
add_action( ‘make_spam_user’, ‘follow_deleted’ );
`
Thanks guys, it made me one Happy Camper 
@phartes, and where would I trigger this function…, somewhere in bp-core?
Hi Boone,
Guess I’ll just have to wait for a bit then… seeing my coding skills (for now) are not up to rebuilding the entire class myself.
Thanks for the reply and explanation!-)
Kee… figured it out.. so for anyone else interested.
Add the following code to bp-core-php row 1774:
`
case ‘links’:
$slug = BP_LINKS_SLUG;
$var = ‘/?s=’;
break;
`
And this to bp-core-templatetags.php row 1025:
`if ( function_exists( ‘groups_install’ ) )
$selection_box .= ” . __( ‘Links’, ‘buddypress’ ) . ”; `
Note the function_exists tests a group install, which should actually look for buddypress links, but since I have groups enabled this check does the trick.
This will add the option links to your header search form.
Cheers, GooseNL
Excellent… works like a charm… thanks so much!
See also: WordPress.org • bbPress.org • BuddyPress.org • Matt • Blog RSS