Forum Replies Created
-
In reply to: Group Adm Avatars
As you can see, the avatars are added by function bp_group_list_admins
in this file:
buddypress\bp-templates\bp-legacy\buddypress\groups\single\group-header.phpUnfortunately, that function has no filters.
So you’ll need to create a template over-ride of group_header.php in your theme.
Then replace bp_group_list_admins() with a custom function that you create in plugins/bp-custom.phpfunction bp_group_list_admins lives in
\buddypress\bp-groups\bp-groups-template.phpYou can copy it and change the function name and the html output of the foreach loop.
You’ll probably need to do the same thing for bp_group_list_mods()
In reply to: [Resolved] How to Display Group Creation Date?If you’re on a group page use:
bp_group_date_created()See buddypress\bp-groups\bp-groups-template.php for the particulars re that function.
In your theme, create an over-ride this file:
buddypress\bp-templates\bp-legacy\buddypress\members\single\member-header.phpRead this re over-riding files:
Add your shortcodes by using:
https://codex.wordpress.org/Function_Reference/do_shortcodeIn reply to: buddypress group with object cacheW3 total cache is very powerful but you need to take the time to learn it.
There are lots of sites that provide info on how to tune W3 total cache for your particular needs. Google it.
In reply to: buddypress group with object cacheDid you ask buddyboss support about your issue?
Are you using a caching plugin like
https://wordpress.org/plugins/w3-total-cache/You cannot cache everything or you will get stale pages or sections of pages.
Using a plugin like w3 total cache, you can control what is cached.
In reply to: Including avatar url into Postgres sql querybp_loggedin_user_avatar will echo the url
bp_get_loggedin_user_avatar will return the url
See buddypress\bp-members\bp-members-template.php
> I don’t know what to put on the “Template:” line.
You put the name of the parent theme there, I guess something about Weaver.
The link that hnla provided includes a link to
https://codex.wordpress.org/Child_ThemesIt’s a lot to take in at first – but you really need to _read_ the docs.
In reply to: Activity Stream – Remove specific activitiesYou can put this function in your theme functions.php or bp-custom.php
It will prevent the creation of activity entries for the items in $exclude
It will only do that going forward – it won’t remove existing entries.You need to find out what the activity type(s) is for achievements and add it to the exclude array.
function dont_save_various_activities( $activity_object ) { $exclude = array( 'friendship_created', 'new_member' ); if( in_array( $activity_object->type, $exclude ) ) $activity_object->type = false; } add_action('bp_activity_before_save', 'dont_save_various_activities', 1, 1 );You can read more on this great codex page by imath
https://codex.buddypress.org/plugindev/bp_activity_add-2/In reply to: Mirroring forum postsHave you asked this on the bbpress forums?
https://bbpress.org/forums/In reply to: Custom profile propertiesSorry, I forgot to consider the save functions.
Interesting problem.
There are a lot of action / filter hooks in bp-xprofile-classes.
You should be able to add the name field to the $_POST before it starts processing, so that you don’t need an input.
Or overwrite the ‘old’ name into that field value so that the new value isn’t saved, although that’s probably more confusing to the user than just hiding the input via css.In reply to: Join GroupTake a look at this file:
buddypress\bp-templates\bp-legacy\buddypress-functions.php~Line 110 there are 2 add_action calls to create a join-group button – ‘bp_group_join_button’.
You need to write a function that checks if the user is a member of any group.
If they are, do 2 remove_action calls so that the button is not created.
Except, of course, for the group that they belong to, otherwise the ‘Leave Group’ button will not appear.In reply to: Custom profile propertiesCopy it to your theme or child-theme
See ‘Overloading Template Compatibility theme files’ here:
In reply to: Custom profile propertiesThe easiest path is just to add a conditional to an override of this template:
buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\edit.phpThe name field is, I believe, always:
input type="text" name="field_1" id="field_1"So in the template, change this:
if ( 'textbox' == bp_get_the_profile_field_type() )to:
if ( 'textbox' == bp_get_the_profile_field_type() && 'field_1' != bp_get_the_profile_field_input_name() )and add an ‘else’ to just show the name value – bp_the_profile_field_edit_value()
In your theme dir, create an over-ride of this file.
buddypress\bp-templates\bp-legacy\buddypress\members\members-loop.phpHow to over-ride a BP template
In the over-ride, remove this code:
<div class="action"> <?php do_action( 'bp_directory_members_actions' ); ?> </div>bp_member_profile_data('field=TestA'); echo ' '; bp_member_profile_data('field=TestB'); echo '<br>'; bp_member_profile_data('field=TestC');$str = bp_get_member_profile_data('field=TestA') . ' ' . bp_get_member_profile_data('field=TestB') . '<br>' . bp_get_member_profile_data('field=TestC'); echo $str;In reply to: Stray line of code in profile headerAre you using the Easy Facebook Share Thumbnail plugin ?
Recently had the same issue, but didn’t try to solve it – just deactivated it.
Probably related to ajax and/or js in /wp-admin/ and/or /wp-admin/includes/
You may have more luck asking on bbpress.org/forums/
In reply to: bbPress forum posts not appearing in activity streamUsing some custom sql is probably the simplest approach for gathering old entries.
But if it’s in the activity stream, those entries should be pushed off the first page very soon so perhaps you can justify not bothering ? 🙂
4 times – yikes.
That suggests maybe 4 plugins are calling bp_setup_current_user too soon.
Or …Do any of your plugins create widgets? Might explain the multiple calls.
Instead of deactivating plugins one at a time, have you tried greping the plugins folder for bp_setup_current_user ?
If you find it, check to see which hook is calling it.
‘bp_include’ is the recommended hook.It probably is in a plugin.
Hopefully BP and bbpress are not throwing that warning.
You could try setting debug to true in wp-config.
And then go to the dashboard and see if the warnings continue.
Then deactivate the plugins one at a time to narrow it down.> repeated thousands of times
Per what? Each load or over a large time period?In reply to: scalablity of buddypress>100k concurrent user order
That will be more about the setup & tuning of your servers.
BP does a lot of caching and there are plugins like w3totalcache that help alot.
But you can’t cache BP pages without serving stale content.>a large number of groups
A large number of members in a single group won’t be as much of an issue as a large number of groups. If you have hundreds of groups, just listing them can be a real bottleneck.In reply to: scalablity of buddypressWhat do you consider ‘really large’ ?
It is scalable.
A lot depends on your ability as a sysadmin.In reply to: Username ErrorExactly what error message are they getting?
Are the errors coming from the WP fields – Username
Or the BP field – NameWhat names are they trying to use?
BP gives specific errors re usernames, such as ‘Username must be at least 4 characters’.
WP has its own restrictions, I think allowed chars are [a-z] and [1-0].
You should also provide the version of WP and BP used on your site.
Thanks.
I have not tested your fix, but I did update & reopen the ticket.