Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • This is kind of a old thread I suppose. I just found it so forgive me for being later.
    http://www.wesupportthe.us – is a small site running WordPress, BuddyPress, BBPress, and CubePoints. Right now I am mainly offering points for Forum activity. Which can be redeemed for advertising on the site. Mondays I am trying to activate the Points Multiplier so people can earn double points for those 24 hours.

    Okay I found a way around this. I used the code supplied via one post, the one that said you should place the code in the functions.php file of your theme which would make all new registered users notifications setting turned off. Only problem was then… when I cut the ability for users to updated there profile setting it also allowed them to change the notification settings. Which would allow users to turn them back on.

    So I headed to the BuddyPress plugin files and started searching. Looking for files with the names “Settings” in them I opened them all up and started searching for anything mentioning “Notifications” settings. Here are the two pieces of code that I found in the files and removed them. Went to my test user account, then to settings, and the ability to update/change my “Notifications” settings from their could no longer be seen. Worked… so here are the 2 pieces of code to look for an remove.

    First:
    `// Add Notifications nav item
    $sub_nav[] = array(
    ‘name’ => __( ‘Notifications’, ‘buddypress’ ),
    ‘slug’ => ‘notifications’,
    ‘parent_url’ => $settings_link,
    ‘parent_slug’ => $this->slug,
    ‘screen_function’ => ‘bp_core_screen_notification_settings’,
    ‘position’ => 20,
    ‘user_has_access’ => bp_core_can_edit_settings()
    );`

    Second:
    `/** Notifications *************************************************************/

    function bp_core_screen_notification_settings() {
    global $bp;

    if ( bp_action_variables() ) {
    bp_do_404();
    return;
    }

    if ( isset( $_POST ) ) {
    check_admin_referer(‘bp_settings_notifications’);

    if ( isset( $_POST ) ) {
    foreach ( (array)$_POST as $key => $value ) {
    if ( $meta_key = bp_get_user_meta_key( $key ) )
    bp_update_user_meta( (int)$bp->displayed_user->id, $meta_key, $value );
    }
    }

    bp_core_add_message( __( ‘Changes saved.’, ‘buddypress’ ), ‘success’ );

    do_action( ‘bp_core_notification_settings_after_save’ );
    }

    bp_core_load_template( apply_filters( ‘bp_core_screen_notification_settings’, ‘members/single/settings/notifications’ ) );
    }`

Viewing 2 replies - 1 through 2 (of 2 total)