Forum Replies Created
-
In reply to: Profile fields not visible to everyone/other members
You got a link?
In reply to: Profile fields not visible to everyone/other membersAh ok, my hunch was wrong, hope you found it an interesting diversion. Have you tried deactivation all plugins apart from BuddyPress to see if there might be a conflict causing this?
In reply to: Profile fields not visible to everyone/other membersAh sorry, well listen carefully becuase I’m going to tell you about a very important diagnostic tool for your site. Take time to get to know it as it’s incredibly useful.
Right click on the page where you expect the profile fields to be displayed and you will see a bunch of options, one of them will be ‘Inspect’ or ‘inspect Element’ click on this.
This takes you to your browsers diagnostics, opened in the inspect html section. on the left of this content you will see the html structure of the page to are viewing, at the position of the element you wanted to inspect.
Take time to scroll around this area and you will see the various content areas for your page. Notice the elements are typically collapsed, there’s a triangle pointing right to show the element is collapsed, click on this and the element opens up and the triangle points down.
You should be able to fins a <table> on the page with a class of ‘profile-fields’, this is the table that holds your profile field data, inspect this and see if the profile fields you created are there.
Notice when you click on an element the browser diagnostics will show you the CSS that’s being applied to the elements and what files have set it. Take some time to get used to this incredibly powerful tool. A key feature is that with it you can set new CSS for screen elements on the fly, it won’t be saved and is a great way of seeing the impact of css changes you are looking to make without pushing it out site wide.
In reply to: Profile fields not visible to everyone/other membersI think the first thing to do is inspect the elements on the page and see if they are being printed, if they are then you could target them with CSS to give them the right colour.
Just click on the link to Trac above and select new ticket
On my system the widget has both the title and the message alligned left.
did you try:
#bp-sitewide-message p {
text-align: left;
}That should align both the title and the message left, you’d then need the strong css code to align the title center again. That’s if it works.
In reply to: Login page redirect to WordPress loginSo if the user is created, is it being created with the right username?
Both should be displayed on the left, if they are being centered then I think you have something that is affecting the CSS for these already. Do they still center with a default theme such as 2017 loaded?
In reply to: Some Questions…Is there a hook in your event list tht I could write a snippet to?
In reply to: Some Questions…Where do you want to display the info?
In reply to: Some Questions…Thanks, yes that helps me decide on my advice. Have you tried looking at my plugin https://wordpress.org/plugins/bp-profile-shortcodes-extra/ it’s got shortcodes that will do all you are looking for.
In reply to: Some Questions…Hi there, would this be a template file you are looking to display this info?
In reply to: Profile fields not visible to everyone/other membersOne issue I came across recently was the theme was hiding the user profile fields by printing them with the colour white with a white background. So my first suggestion would be to switch themes to a default theme such as 2017.
Have you done any customisations that could affect this?
In reply to: Login page redirect to WordPress loginYep BuddyPress uses the WordPress user database, so creating a BuddyPress user automatically creates a WordPress user.
Are the users receiving the activation link and are they trying to login after activating their accounts?
Hi there,
To centre the title you can use the following css slector:
#sitewide-notice strong { text-align: center; }However currently it’s not possible to separate the two paragraphs. This is due to the text going through the wp_filter_kses() function which is removing the <p> tags from the text thus turning two paragraghs into a single paragraph.
You could ask for an enhancement in Trac, to change this to an alternative function bp_messages_filter_kses() this would allow you to add a filter to allow <p> in the sitewide notice content. If you raise the ticket I’ll add this information as a suggestion to the devs.
I forgot one, you also need to remove the option from the Admin>>My Profile page, if you allow admin access for users:
add_action( 'bp_members_admin_xprofile_metabox', 'bpex_remove_user_profile_metabox', 20 ); function bpex_remove_user_profile_metabox() { if ( ! is_admin() ) { return; } $user = wp_get_current_user(); $user_roles_array = $user->roles ? $user->roles : array(); foreach ( $user_roles_array as $key => $role ) { if ( $role == 'subscriber' ) { remove_meta_box( 'bp_xprofile_user_admin_avatar', buddypress()->members->admin->user_page, 'side' ); } } }This one is not that straight-forward there is a filter you can use as follows:
function bpex_role_disable_avatar_uploads( $default ) { $user = wp_get_current_user(); $user_roles_array = $user->roles ? $user->roles : array(); foreach ( $user_roles_array as $key => $role ) { if ( $role == 'subscriber' ) { $default = true; } } return $default; } add_filter( 'bp_disable_avatar_uploads', 'bpex_role_disable_avatar_uploads' );However this causes BuddyPress to simply show the user that they can upload their profile image via gravatar, and I’m afraid you can’t switch this off.
So the alternative is to remove the Change Photo tab and admin-bar menu item:
add_action( 'bp_setup_nav', 'bpex_remove_change_profile_photo_tab', 50 ); add_action( 'bp_setup_admin_bar', 'bpex_admin_bar_remove_change_profile_photo', 50 ); function bpex_remove_change_profile_photo_tab() { if ( ! bp_is_user_profile() && ! bp_is_user_activity() && ! bp_is_user() && bp_displayed_user_id() != wp_get_current_user() ) { return; } $user = wp_get_current_user(); $user_roles_array = $user->roles ? $user->roles : array(); foreach ( $user_roles_array as $key => $role ) { if ( $role == 'subscriber' ) { bp_core_remove_subnav_item( 'profile', 'change-avatar' ); } } } function bpex_admin_bar_remove_change_profile_photo() { global $wp_admin_bar, $bp; if ( ! bp_use_wp_admin_bar() || defined( 'DOING_AJAX' ) ) { return false; } $user_id = get_current_user_id(); if ( ! $user_id || $user_id == 0 || ! is_numeric( $user_id ) ) { return; } $user = wp_get_current_user(); $user_roles_array = $user->roles ? $user->roles : array(); foreach ( $user_roles_array as $key => $role ) { if ( $role == 'subscriber' ) { $wp_admin_bar->remove_menu( 'my-account-xprofile-change-avatar', 'my-account-xprrofile' ); } } }You’d need to put this in your child themes functions.php or a bp-custom.php file in the plugins directory.
In reply to: Lightbox profile imageHi Debby, I found time to test this, if you install WP Featherlight and then make the following change:
<?php $fullsize_avatar_url = bp_core_fetch_avatar( array( 'type' => 'full', 'html' => false, 'no_grav' => true, 'item_id' => bp_get_member_user_id() ) ); ?> <li <?php bp_member_class(); ?>> <div class="item-avatar"> <a href="#" data-featherlight="<?php echo $fullsize_avatar_url; ?>"><?php bp_member_avatar(); ?></a> </div>You will have your avatars in lightboxes. However these will probably be small. The default is only 150 pixels.
You can change this with the following setting placed in either your child themes functions.php or a bp-custom.php placed in the plugins directory.
define ( 'BP_AVATAR_FULL_WIDTH', 150 ); define ( 'BP_AVATAR_FULL_HEIGHT', 150 );change the 150 to your preferred pixel size for the image.
In reply to: RESOLVED-Friend requests of deleted usersHi there, that’s not the behaviour I’m seeing at this end, when the user get’s deleted the notification get’s deleted as well.
In reply to: Main navigation widgetHi there, On my test system the widget shows up on all pages.
In reply to: how to combine activity tabs to oneI’ve updated this code with more options
In reply to: BuddyPress CustimizationsHi there,
I worked out how to add a post box to the users profile for visitors. You could add this code to my code for all profile activity and that should get pretty close to fb functionality:
function bpex_load_mention_me() { if ( get_current_user_id() != bp_displayed_user_id() ) { $_GET['r'] = bp_activity_get_user_mentionname( bp_displayed_user_id() ); bp_get_template_part( 'activity/post-form' ); } } add_action( 'bp_before_member_body', 'bpex_load_mention_me' );In reply to: BuddyPress CustimizationsTo add the feature where people can post updates to the user would involve adding the activity What’s New form to the the users all activity page. It’s an odd quirk of BuddyPress that the standard profile based activity update form only displays when the viewing user is the profile owner.
In reply to: BuddyPress CustimizationsOne way is to use the wordpress toolbar dropdown as I described earlier, there’s a profile option and in there you can select change profile image
In reply to: Lightbox profile imageWhat you will need however is details of how to construct the url for the full size avatar image:
<?php $fullsize_avatar_url = bp_core_fetch_avatar( array( 'type' => 'full', 'html' => false, 'item_id' => bp_get_member_user_id() ) ); ?>So you’d add this as the image that will load into the lightbox.