Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25273
    Brajesh Singh on in reply to: [Resolved] Single message thread per user? #6981

    Hi David,
    I am sorry but I am not getting the changes there.

    1. Do not remove the compose screen. Limit to to send to only one user.
    Here is an example code to find the threads between two users.

    
    
    function buddydev_get_threads_between_users( $user_id, $other_id ) {
    
    	if ( ! function_exists('bp_is_active') || ! bp_is_active( 'messages' ) ) {
    		return array();
    	}
    
    	$bp = buddypress();
    	global $wpdb;
    
    	$table_messages = $bp->messages->table_name_messages;
    	$table_recipients = $bp->messages->table_name_recipients;
    
    	$sql = $wpdb->prepare( "SELECT thread_id FROM {$table_messages} WHERE sender_id = %d", $user_id );
    
    	$sql .= $wpdb->prepare( " AND thread_id IN ( SELECT thread_id FROM {$table_recipients} WHERE user_id = %d )", $other_id );
    	
    
    	$sent_threads = $wpdb->get_col( $sql );
    
    	$sql = $wpdb->prepare( "SELECT thread_id FROM {$table_messages} WHERE sender_id = %d", $other_id );
    
    	$sql .= $wpdb->prepare( " AND thread_id IN ( SELECT thread_id FROM {$table_recipients} WHERE user_id = %d )", $user_id );
    
    	$threads_by_other_user = $wpdb->get_col( $sql );
    
    	$thread_ids = array_unique( array_merge( $sent_threads, $threads_by_other_user ) );
    
    	return $thread_ids;
    
    }
    
    

    Hope that helps.

  • Keymaster
    (BuddyDev Team)
    Posts: 25273
    Brajesh Singh on in reply to: BP Clear all notifications not working #6980
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25273
    Brajesh Singh on in reply to: [Resolved] BuddyPress Featured Members #6978

    Thank you Martin for letting me know 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 25273

    Hi,
    Please wait before you do that. Here are a few things you should know.

    1. There is a chance that you will loose the default BuddyPress Configuration settings(since earlier BuddyPress settings was attached to the main site). You may need to create component associations.

    Except that everything should be normal(including user etc)

    2. Please do know that any plugin that depends on BuddyPress(like user info widget) will only be available when the find BuddyPress code. By network activating, you allow these plugins to access the data on any of the sub sites.

    Hope that clarifies.

  • Keymaster
    (BuddyDev Team)
    Posts: 25273
    Brajesh Singh on in reply to: BP Ajax Registration #6975

    Hi,
    I am sorry for the delayed update.

    I have done 2 changes on the server

    1. I have disabled the feed Them social since I did not see the settings for it being updated and it was loading script at multiple places

    2. I have also slighly changed (1 line) in cherry theme to avoid loading the magnific popup when user is not logged in(Because it is already loaded by other plugin)

    3. Please add the class “bp-ajaxr” to the link and it will work as expected. I tested by adding the class in browser.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25273
    Brajesh Singh on in reply to: BP Clear all notifications not working #6972

    Hi Again,
    I have tested the plugin now. It works with BuddyPress 2.7.4

    Is there any chance that you have some javascript error? At the moment, the plugin uses js for clearing notification if there is any js error caused by theme or other plugin, this breaks.

  • Keymaster
    (BuddyDev Team)
    Posts: 25273
    Brajesh Singh on in reply to: [Resolved] Single message thread per user? #6969

    Hi David,
    It’s an interesting idea. I am assuming you are looking for one conversation between a pair of users.

    There are 2 things that needs to be done here

    1. Stop users from sending message to more than 1 user at a time
    2. Stop users from sending message to another message(technically, it will be easy to disable the compose screen directly and allow sending message using the profile send message link

    We are not in a position to do something like this at the moment but will be glad to assist you if you plan to develop it.

    Let me know how can we help further.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25273
    Brajesh Singh on in reply to: BP Clear all notifications not working #6968

    Hi imborx,
    Welcome to BuddyDev.
    I am sorry for the inconvenience. I am testing the plugin and will update you shortly.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25273

    Hi djSteven,
    Welcome to BuddyDev.

    Is BuddyOress network activated on your install? This plugin depends on BuddyPress, so if BuddyPress is not network activated, It won’t be visible on the sub sites.

    Please let me know if BuddyPress is network active?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25273
    Brajesh Singh on in reply to: grid with name #6966

    Hi,
    Can you please post the shortcode you have used. I remember we had another topic for this but I am unable to recall where. Did we make any change in template too?

    Thank you
    Brajesh