Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 2,438 total)
  • Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Thanks for the heads up @danbp! I’ve updated my post above πŸ™‚

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    You can use the bp_update_user_last_activity() function to update a member’s last active date. Of course, you’d want to use this in some kind of loop.

    Hope this helps.

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    You can open the .po file in Poedit and then do your editing. No need for Dreamweaver.

    Your .po and .mo files should be named based on your locale. So as an example, mine are:

    wp-content/languages/plugins/buddypress-en_GB.po
    wp-content/languages/plugins/buddypress-en_GB.mo

    EDIT: Do not use these paths; instead, see @danbps update below.

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    You can create a language file. Check out this article:

    Customizing Labels, Messages, and URLs

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Hi @r083r7

    You’ll need to output a button on the front-end which, when clicked by a Type B user, would save data to that user’s meta info. The data value you save could be the amount and the key could be pay_to_message. The absence of the key against a particular user’s meta could indicate the feature is disabled.

    Does that make sense?

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    You could use member types to create child and adult types and add a radio button to the BuddyPress registration form?

    Member Types

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Here’s an example of what’s allowed:

    Activity Stream Plus for BuddyPress

    Note, the following is an example of what isn’t allowed:

    BuddyPress Activity Stream Plus

    You may come across older plugins that use the 2nd naming style. That’s because the guidance above was introduced by the WordPress Plugin Review Team relatively recently.

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Hi @julia_b,

    I haven’t tested this so try in your testing site first:

    // Change this to the ID of the member you'd like to add friends to.
    $id = 1;
    
    $user_query = array(
        'populate_extras' => false,
        'exclude' => $id
    );
    
    $user_query = new BP_User_Query( $user_query );
    foreach ( $user_query->results as $user ) {
        $status = BP_Friends_Friendship::check_is_friend( $id, $user->ID );
        if ( 'not_friends' == $status ) {
            friends_add_friend( $id, $user->ID );
        }
    }
    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Hi @julia_b

    I chose not to add an @ all command because it would be easy for a user to spam people.

    @ friends is supported though. Hope that helps!

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    I can successfully access your profile:

    http://www.cosegeniali.net/membri/tizianopitisci/profile/

    The following link won’t work for me because I’m not tizianopitisci. Only that user is allowed to access that page.

    http://www.cosegeniali.net/membri/tizianopitisci/messages/

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Is that a bug?

    I don’t think so because I can’t reproduce at my end. I think there must be something in your setup that’s causing the issue. Do you have a bp-custom.php file with code in it? That could be a source of the problem.

    Alternatively you might need to test again with a fresh database.

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    How about your theme?

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    You could use WP_Query. Here’s an example:

    $query = new WP_Query(
        array(
            'author' => bp_displayed_user_id()
        )
    );
    if ( $query->have_posts() ) {
        while ( $query->have_posts() ) {
            $query->the_post();
            echo get_the_title();
            // Output more stuff here if you like.
        }
        wp_reset_postdata();
    } else {
        // No posts found.
    }
    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Which plugins do you have activated?

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    With reference to the animation, have you tried contacting the theme’s author? Usually when there’s an issue like this it’s worth reporting it so they can issue a global fix.

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    I don’t think it will be easy but it’s certainly possible.

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    wp_insert_post() takes an array as its first param. post_date is set to the current time by default so something is setting it to 0000-00-00 00:00:00.

    If you’re talking about BuddyPress activity items (not WordPress posts) then recorded_time also defaults to the current time. Again, in this case there must be something in your plugin that is setting it to 0000-00-00 00:00:00.

    Ref: https://codex.buddypress.org/developer/function-examples/bp_activity_add/

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Would you prefer feedback on GitHub or on the group you created at buddycore.com?

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    as long as it’s not an octocat.txt file

    Ah man, my plans have been ruined πŸ™‚

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Hi buddycore,

    I think the theme is looking good! Will you be accepting pull requests on GitHub?

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Cool, no worries!

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    bp_use_oembed_in_activity can be used to allow or disallow oEmbeds in activity items.

    The bp_activity_embed() function just adds a bunch of filters and actions. It’s not really for filtering the oEmbed output.

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Can you try the bp_activity_embed_html hook?

    add_filter( 'bp_activity_embed_html', function( $retval ) { 
        return '<div>' . $retval . '</div>';
    } );
    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Perhaps that filter hook is for filtering embeds in WordPress content? BuddyPress must have a filter for this. I’ll need to have a dig around…

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Think of it like this:

    • Filters return stuff
    • Actions don’t

    Here’s an example using the embed_oembed_html filter:

    add_filter( 'embed_oembed_html', function( $html, $url, $attr, $post_ID ) {
        // Use $html, $url, $attr and $post_ID here if you like.
    
        // Wrap the HTML output.
        $html = '<div>' . $html . '</div>';
    
        // Return $html.
        return $html;
    }, 10, 4 );
Viewing 25 replies - 1 through 25 (of 2,438 total)
Skip to toolbar