Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 16 replies - 51 through 66 (of 66 total)
  • @rebootnow

    Participant

    UPDATE 2: I see that in 1.02 the filter is added to ‘bp_get_the_profile_field_value’, so I changed this in the line above, but still the links hang in there.

    @rebootnow

    Participant

    I also wanted to remove the linking in the profile fields, so I added the following line (given above by Fishbowl81) to bp-custom.php, which is in the “plugins” directory.

    remove_filter( 'bp_the_profile_field_value', 'xprofile_filter_link_profile_data', 2);

    The profile fields still have the links though. Is there something special I need to do aside from putting the line in bp-custom.php?

    UPDATE: I believe that bp-custom.php should actually go in “mu-plugins”. Also, I did add the php script tags (<?php and ?>) around my code in this file. Still the links appear.

    @rebootnow

    Participant

    Wow. How on earth did I miss that? :|

    Thanks DJPaul.

    Happy 4th.

    @rebootnow

    Participant

    And I’m still a laggard on BBP 0.9.0.5.

    @rebootnow

    Participant

    Sure thing. I was originally scared off by a “forbidden” message from trac, but discovered that I simply needed to log in there using my buddypress.org credentials.

    @rebootnow

    Participant

    [UPDATE]

    Digging a little deeper, it looks like this is a bug in “messages_view_thread()”.

    I think it will work if “$thread->subject” is replaced with “$thread->messages[0]->subject”.

    This approach is working in my template to get access to the subject of the thread.

    @rebootnow

    Participant

    John, FWIW, I tried just creating a functions.php and the function wasn’t found.

    @rebootnow

    Participant

    Here is a quick & dirty stab at the method Burt suggests above. I have modified “bp_core_get_avatar()” (from “bp-core-avatars.php”) for use bbPress. Like the bp function it uses an uploaded avatar or a gravatar. You need to ensure that there is a “mystery-man.gif” file in the images folder of your theme. Note that I haven’t enabled the fancy automatically generated avatars.

    It works for me. Here are the steps:

    Create the new function “_get_avatar()”. I put it in “functions.php” in my theme folder and added “<?php require_once( ‘functions.php’ ); ?>” just before the <body> tag in “header.php” to ensure that it was loaded.

    You need the following in your “post.php” to call the function:

    <?php echo _get_avatar( get_post_author_id() ); ?>

    Here is the code for “_get_avatar()”:

    function _get_avatar( $id ) {

    $avatar_file = bb_get_usermeta( get_post_author_id(), ‘bp_core_avatar_v1’ );

    $url = BB_PATH . $avatar_file;

    if ( strlen( $avatar_file ) ) {

    return ‘<img src=”‘ . attribute_escape( $url ) . ‘” alt=”” class=”avatar photo” width=”50″ height=”50″ />’;

    } else {

    $default_grav = bb_get_active_theme_uri() . ‘images/mystery-man.gif’;

    $user_email = bb_get_user_email( $id );

    $gravatar = ‘https://secure.gravatar.com/avatar/&#8217; . md5( $user_email ) . ‘?d=’ . $default_grav . ‘&s=50’;

    return ‘<img src=”‘ . attribute_escape( $gravatar ) . ‘” alt=”” class=”avatar photo” width=”50″ height=”50″ />’;

    }

    return;

    }

    One question I have for the experts… Is this a reasonable way of adding a new function? Or would it be better to create a plugin. I didn’t do the latter because I didn’t need to use any of the hooks.

    @rebootnow

    Participant

    Resolved – Andy confirmed that this bbPress forum calls wp_create_nonce() using deep integration with WPMU.

    @rebootnow

    Participant

    Thanks Andy. So I need to figure out whether having the logout accessible from everywhere is important enough to incur the overhead of loading WP in bbPress.

    The BuddyPress forum seems pretty responsive, but I’m on a shared server.

    Great work on BP. Amazing what you’re empowering people to do with their sites.

    @rebootnow

    Participant

    Just trying again for something that I’m sure has a simple answer.

    I’m not asking for help to troubleshoot the cookie integration – I really just want to know how to create a link to the WPMU logout page from bbPress.

    In fact, exactly like the BuddyPress.org forum. The link on the above right on this page calls the WPMU logout function, but is doing so from the bbPress template. Is this link manually assembled? I imagine not, because it includes the nonce value.

    I have searched for this info on this forum, the bbPress forum, the WPMU forum, and the Internet.

    @rebootnow

    Participant

    FWIW, in this thread Bpfan posts a solution for the problem with BBP 0.9.0.4 where the admin is redirected to the main bbpress page on login (instead of the admin page).

    https://buddypress.org/forums/topic.php?id=2507#post-13736

    @rebootnow

    Participant

    Jeff, thanks for the extensive efforts to repro on your side. I have answers to your first two questions:

    1. No other plugins

    2. Default BuddyPress Home Theme

    I will investigate the server logs.

    @rebootnow

    Participant

    Does Andy’s approach still apply to BP 1.0?

    This is what works for me now:

    echo $bp->loggedin_user->domain, $bp->profile->slug;

    echo $bp->loggedin_user->domain, $bp->messages->slug;

    echo $bp->loggedin_user->domain, $bp->friends->slug;

    echo $bp->loggedin_user->domain, $bp->groups->slug;

    echo $bp->loggedin_user->domain, $bp->wire->slug;

    echo $bp->loggedin_user->domain, $bp->activity->slug;

    If this is inside a function, “global $bp;” must be at the top of course.

    Does 1.0 have template tags to make this easier?

    @rebootnow

    Participant

    Jeff, yes, I hit save changes. I also checked to see that the changes were accepted by looking at my profile in a separate browser window.

    After pressing “Save Changes” the default BP theme returns me to the edit page for that part of the profile, and the radio buttons there are set to my global defaults (not the options I just chose). If I browse away to my profile page without saving changes again, the correct (new) options are in place.

    I have now tested this on a second (new) BP installation. One thing I found was that it didn’t affect the very first radio button custom field I created in the Base group. I do see the issue for every subsequent custom field I create (in the Base group or in a second field group that I added) though.

    Jeff, have you tested this on your install with more than one radio button custom field?

    @rebootnow

    Participant

    I have related questions about the relationship between the WP tables and the BP tables, so I’d like to make sure that I understand the responses above.

    I know that BP maintains user profile information separately from “wp_usermeta” (in “wp_bp_xprofile_data”, to be specific). BP provides functionality for modifying this information, but no way for putting “wp_usermeta” fields into the “edit profile” form.

    So I think the answer to Peter’s question is that without *major* customization:

    1. You have to be happy with user data being stored in a few different places

    2. All user editable info must be in the tables created by BP

    Is this correct?

    BTW, what does the “Disable BuddyPress to WordPress profile syncing?” option do under BP General Settings in the admin page? Does this only apply to the username field?

Viewing 16 replies - 51 through 66 (of 66 total)
Skip to toolbar