Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • jgasba
    Participant

    @jgasba

    Par curiosité: est-ce que cette réponse a été nourrie par ChatGPT?

    Ça y ressemble vraiment, d’autant qu’après plus d’investigations je viens de trouver que BuddyPress est en effet censé supprimer l’avatar, grâce à deux fonctions : bp_core_delete_avatar_on_user_delete et bp_core_delete_avatar_on_delete_user

    Mon problème vient d’un manque de retour erreurs de la part de BuddyPress : c’était un conflit avec un autre plugin qui avait override les emplacements où les avatars sont stockés. Je suis en train de travailler à une solution. Ce serait vraiment top si BuddyPress retournait une erreur dans le cas où la tentative de suppression de l’avatar était ratée. Ça permettrait de s’en rendre compte rapidement.


    jgasba
    Participant

    @jgasba

    Even if there is a hook (I suppose there is of course), if it has not run, is there a way to go through all avatars and remove those from non existing users? Is there a recommended way to parse and delete all unused avatars?


    jgasba
    Participant

    @jgasba

    For the posterity: the Codex was not very clear for newer user: the Settings > Email mentionned is in the public user profile settings, and only available if you have the “Notifications” component enabled.

    It does not allow to define the default values for the users settings. Each user can customize their own themselves.

    If I’m not mistaken to customize the “default” you can use this code:

    
    add_action( 'bp_core_activated_user', 'wps_set_email_notifications_preference');
      
    function wps_set_email_notifications_preference( $user_id ) {
     
        $settings = array(
            'notification_activity_new_mention'         => 'yes',
            'notification_activity_new_reply'           => 'yes',
            'notification_friends_friendship_accepted'  => 'yes',
            'notification_friends_friendship_request'   => 'yes',
            'notification_groups_admin_promotion'       => 'yes',
            'notification_groups_group_updated'         => 'yes',
            'notification_groups_invite'                => 'yes',
            'notification_groups_membership_request'    => 'yes',
            'notification_messages_new_message'         => 'yes',
        );
      
        foreach( $settings as $setting => $preference ) {
            bp_update_user_meta( $user_id,  $setting, $preference );
        }
    }
    

    jgasba
    Participant

    @jgasba

    You have to click the “Unsubscribe” in the mail notification and it will set the notification_members_membership_request user meta to “no” and thus not send you more emails.

    (I wrote a in depth answer but the magic of forum posting made it disappear. If you received it by mail, it’be cool if you could repost it below, thanks.)


    jgasba
    Participant

    @jgasba

    I’ve done what you want to do like this:

    
    $user_compose_url = get_site_url() . '/members/' . get_user_by('id', get_current_user_id())->user_nicename . '/messages/compose';
    
    /* or when Buddypress 12.0 will be released */
    $user_compose_url = bp_loggedin_user_url( bp_members_get_path_chunks( array( bp_get_messages_slug(), 'compose' ) ) );
    
    $url = wp_nonce_url(
                    add_query_arg(
                        'r',
                        get_user_by('id', $user_id)->user_nicename,
                        $user_compose_url
                    )
                );
    

    This way you’ll have the nonce.
    You’ll need to adapt the code to where you want to display the button though.


    jgasba
    Participant

    @jgasba

    @imath I was running this test with both BuddyPress 12.00-beta4 and previous 11 version too.
    I’ve not tried to include the patch you link to me, I’ll try it.

    I understand that it could be a bbPress issue. Both bbPress and BuddyPress seem to have been answering on issues that it’s the other plugin that needs to patch. The issue was reported 11 years ago and again 4-5 years ago with the same response on both side.

    I don’t know both codebases enough (dug into both of them for the first time last week) to conclude if in the end it’s bbPress or BuddyPress that need patching but in the end there’s been an incompatibility on and off for 10 years… that even happen on Buddypress.org profiles.

    I’ll try with the latest BuddyPress patch for bbpress and let you know. Is it implemented on this very website though? Because as I pointed out, this bug is affecting the website here too.


    jgasba
    Participant

    @jgasba

    There is a very long running issue about that, it seems, on bbpress trac here https://bbpress.trac.wordpress.org/ticket/3355#comment:4
    if you have any more info on that, please share.

    Either wait for a bbPress update (it seems that it is in a slow pace lately), or maybe include a function hooking to bbp_get_replies_pagination_base filter (for replies as an example) to fix it on buddyPress side? (or on theme/plugins dev side but then it would probably be a good thing to include it in the docs somewhere?)


    jgasba
    Participant

    @jgasba

    More precisely, another detail: when using the v11 when the links are badly formed on another member profile forum page you can always manually type /replies/page/2/ in the adress bar of your browser and it will display the proper content.

    On beta4 you can’t do that: even /page/2/ or /page/3/ etc will redirect to the same page (on my local page it redirects to page 1 of that user profile forum tab).


    jgasba
    Participant

    @jgasba

    (I just typed a response and it does not show. Moderated because of links or bug on my part?)

    Shorter version: pagination on your own profile work, but on other people profiles don’t.

    @imath
    if you visit your own profile on this very website you’ll notice that the pagination links link to buddypress .org/page/2/ instead of /members/imath/forums/replies/page/2/

    After conducting local test it appears to be a problem on the v.11 too… is it a known issue? Is there a way we can help fix this?


    jgasba
    Participant

    @jgasba

    I have some feedback for the beta4: I stumbled upon this issue on my big site config but in troubleshooting mode with only default WP theme 2024 + BuddyPress (Heritage template but Nouveau has same problem) + bbpress I have this issue: in the /members/forums/ tabs of a member page, when I click on the different pages they do not display different content, only first page’s one.

    Could this be a problem with BuddyPress or is this only bbpress?


    jgasba
    Participant

    @jgasba

    The above answer comes from chatGPT. 100%.


    jgasba
    Participant

    @jgasba

    (damn the spam on this forum seems constant, that’s frustrating)

    I’m using BBpress.
    In fact the website I’m working on used BBpress and i’m trying to integrate that and Buddypress (that I enabled mainly to add private message to the website).

    bbpress has the advantage to contain templates that work directly when you enable both plugin.

    I’m trying to pull all the information from both bbpress profile and buddypress profile to an existing custom theme profile page but that’s the challenging part.


    jgasba
    Participant

    @jgasba

    I have included the .js scripts but BuddyPress seems to not detect my profile page as a proper place to output content about a user.

    For example when I do bp_get_template_part('members/single/activity'); I receive this output on the profile page (empty tags)

    <nav class="bp-navs bp-subnavs no-ajax" id="subnav" role="navigation" aria-label="Menu des activités">
    	<ul class="subnav">
    	</ul>
    </nav>

    And a similar thing happens when using bp_get_template_part( 'members/single/messages' ); or other template parts.

    How can I setup this so that BuddyPress recognises my profile page as a valid profile page where to output info and what should I use in my template to make BuddyPress load the proper scripts/actions/functions/objects to make it work?

    Thanks in advance for any clue to point me in the right direction.

Viewing 13 replies - 1 through 13 (of 13 total)
Skip to toolbar