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: 25485

    Sure, Please give it a shot and let me know how it goes 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 25485

    Hi Jared,
    Thank you for your patience.

    Here is the code that you can put in your bp-custom.php

    
    
    /**
     * When a post is published, create a new entry on the secondary blog.
     *
     * @param string  $new_status nes status.
     * @param string  $old_status old status.
     * @param WP_Post $post Post object.
     */
    function buddydev_propagate_post_to_other_blog( $new_status, $old_status, $post ) {
    
    	$primary_id          = 1; // change with yours main site where BuddyPress is active.
    	$publish_blog_id     = 2; // Change with the blog id where to publish.
    	$buddyblog_post_type = 'post'; // change with the post type.
    
    	$post_id = $post->ID;
    	if ( get_current_blog_id() != $primary_id ) {
    		return;
    	}
    
    	if ( $new_status == $old_status || $new_status !== 'publish' || $post->post_type != $buddyblog_post_type ) {
    		return;
    	}
    
    	// if we are here, switch blog and insert post.
    	switch_to_blog( $publish_blog_id );
    	$post = clone $post;
    	unset( $post->ID );
    	$id = wp_insert_post( get_object_vars( $post ) );
    	restore_current_blog();
    	// Keep a reference for future usage.
    	if ( $id && ! is_wp_error( $id ) ) {
    		update_post_meta( $post_id, '_mapped_post_id', $id );
    	}
    }
    
    add_action( 'transition_post_status', 'buddydev_propagate_post_to_other_blog', 10, 3 );
    
    

    Please change the primary id, publish blog id and post type as you need.

    When a post is published, It creates an entry on the secondary blog.

    Please do note that if a post is published then unpublished and then published again, It will create two entries.
    You can improve it to handle that(I have stored the mapped post id in meta). It is a basic example to show how it works.

    PS:- If you are using custom post type with BuddyBlog, That must be available on your secondary blog too.

    Hope that helps.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25485

    Hi Carsten,
    The problem with people is they think if something was added recently, It is better.

    Nouveau and Legacy are two choices of template pack. Nouveau was added recently.

    In my opinion, BuddyPress developers added it to make BuddyPress appear more modern(ajax loading and so on).

    The problem is Nouveau is neither flexible nor easily extendible. That makes its adoption/support difficult.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25485

    Hi Nik,
    I don’t use WPML, so I am not sure how will you find it.

    I hope you are able to find the string and translate.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25485

    Hi Carsten,
    I am sorry but I don’t see a simple solution. It might be achieved by unbinding js events but that makes it complex.

    I won’t be able to assist you with it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25485
    Brajesh Singh on in reply to: [Resolved] translate notifications #24039

    You are welcome.

  • Keymaster
    (BuddyDev Team)
    Posts: 25485

    Hi Carsten,
    If you are using bp-legacy, you can modify yourtheme/buddypress/members/members-loop.php and replace this line

    
    <div id="pag-top" class="pagination">
    

    with this

    
    <div id="pag-top" class="pagination no-ajax">
    

    same for the bottom of the file

    Replace this

    
    <div id="pag-bottom" class="pagination">
    

    with

    
    <div id="pag-bottom" class="pagination no-ajax">
    

    That will disable ajax loading.

    PS:- If the file is not there, you may copy it from wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/ to your theme/buddypress/members .

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25485

    In WordPress, you can make a menu item link to any custom link.

    Using the special URL as custom link, you can link to any tab.

    Primary or sub nav depends on the theme. You can link to any tab/subtab to any WordPress navigation item.

    Please check the custom link option.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25485

    Hi Mike,
    Thank you.

    We need some kind of membership option that controls time(for example after 30 days the member ship expires or 60 days it expires).

    We can use the membership to trigger change.

    I am not sure as I do not use wp download manager, does it provide any membership system? If yes, we can look into it and check if we can integrate it with the member types pro.

    PS:- We will have a membership plugins this year.

    Thank you
    Brajesh

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