Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Avatar of Tom(dB)
    Tom(dB)
    Participant

    @tomdebruin

    What’s the error? Most likely the apostrophe is causing the error, try escaping it with a slash

    `bp_member_profile_data( ‘field=Travelling’ s datas’ )`

    the forward slash isn’t showing up in the code, but place it just before the apostrophe.

    Avatar of Tom(dB)
    Tom(dB)
    Participant

    @tomdebruin

    Been messing around with adding custom usermeta data at signup and have come up with the following:

    `function bp_custom_user_signup() { ?>

    <?php
    }

    add_action(‘bp_before_registration_submit_buttons’, ‘bp_custom_user_signup’);

    // Add field_name from sign-up to usermeta on registration
    function bp_user_activate_field( $signup ) {

    update_usermeta( $signup, ‘name_of_field_in_template’, apply_filters( ‘get_name_of_field_in_template_value’, $_POST ) );

    return $signup;
    }
    add_filter( ‘user_register’, ‘bp_user_activate_field’ );
    `
    Note that this data is put into the database at the point of registration, not at user activation as the original example suggested – but I couldn’t get that to work.

    Avatar of Tom(dB)
    Tom(dB)
    Participant

    @tomdebruin

    I’ve just experienced this and have come up with a fix:


    function custom_bp_adminbar_login_menu() {
    global $bp;

    if ( is_user_logged_in() )
    return false;

    $redirecturl = $bp->root_domain . '/wp-login.php?redirect_to=' . urlencode( $bp->root_domain ) . esc_url( $_SERVER );
    echo '

  • ';

    // Show "Sign Up" link if user registrations are allowed
    if ( bp_get_signup_allowed() ) {
    echo '

    ';
    }
    }
    remove_action( 'bp_adminbar_menus', 'bp_adminbar_login_menu', 2 );
    add_action( 'bp_adminbar_menus', 'custom_bp_adminbar_login_menu', 2 );

    Drop that into your functions.php file.

    It’s the same as the standard function except it appends the `$bp->root_domain` with `$_SERVER`.
    I’m not sure if this is a feature or something that’s been overlooked and needs reporting in trac. Also on different servers I’ve had differing results with php `$_SERVER` based stuff so I’m not sure if it will work everywhere. It works on the server I’m using anyway.

    EDIT: wonky code formatting, try it in pastebin: http://pastebin.com/C96qY2uQ

Avatar of Tom(dB)
Tom(dB)
Participant

@tomdebruin

@Alexander, I spoke to @DJPaul at WordCamp UK who said he’d look into it, and also that I should file a bug report. Which I hadn’t got round to, so thanks for filing it.

Avatar of Tom(dB)
Tom(dB)
Participant

@tomdebruin

Anyone, Bueller?

Avatar of Tom(dB)
Tom(dB)
Participant

@tomdebruin

OK thanks. I can get around it by having one theme and altering things based on $blog_id;

Avatar of Tom(dB)
Tom(dB)
Participant

@tomdebruin

@foxly, even though your solutions require code modification you do say “i’ll develop my own solution” – will these be plugins you release, or perhaps become part of the bp-moderation plugin that is being developed by @francescolaffi?

I really appreciated your detailed posts on the tools spammers employ. It has given me a much better understanding of the problem. Thank you.

Avatar of Tom(dB)
Tom(dB)
Participant

@tomdebruin

Upgraded the memory_limit to 96M, then down to 64M. Both work.

Perhaps the http://buddypress.org/about/requirements/ page needs this mentioning?

Avatar of Tom(dB)
Tom(dB)
Participant

@tomdebruin

OK, a bit more testing. I tried it on another server and it’s working fine there. The difference being that was WP RC1, so I upgraded it to RC3 and it still works.

So I put RC1 on the original server and the same problem exists.

Server 1 = PHP Version 5.2.12
Server 2 = PHP Version 4.4.8

then tried Server 2 with PHP 5.2.6, still works fine.

Major differences are memory_limit S1: 48M S2: 99M
And S1 has suhosin installed (I can’t find any evidence of suhosin being a problem on a quick Google search).

Could it be down to the memory limit? I just want to make sure it’s not a problem at my end before reporting in trac. Thanks for your replies everyone.

Avatar of Tom(dB)
Tom(dB)
Participant

@tomdebruin

I’ve just updated this plugin to work in BP 1.2.1 and bbP 1.0.3.

Available here:

http://www.deadlyhifi.com/downloads/buddybar-in-bbpress.1.0.4.zip

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