Forum Replies Created
-
In reply to: How can I manage friendship events programmatically?
Most. maybe all, of the do_action hooks you need are in this file:
buddypress\bp-friends\bp-friends-functions.phpIn reply to: Email TokensThis will limit the BuddyPress message content to 50 words.
Change50to whatever integer you want.function bp_email_content_length( $formatted_tokens, $tokens, $obj ) { $formatted_tokens['usermessage'] = wp_trim_words( $formatted_tokens['usermessage'], 50, '...' ); return $formatted_tokens; } add_filter( 'bp_email_set_tokens', 'bp_email_content_length', 10, 3 );Use this filter hook and write a function:
apply_filters( 'bp_members_format_activity_action_new_member', $action, $activity );
Found in :...plugins\buddypress\bp-members\bp-members-activity.phpFor example, untested:
function pixie_new_member_activity( $action, $activity ) { $user_id = $activity->user_id; // assuming the field names are State and City $state = xprofile_get_field_data( 'State', $user_id, 'comma' ); $city = xprofile_get_field_data( 'City', $user_id, 'comma' ); $userlink = bp_core_get_userlink( $user_id ); $action = sprintf( __( '%s from %s in %s became a registered member', 'buddypress' ), $userlink, $city, $state ); return $action; } add_filter( 'bp_members_format_activity_action_new_member', 'pixie_new_member_activity', 10, 2 );In reply to: Is user logged in functionThis is a general WP question and is not specific to BP.
There are many ways to do this – depending on your theme, your ability with code, etc.
There are some plugins that can help you.
We suggest you do a google search on your question without restricting it to BuddyPress and you will see thousands of results.In reply to: Changing BuddyPress Groups SlugRemove that code.
Create a page calledTeams.
Go to wp-admin > Settings > BuddyPress > Pages
Select theTeamspage for theUser Groupsoption and thenSave
Go to yoursite.com/teams/Please use the
codebutton when posting code.Regardless of what you are trying to do – a function hooked to a filter must return something.
So your function should end like this:
return $retval; }In reply to: Issue after importing pages from other siteBecause it is specific to Nouveau, it sounds like a javascript related issue.
Try turning off any javascript minification on your install.
Usually such functionality includes a way to create an exclusion.
Try turning off any page caching.
Some hosting companies are aggressive re forcing you to use various kinds of caching ( wpengine, etc ) so you may not be able to make the changes needed to use Nouveau.Please do not use these forums for support questions about 3rd party plugins.
In reply to: Issue after importing pages from other siteTo determine if it is an issue related to your theme, please try switching momentarily to a WP theme like 2019 and then checking the registration page.
Please remember that you need to be logged out to see the register page.In reply to: Issue after importing pages from other siteBuddyPress will not use the content from pre-existing pages.
It injects all content into each page assigned to each component.In reply to: User Activity as default home page@dopeboy Please contact him directly.
Please do not use these forums for private conversations.In reply to: xProfile nickname erasing when switching tabsSend me an email and let’s discuss.
In reply to: xProfile nickname erasing when switching tabsI cannot duplicate your issue.
I created a Profile field called Nickname and set it to Required.
I can edit that field via the Extended tab – and it has no effect on any field on the User > Profile edit screen.
Under Settings > BuddyPress > Options, do you have this option selected ?
Enable BuddyPress to WordPress profile syncingI tested then toggled that option – the behaviour was the same re your issue.
In reply to: xProfile nickname erasing when switching tabsThat’s a tough one.
What is Query Monitor saying on those wp-admin pages ( it’s red ) ?It’s most likely a collision with some other code – but you knew that.
Have you tried narrowing it down?
Deactivate / Reactivate LearnDash and Memberium in various combos and try to recreate the issue.In reply to: Let users create groupsForums are bbPress.
Not sure what you are asking, but bbPress has their own forums.
In reply to: Let users create groupsIn wp-admin > Settings > BuddyPress > Options, did you select this option and save?
Enable group creation for all usersThen everyone should see a
Createbutton on the Groups directory page.In reply to: Make MyGroups the default directory listingbtw – when you dump the $nav items to the screen, did you notice that the Create array includes a
no-ajaxentry?
Perhaps get that working and then try an ajax solution.In reply to: Make MyGroups the default directory listingimath might respond, but it is unlikely. They are rarely on these forums.
You’ll need to walk thru the code to see every step of how other tabs are handled.
I would look at the My Groups code.
It may well be an ajax issue.If you find a solution, please update this topic.
In reply to: Whited-out Profile FieldsIt’s most likely your theme.
To find out, switch momentarily to a WP theme like 2019.In reply to: Social media fields as icons (not working)Please use the
codebutton when sharing code.You didn’t provide any context for where you are making the call to
xprofile_get_field_data.
Is it in a function? If so, what is that function hooked to?Are you aware that there are 3 parameters ?
xprofile_get_field_data( $field, $user_id = 0, $multi_format = 'array' );So perhaps your issue is related to the return of an array.
Try:$fb_page = xprofile_get_field_data('Facebook', $UserID, 'comma' );For issues with third-party plugins, please use the support forums for those plugins.
In reply to: Work with Datatable servers from a tableFor long example of code, please use gist and then post just the url here.
In reply to: Work with Datatable servers from a tablePlease use the
codebutton when sharing code.