Replies
- Brajesh Singh on May 21, 2018 at 7:42 am in reply to: Buddyblog privacy and activity featured image link #15217
Hi trolinof,
Do you want to allow the private status from the BuddyBlog plugin? If that is the case, we might be able to assist you.Ps:- Do you want to give the users the Public|Private visibility option? We might have to update the plugin for this but it is achievable.
Regards
Brajesh Hi David,
Welcome to BuddyDev.You may use the following code to redirect non logged users
add_action( 'bp_template_redirect', function () { if ( ! is_user_logged_in() && bp_is_members_directory() ) { bp_core_redirect( site_url( '/' ) ); } } );If you are using the Member Types feature of BuddyPress and want to do it for the directory of a specific member type, you may use ‘bp_get_current_member_type()’ to check for that.
Hope that helps.
Regards
Brajesh- Brajesh Singh on May 21, 2018 at 7:31 am in reply to: Starting afresh with BuddyPress & Multisite #15215
Also,
I forgot to post the link for option 1.
Here we go
https://buddydev.com/plugins/join-blog-widget/Regards
Brajesh - Brajesh Singh on May 21, 2018 at 6:51 am in reply to: Starting afresh with BuddyPress & Multisite #15214
Thank you Graham.
Please do let me know which approach suited you better.For adding user to blogs, you may use
1. – to let users join a blog
2. Or you can auto add user to the blog they visit by putting this code in a php file and putting it in mu-plugins dir/** * Plugin Name: Auto Add User to blogs * Version:1.0.0 */ /** * Auto add user to a blog if they don't have a role. */ add_action( 'init', function () { if ( ! is_user_logged_in() ) { return; } $user_id = get_current_user_id(); $blog_id = get_current_blog_id(); if ( ! is_user_member_of_blog( $user_id, $blog_id ) ) { add_user_to_blog( $blog_id, $user_id, get_option( 'default_role' ) ); } } );That will be automatically enabled across all blog and will add user to the blog they visit, if they are not a part of it. The last option is for role.
Hope that helps.
Regards
Brajesh - Brajesh Singh on May 21, 2018 at 6:41 am in reply to: [Resolved] Redirect Page based on Member Type #15213
Hi Sujee,
Please make sure to clear the cache. Also, I will suggest to visit Dashboard->Settings->BuddyPress-> Options and please select “BuddyPress Legacy”. The nouveau template pack contains many issues and might be causing it. Most probably BuddyPress 3.0.1 will bring normalacy to the new template pack.For now, Please stick with the legacy.
Please let me know if that fixes it or not?
Regards
Brajesh - This reply has been marked as private.
Thank you for the details.
All the best with the project and please feel free to use the forum as you please 🙂
Regards
Brajesh- Brajesh Singh on May 20, 2018 at 3:49 am in reply to: Starting afresh with BuddyPress & Multisite #15204
Hi Graham,
Welcome back. I am doing great and hope the same for you.1. Exactly same way as the normal WordPress/BuddyPress. The users are stored in wp_users table which is global among all sites of the network. BuddyPress simply provides(or overwrites) the way users register on the site.
2. No. But you should know that even if the users exist globally, they may or may not have a role on a sub site. Do you want the users to be assigned certain roles on each of the site? In that case, there are some solution that can be used.
3. It’s a good question. There are 3 choices here.
a) BuddyPress is only active on the one sub site. All other subsite’s won’t know that BuddyPress exists. In this case, you can simply activate BuddyPress on the 2nd site.
b) Network activated but to use 2nd site for social profiles/interactions etc:- In this case, add BP_ROOT_BLOG constant to your bp-custom.php (define(‘BP_ROOT_BLOG’, 2) ).
c). Want to have profiles on each of the site. In this case, we call it multiblog mode.
https://codex.buddypress.org/getting-started/customizing/bp_enable_multiblog/From the description, It seems to me, either A or B will be better applicable in your case.
Thank you for being a valuable member.
Regards
Brajesh Hi @bjoerndz
I haven’t tested the above code on BP 3.0. I don’t see any issue though.
Will check and get back to you later today.
Regards
BrajeshThank you Nikki,
I will keep you informed and let you know when I push the next update. It should not be too delayed.Regards
Brajesh