Forum Replies Created
-
In reply to: Remove Buddypress Admin Bar
add_filter(‘show_admin_bar’, ‘__return_false’);In that code your
'‘s look wonky.Try
add_filter( 'show_admin_bar', '__return_false', 99 );I’ve also put a high priority on it to make sure it gets done ( a priority of 99 ).
In reply to: avatar width doesn't applyNot saying this is the problem because I have very limited PHP knowledge but maybe that’s where echo bp_core_fetch_avatar( array(… is getting it’s Avatar from.
I can’t seem to duplicate the problem. It actually works for me.
Can you try using Twenty Thirteen? If that works then that shows something has been introduced (perhaps in your theme or maybe a plugin) which is conflicting with the function.
In reply to: avatar width doesn't applyall I can think of is are you defining a custom avatar size in bp-custom?
In reply to: avatar width doesn't apply@macpresss could there be some CSS in your theme that is resizing the avatar image?
In reply to: avatar width doesn't applyAlso, make sure to change
'height' => 15to'height' => 32as well.In reply to: avatar width doesn't applyTry changing type to full. That said, I wouldn’t advise modifying core files.
In reply to: Seeking a BuddyPress DeveloperTry posting your requirements in the BuddyPress Jobs Forum
In reply to: Optimize by removing blank lines and comments?@synaptic not a stupid question – always a good idea to improve performance. That said, removing comments isn’t where you should start.
1. Try minifying your scripts that haven’t already been minified.
2. Run your site through a tool such as tools.pingdom.com to identify all of the unnecessary resources your page is using – and remove them where appropriate
3. Deactivate unused plugins and so on…Some more ideas:
a) Lazy loading of images on long pages
b) Defer loading of javascriptSo many ways to improve performance – cutting back on comments, though, isn’t a way I’d recommend.
In reply to: change 'their' to 'his' or 'her' in activity stream@mfmsw2youth Thanks for letting me know.
I hadn’t tested the code. Please try this and let me know how you get on:
function custom_activity_text_change_avatar( $entry, $user_id ) { $gender = bp_get_profile_field_data( 'field=Gender&user_id=' . $user_id ); $userlink = bp_core_get_userlink( $user_id ); if ( $gender == 'Male' ) { $entry = sprintf( __( '%s changed his profile picture', 'buddypress' ), $userlink ); } else if ( $gender == 'Female' ) { $entry = sprintf( __( '%s changed her profile picture', 'buddypress' ), $userlink ); } else { // the user hasn't told us if they are male or female so do nothing } return $entry; } add_filter( 'bp_xprofile_new_avatar_action', 'custom_activity_text_change_avatar', 10, 2 );In reply to: buddy press suitability@bonaish try using Theme Check to test your chosen theme against the latest WP good practice:
https://wordpress.org/plugins/theme-check/
Then if you see lots of red flags then you can report them to the theme author. They’ll probably appreciate it as they can iron out any bugs they don’t already know about.
@matt-mcfarland glad to see you got this resolved!
In reply to: change 'their' to 'his' or 'her' in activity streamYou will need the php tags only if your functions.php file doesn’t already have them.
In reply to: change 'their' to 'his' or 'her' in activity streamOops return $entry should end with a semi colon eg
return $entry;In reply to: change 'their' to 'his' or 'her' in activity streamTry adding this to your theme’s functions.php file:
function custom_activity_text_change_avatar( $entry, $user_id ) { $gender = bp_get_profile_field_data( 'field=Gender&user_id=' . $user_id ); if ( $gender == 'Male' ) { $entry = sprintf( __( '%s changed his profile picture', 'buddypress' ), $userlink ); } else if ( $gender == 'Female' ) { $entry = sprintf( __( '%s changed her profile picture', 'buddypress' ), $userlink ); } else { // the user hasn't told us if they are male or female so do nothing } return $entry } add_filter( 'bp_xprofile_new_avatar_action', 'custom_activity_text_change_avatar', 10, 2 );Notes:
1. Your profile field should be called Gender and it should be a radio button. Options should be Male or Female
In reply to: change 'their' to 'his' or 'her' in activity streamHi @mfmsw2youth
Can you paste the exact text here that you’d like to change. Eg the text that is coming up in your activity stream.
In reply to: BuddyPress Like updated on wp.orgHi @darrenmeehan looks good and works very well. I like that you can change the wording easily via the back end so if you’re not happy with ‘like’ then you could use ‘star’ or ‘favourite’.
Thanks!
In reply to: change 'their' to 'his' or 'her' in activity stream@sundev you would need to capture each member’s gender using a profile field. A radio button would do it.
Then once you have that information you could do a simple check when filtering the text.
e.g
if ( is male ) { // this must be a male so filter the text to say 'his' } else { // this must be a woman so filter the text to say 'her' }Filtering the text is the second step. If you let me know *exactly* the text you want to change, i’ll try to find where it is in the BP core code and see if a filter is available.
In reply to: change 'their' to 'his' or 'her' in activity streamHi @mfmsw2youth,
What is the exact text you’d like to change?
In reply to: change 'their' to 'his' or 'her' in activity streamHi @sundev
No, it wouldn’t change. You would need to filter the text accordingly depending on the gender they specify in their gender profile field.
In reply to: Login Bar on Homepage@626design the best way to pinpoint the problem is remove all customisations you’ve made. Start with a theme such as Twenty Thirteen with no plugins activated. Then activate your plugins one by one. Then introduce your custom functions one by one. Test each time you make a change. It is a long winded process but when customising your site that is the only way to fix the problem. There’s no easier way I’ve come across.
In reply to: change 'their' to 'his' or 'her' in activity streamHow will you determine if the member is male or female?
In reply to: [Resolved] Username vs display nameHave you tried BuddyPress Usernames Only? https://wordpress.org/plugins/buddypress-usernames-only/
In reply to: Login Bar on HomepageWhat was the function you added? Perhaps there is a problem with that
Site tracking – if you go to your WP admin area, look under BuddyPress where you can enable and disable components. You’ll see that you can enable site tracking. You’ll need to have this option checked to get notifications.
EDIT: Just re-read your question. You should get an email and core notification. Have you enabled ‘site-tracking’ in WP admin?