Forum Replies Created
-
In reply to: Invite anyone and user role
Yes that would be a lot more complex I think, you’d need to create some way of storing the invited email addresses and check new signups for that email address. I think you’d need to create a plugin for that, it’s quite a bit more than a few lines in a code snippet.
In reply to: Group Types option displayIt’s not been announced yet
In reply to: Group Types option displayYes this issue has been reported:
In reply to: New user’s profile activation only by administratorThis would be quite complicated to do. IF it were me I’d fork https://wordpress.org/plugins/bp-disable-activation-reloaded/ and remove the auto-activation code.
In reply to: Translate logo in bp emails@demon19851027 I’m assuming this is related to the BP emails, however these do not include a logo, do you have a plugin adding that feature?
In reply to: Invite anyone and user roleI’m a bit uncertain as to the use case here: joining a group does not change the members role on the site, they started off as subscriber and they remained subscriber after joining. however you could acheive what you want by using the
groups_send_invitesaction.So something like:
add_action( 'groups_send_invites', 'venutius_invited_users_role', 10, 3); function venutius_invited_users_role( $group_id, $invited_users, $user_id ) { foreach ( $invited_users as $invited_user ) { $user = get_userdata( $invited_user ); $user->add_role( 'invited_members' ); } }I can help you, email me at venutius at buddyuser.com
In reply to: Lots of returuning E-MailsYes the users need a valid email address in order to activate their account. On think to check is that the emails are not being rejected as spam by their email provider ( gmail does this ). I found a way to avoid this was to change the default
wordpress@host.comto something more specific to the site using CB Change Mail Sender plugin.In reply to: Redirect to profile after avatar editedNot sure you can, avatar upload is done in JS and does not involve a page load so there’s nothing to redirect.
In reply to: Limitations of BuddypressThe limitations of BuddyPress are really the limitations of WordPRess and your host. If you think WordPress.com is run on WordPress you can see that scaling is possible, but that you’d probably need to do extensive customisations. File upload size is a server setting.
In reply to: move nav menu ABOVE cover imageFirst of all, I got the filename wrong, it’s home.php you need to edit.
This should be about the easiest bit of php you can get. But you will need to get ftp access to your site then create a buddypress/members/single directory in your themes/childtheme directory. Then take a copy of the source home.php file.
Home.php creates the basic content for the profile page and if you open it up you will see a section as follows:
<?php if ( ! bp_nouveau_is_object_nav_in_sidebar() ) : ?> <?php bp_get_template_part( 'members/single/parts/item-nav' ); ?> <?php endif; ?>This is what calls the navigation, at the moment it’s the second item being loaded, you want it to be the first, so you just need to move it as follows:
?> <?php if ( ! bp_nouveau_is_object_nav_in_sidebar() ) : ?> <?php bp_get_template_part( 'members/single/parts/item-nav' ); ?> <?php endif; ?> <?php bp_nouveau_member_hook( 'before', 'home_content' ); ?> <div id="item-header" role="complementary" data-bp-item-id="<?php echo esc_attr( bp_displayed_user_id() ); ?>" data-bp-item-component="members" class="users-header single-headers"> <?php bp_nouveau_member_header_template_part(); ?> </div><!-- #item-header --> <div class="bp-wrap"> <div id="item-body" class="item-body"> <?php bp_nouveau_member_template_part(); ?> </div><!-- #item-body --> </div><!-- // .bp-wrap --> <?php bp_nouveau_member_hook( 'after', 'home_content' ); ?>Once you’ve done that use ftp to copy your updated file to themes/child-theme/buddypress/members/single/home.php and test. that should do it.
Did the theme create a number members page or is it using the default BP page? If it’s using the BP page then you could probably overload the members page to remove those items. However the members count is part of the page pagination.
In reply to: Image size of activity-innerI’d ask the creators of the plugin that allows you to add images to the activity stream.
Ah sorry, fixed it.
In reply to: move nav menu ABOVE cover imageYou should be able to do that by overloading plugins/buddypress/bp-templates/bp-nouveau/buddypress/members/single/profile.php, you can place your modified copy in themes/child-theme/buddypress/members/single/profile.php.
In reply to: Disable scroll topYep the situation has improved with Nouveau and maybe Gutenberg will have something to say about how we structure our pages in future?
I’ve come up with a workaround, if we can’t stop them joining, after they’ve joined we can undo it:
add_action( 'groups_join_group', 'venutius_group_join_filter', 10, 2 ); function venutius_group_join_filter( $group_id, $user_id ) { global $bp; if ( current_user_can( 'manage_options' ) ) { return; } $membership_total = count( BP_Groups_Member::get_membership_ids_for_user( $user_id ) ); if ( $membership_total >= 2 ) { groups_leave_group( $group_id, $user_id ) } }In reply to: Disable scroll topHi there, WordPress and BuddyPress are predominately PHP applications. PHP requires a page load in order to view new content and this is what you are seeing – you click a menu item a new page loads and it starts from the top of the page again. There are tricks to bring the page focus back to where you were and BP uses these where appropriate, another trick is to use Javescript to fetch now content and again BP uses this, in the activity page for example. But when you are clicking a main link, an entire now page is going to be loaded to there’s not a reference of where you were in order to set the new page focus. So in short, it’s the way WordPress and BuddyPress have been written, yu’d need to do a significant rewrite to change it.
In reply to: Sub-menu orientationYou should ask the theme developer to support BP Nouveau
Hi there, I’ve taken a look at the code and there are no hooks that exist to allow you to prevent a member joining if they were able to press the join group button. What are the timescales for your project? You’d probably need to raise a feature request for this. It’s possible to do, but you’d have to introduce an unofficial filter into the BP source code.
Note that there is a flaw to this, if a user who has no group visits the groups page they will see they can join any group, if they click to join a group the other join buttons will still show until the page is reloaded, I’ll see if I can knock up a filter for this too.
you can add the following to your child themes functions.php file:
add_filter( 'bp_get_group_join_button', 'venutius_restrict_group_join', 10, 2 ); function venutius_restrict_group_join( $button, $group ) { global $bp; if ( current_user_can( 'manage_options' ) || $group->is_member ) { return $button; } $membership_total = count( BP_Groups_Member::get_membership_ids_for_user( $bp->loggedin_user->id ) ); if ( $membership_total >= 1 ) { return false; } return $button; }In reply to: I cant change the profile pictureDeactivate all other plugins apart from BuddyPress and see if it works.
You can see which BP Theme you are using by going to Settings>>BuddyPress>>Options
In reply to: Sub-menu orientationHave you looked at the BP Nouveau theme (Settings>>BuddyPress>>Options ) this allows you to set up vertical menus in Customizer.