New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi Joss,
    Thank you.

    I am glad it worked.

    Just to be sure, the member type names are the name that you assign while creating the member type. Clarifying it for anyone else having same issue.

    Here is a screenshot showing it

    https://i.imgur.com/LW4c8nn.png

    and another one.

    https://i.imgur.com/dDs0asf.png

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Glad it is working 🙂

    A few advice’s for future
    1. You do not need to append empty spaces like ”. $some_value as it is not needed in notification_new_array.

    2. instead of checking for $notification_current_txt !==”” you can simply do if( ! $notification_current_txt )
    That ill take care of empty array.

    Best regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: .mov upload #20635

    Hi Steve,
    Thank you.

    It’s strange. I am aware of issues on activity page due to changing of the allowed file types but haven’t heard about this on single gallery earlier.

    Please allow me the weekend to explore it more and get back to you by Monday.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: Add link #20634

    Hi abuabrar,
    Welcome to BuddyDev.

    At the moment we don’t have a way to import from a folder. but if the folder is accessible over web(Inside your web root), you can import individual files by posting url.

    In the settings we have option if you want to keep a link to remote file or import it as local, you may use that for now.

    Please let me know if that works for you.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi maimaimemain,
    Thank you. I had looked at the code and assisted you(with a few time working with Buddyress, you will be able to do it easily yourself. Nothing special on my part 🙂 )

    1. If you need thread id, my suggestion is hook to

    
    messages_message_after_save
    

    Then, you can access thread id like

    
    
    $thread_id = $message->thread_id;
    
    

    Also, ‘update_user_meta()’ works with individual users. You should loop on the user ids and then update for each user.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi Joss,
    Thank you for the link. It helped understand the issue.

    Please use the valus “partageur” and “gardien” while setting the condition. This is the member type name.

    Since the lable was used, It is not working. Please give it a try.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi ,
    You are welcome.

    Try this one

    
    $recipients_ids = wp_list_pluck( $message->recipients, 'user_id' );
    

    It should give an array of user ids.

    About the thread:- In BuddyPress, it is possible to have multiple people involved in a common message. It is accomplished via thread. All messages have a thread id(think of it as a topic id) which BuddyPress uses to relate the replies.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi maimaimemain,
    Thank you for asking.
    For you, the appropriate action is

    
    messages_message_before_save
    or 
    messages_message_after_save
    
    

    You can hook to it like

    
    
    function your_message_action_handler( $message ) {
    }
    add_action('messages_message_after_save', 'your_message_action_handler');
    
    

    $message is ‘BP_Messages_Message’ object and you can access the details

    Please do note that hook does not allow to differentiate between a new thread and an existing one.

    To do that, you might need to hook to

    
    
    messages_message_before_save
    
    

    and check for empty thread id.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi Joss,
    Please see
    https://youtu.be/nZQX_nOzpV4

    If you need the Conditional profile fields to work with Member Types Here are a few things to remember.

    1. Fields must be available to all member types
    2. The member type field type should be Single(Multi member type field type is not supported)
    3. You need to use the member type names while assigning conditions.

    Please see the video for details.

    Hope that helps.

    Regards
    Brajesh