Forum Replies Created
-
In reply to: Buddypress xprofile_insert_field_groupo Bug
You could check to see if the field exists before creating it.
But that check would happen on every page load.The best and most efficient method is to create a plugin and write a function that hooks to the
register_activation_hook.
In that function, check to see if the field exists and if not, create it.
Then the function will only run which the plugin is activated.In reply to: How to remove tabs from group admin navI’ll try to remove by add filter to bp_get_options_nav_{css_id}
If you can figure out what that filter hook is, please share it here. Thanks.
.it’s not always easy to get crucial info out of the documentation
Very true. And BP docs aren’t at the level of WP docs.
BP codex is being worked on, but it’s a cumbersome process.
If you see an opportunity to improve / amend something, I think participants can still do so.
Or start a topic here with suggestions.would changes to the files in the bp-templates directory get overwritten if I update the BP plugin?
Of course, which is why I suggested you create template overloads instead.
Using WP 4.1, BP 2.1.1, unable to duplicate your issue.
You’re trying to add a field group via:your-site/wp-admin/users.php?page=bp-profile-setup?
You’ll need to provide more info.In reply to: How to remove tabs from group admin navi want to remove some default BP tabs
Re removing the Manage > Delete tab…
You’re referring to the anon function in bp-groups-classes.php ?
add_action( 'groups_admin_tabs', create_function( '$current, $group_slug', etc...I agree that it’s unclear.
I think that if that function added a css id to the li tag, then we should be able to use the filter in bp_get_options_nav in bp-core-template.
If this makes sense, and you haven’t found a workaround, please open a ticket on trac.You should be able to add to the allowed tags array like so:
function fred_whitelist_tags_in_activity( $allowedtags ) { $allowedtags['a']['target'] = array(); return $allowedtags; } add_filter( 'bp_activity_allowed_tags', 'fred_whitelist_tags_in_activity' );You may want to do an add_filter / remove_filter in your plugin so that you don’t open up the allowed tags for other activity items.
In reply to: How to install the forum?BuddyPress doesn’t provide forums.
You need a separate plugin: bbPress
In reply to: Searching for custom group fields?In reply to: Block other Users – count images1. We have a premium plugin for blocking: BuddyBlock
2. BP-Album is a third-party plugin. Did you try asking on their support forum?
In reply to: Images – where to serve from?Have you tried this plugin?
In reply to: [Resolved] Edit buddypress.pot fileYeah, it can be frustrating to change some strings.
I’m not sure why you’re having trouble with the .mo approach.For one or two changes, you can use a function in your theme/functions.php or in bp-custom.php
Try this:function example_gettext_with_context( $translated, $text, $context, $domain ) { if ( 'buddypress' !== $domain ) return $translated; switch ( $text ) { case 'Site-Wide Activity': return 'text you want to appear instead'; default: return $translated; } return $translated; } add_filter( 'gettext_with_context', 'example_gettext_with_context', 11, 4 );In reply to: BuddyPress 2.1.1 Adding details to member-header.phpI cannot duplicate your issue.
In wp-admin, Users > Profile Fields, are your fields part of the ‘Base’ group of fields?
Or are they under another group, in another tab to the right of ‘Base’?btw: instead of
bp_get_profile_field_data, you should usebp_get_member_profile_data
That tutorial is for BP 1.5, very old.In reply to: BuddyPress 2.1.1 Adding details to member-header.phpbut not in the admin menu profile fields section
What exactly are you referring to?
The adminbar at the top of each page? If so, member-header.php does not affect that.In reply to: Buddypress activity filtering (search)Then you could search on those types like so:
bp_has_activities( bp_ajax_querystring( 'activity' ) . '&action=video_category' )
More info: https://codex.buddypress.org/developer/loops-reference/the-activity-stream-loop/#filtering-examplesIn reply to: Buddypress activity filtering (search)I have add 2 new columns in activity mysql table “video_category” and “video_subcategory”.
Adding new columns is not a good approach.
Did you try adding your ‘categories’ as a
typevia
https://codex.buddypress.org/developer/function-examples/bp_activity_add/ ?How will the ‘tags’ be used?
As the basis for filtering members?
Or just as ‘notes’ about each member?If the former, see the BP_User_Query codex page.
If the latter, you could use this premium plugin: BuddyNotes
Or you could simply create template overloads of these 2 files:
buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\profile-loop.php buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\edit.phpAnd check the fields via their id or name and then decide, based on who the logged-in user is, whether the fields should be displayed.
In reply to: [Resolved] Manage Signups permissions errorCongrats on the fix. Multisite + BP can be confusing.
In reply to: Spam/Bot usersIn reply to: Displaying members favorite activitiesbp_activity_screen_favorites()loads that screen.Try using:
bp_activity_get_user_favorites()Looking thru the source code will answer these kinds of questions.
In reply to: Page title errorsTry switching to a WP theme like 2012.
If the issue goes away, you know it’s something in your preferred theme.In reply to: This is why we can’t have nice thingsThis is still an issue for me.
Sometimes I can only post one link, sometimes 2, never more than 2.Any ETA on when this might be fixed?
In reply to: Sort member directory by xprofile fieldAnother approach: bp_user_query
In reply to: Sort member directory by xprofile fieldThe BuddyPress codex is your friend:
As you know
bp_total_unread_messages_count()will echo the count.
Many BP functions have a version that just returns a variable.
In your case, here they are:if (bp_get_total_unread_messages_count( bp_loggedin_user_id() ) > 0 ) //etc if (bp_friend_get_total_requests_count( bp_loggedin_user_id() ) > 0 ) //etc