Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 3,276 total)

  • shanebp
    Moderator

    @shanebp


    shanebp
    Moderator

    @shanebp

    Buddypress pages can’t be customized anw work with any page builder … I hope it’s not true …

    It is true.


    shanebp
    Moderator

    @shanebp


    shanebp
    Moderator

    @shanebp

    The BuddyBoss Platform plugin is free.
    Their themes and support for the Platform are not free.

    Go here to get the free plugin – scroll down to
    “Download the free BuddyBoss Platform Plugin”


    shanebp
    Moderator

    @shanebp

    Put this in the functions.php file in your child theme or in bp-custom.php
    It will redirect visitors to the home page if they are not logged in and they try to open a member profile or the members directory.

    function seaspray_restrict_members() {
    
    	if ( bp_is_user() || bp_is_members_directory() ) {
    
    		if ( ! is_user_logged_in() ) {
    
    			wp_safe_redirect( home_url() );
    
    			die();
    		}
    	}
    }
    add_action( 'bp_ready', 'seaspray_restrict_members' );

    shanebp
    Moderator

    @shanebp

    The activity_id IS the row id, iow. the row id is 419
    [28-Nov-2019 12:56:39 UTC] 419

    All you have to do is try it yourself.


    shanebp
    Moderator

    @shanebp

    This works as expected:

    function test_bp_activity_add( $r, $activity_id ) {
    
    	write_log( $activity_id  );
    	write_log( $r );
    
    }
    add_action( 'bp_activity_add', 'test_bp_activity_add', 99, 2 );
    //do_action( 'bp_activity_add', $r, $activity->id );

    From the log:

    [28-Nov-2019 12:56:39 UTC] 419
    [28-Nov-2019 12:56:39 UTC] Array
    (
        [id] => 
        [action] => 
        [content] => Test action hook on Group activity update
        [component] => groups
        [type] => activity_update
        [primary_link] => 
        [user_id] => 1
        [item_id] => 1
        [secondary_item_id] => 
        [recorded_time] => 2019-11-28 12:56:39
        [hide_sitewide] => 
        [is_spam] => 
        [error_type] => bool
    )

    So just set a conditional to check if $r['component'] == groups and do whatever you want.


    shanebp
    Moderator

    @shanebp

    You may have found a bug.
    You can open a ticket here.


    shanebp
    Moderator

    @shanebp

    Using the proper hook always helps. Can be tricky to figure out.

    This is not up to date or comprehensive, but should help: bp hook order


    shanebp
    Moderator

    @shanebp

    You should not need to write a custom query to retrieve a piece of profile data, but if you do then this is more distributive:

    global $wpdb;
    $bp = buddypress();
    $user_id = get_current_user_id();
    $field_id = 2; // for example
    $field_value = $wpdb->get_var( $wpdb->prepare( "SELECT value FROM {$bp->profile->table_name_data} WHERE field_id = %d AND user_id = $user_id", $field_id ) );
    var_dump( $field_value );

    shanebp
    Moderator

    @shanebp

    You are making some basic mistake.
    You shouldn’t need to create an instance of bp
    Try using the bp_ready hook instead of bp_loaded.
    Instead of $bp->loggedin_user->id use bp_loggedin_user_id() or get_current_user_id()
    You don’t say where you are trying to use it in your child theme.
    Why not use pastebin to share the section of code that is not working?
    Use var_dump rather than echo to see what is really being returned.
    Try your code in bp-custom.php


    shanebp
    Moderator

    @shanebp

    forums are handled by bbPress – not BuddyPress


    shanebp
    Moderator

    @shanebp

    Applying a patch requires the use of version control.
    You can apply a patch manually by editing each file in the patch, but I don’t recommend it.
    The best approach is to wait until the patch is rolled into the next release.
    If you have further questions, you can add them to the ticket.


    shanebp
    Moderator

    @shanebp

    This is a known bug and a ticket & patch exist:
    https://buddypress.trac.wordpress.org/ticket/8163


    shanebp
    Moderator

    @shanebp

    Thanks for the screenshot of the error.
    Just before the word ‘Intervention’, there is an arrow. Click it and you should see the whole error message. Copy and paste it in a reply here.

    You may need to open a ticket.
    use the same login you use here. And include all the info you posted here.


    shanebp
    Moderator

    @shanebp

    It’s probably a javascript conflict with some code in your theme or some other plugin.
    Did you check your browser’s console for js errors?
    To confirm it is your theme, try momentarily switching to a WP theme like 2018 and see if the error persists.
    Are you using a caching plugin or something that minifies javascript?
    Try deactivating it or the minify part and see if the error persists.


    shanebp
    Moderator

    @shanebp

    Member will not appear on the All Members page unless they have logged in at least once since BP was activated.


    shanebp
    Moderator

    @shanebp

    afaik, the BP REST API does not use or require keys. Neither does the WP REST API.
    Perhaps your mobile app developer was referring to oAuth?
    If so, that implementation will be specific to your site, and is not a BP question.


    shanebp
    Moderator

    @shanebp

    Create a member. Then log-in as that member. Do they appear on the Members page?
    Members need to login at least once before they appear.


    shanebp
    Moderator

    @shanebp

    BuddyDev is a great and trusted resource for plugins and code snippets for BuddyPress.


    shanebp
    Moderator

    @shanebp

    You need to adjust the proper template.
    But don’t edit the templates in the plugin or your changes will be wiped out when you update BP.
    Instead, overload the template:

    Theme Compatibility & Template Files

    Re RED: you didn’t say which template pack you are using. I will assume it is Nouveau.
    Over load this template:
    wp-content\plugins\buddypress\bp-templates\bp-nouveau\buddypress\members\single\member-header.php
    Then open the overload template and find this code near the top:

    <?php if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() ) : ?>
    	<h2 class="user-nicename">@<?php bp_displayed_user_mentionname(); ?></h2>
    <?php endif; ?>

    And simply remove the conditional, so it will look like this:

    <h2 class="user-nicename">@<?php bp_displayed_user_mentionname(); ?></h2>

    Your other questions are more complex, but will require the same approach:

      – identify the template(s) you need to change
      – overload them
      – make your changes

    shanebp
    Moderator

    @shanebp

    subscriptions-tab.php is a custom file in your child theme, correct?

    The obvious guess is that there is a problem with the code in that file.
    Unless you share that code, it is difficult to know what the problem is.
    Please do not post the code here.
    Use a site like pastbin to share your code and then post the url here.


    shanebp
    Moderator

    @shanebp

    Your issue is specific Elementor. Did you ask them?

    Please note that you cannot use a page builder on pages that you have assigned to BP components like Members, Groups, etc.


    shanebp
    Moderator

    @shanebp

    Did you read this:

    bp-custom.php

    You’ll need to create the bp-custom.php file and then upload it to your site as explained in the article.

    To upload it, use a FTP tool like Filezilla or if your hosting company provides a File Manager, use that. So ask your hosting provider how to upload files.


    shanebp
    Moderator

    @shanebp

    Due to something in your theme, you are calling xprofile_get_field_data too early.

    In your pre_get_posts filter, you could try calling BP: $bp = buddypress();

    Otherwise, you’ll need to talk to the theme creator.

Viewing 25 replies - 1 through 25 (of 3,276 total)
Skip to toolbar