How to add a count in a custom tab in a Buddypress group

You are using the BP Nouveau templates, correct? Span tag works fine in the Legacy templates. In Nouveau, all links are stripped of span tags. See the calls to function _bp_strip_spans_from_title and functions like bp_nouveau_get_nav_link_text in buddypress\bp-templates\bp-nouveau\includes\template-tags.php. So remove your span tag from the create subnav item function. Instead, in Nouveau, use 2 filters for … Read more

BuddyBoss (BuddyPress / bbPress) moderation filters not doing anything

You’ve got the bp_bypass_if_user_can_moderate arguments wrong. From the documentation you linked to it should be bool $value, int $user_id, string $title, string $content, and as normal for filters you should pass through $value if you’re not going to change it. e.g. here’s a fixed up version of your filter: add_filter( ‘bp_bypass_check_for_moderation’, ‘bbp_bypass_if_user_can_moderate’, 10, 4 ); … Read more

Buddypress register.php user redirect [closed]

Just a heads-up that you should be using the bp_loggedin_register_page_redirect_to filter to accomplish this, rather than modifying BuddyPress files (which will get overwritten on every upgrade). function bbg_bp_loggedin_register_page_redirect_to( $redirect_to ) { if ( bp_is_component_front_page( ‘register’ ) ) $redirect_to = bp_get_root_domain() . ‘/home’; return $redirect_to; } add_filter( ‘bp_loggedin_register_page_redirect_to’, ‘bbg_bp_loggedin_register_page_redirect_to’ ); Put this in your theme’s functions.php … Read more

Buddypress: Load Ajax Without Template Pack [closed]

This is how I have used the default BP ajax queries/scripts in a custom BuddyPress theme: (gist with code: https://gist.github.com/3154297 ) function bp_custom_include_ajax() { global $bp; require_once( BP_PLUGIN_DIR . ‘/bp-themes/bp-default/_inc/ajax.php’ ); if ( !is_admin() ) { // Register buttons for the relevant component templates // Messages button if ( bp_is_active( ‘messages’ ) ) add_action( ‘bp_member_header_actions’, … Read more

Can’t Find BBPress data in Database

As far as I know bbPress uses custom post types. So all the data are in the regular posts and post_meta tables. A look at the source code should tell you more. From the bbPress Codex: bbPress creates three custom post types and adds them to the navigation menu: Forums, Topics, and Replies. Use these … Read more

Possible to add a language file to a plugin without adding .po/.mo files to plugin directory?

Best way to do this is probably by using a second, custom-made, plugin. Make a new plugin directory. Call it something like “example-com-custom-langs” or something unique to your site. In there, make a php file with a plugin header describing what the plugin does (for your own sanity), and do something like this: add_action(‘plugins_loaded’,’example_com_custom_langs_plugins_loaded’); function … Read more

Cannot get local avatars to show [closed]

Debug ideas: You could try to see if this has any effect: add_filter( ‘bp_core_fetch_avatar_no_grav’, ‘__return_true’ ); But you should check out the parameters that go through the bp_core_fetch_avatar filter to see if they are correct (untested): add_filter( ‘bp_core_fetch_avatar’, ‘my_bp_core_fetch_avatar’, 99, 9 ); function my_bp_core_fetch_avatar( $html, $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir ) { … Read more

delete a photo tag in rtmedia [closed]

It is fixed in v2.2.4. I suggest you to update your plugin. Or you can do it by adding following condition in tag rendering foreach loop RTMediaPhotoTag.php > function tag(){…} if(get_user_by(‘id’, $tagged) === false ){ $this-> delete_tag($tagged,$media_id); continue ; } You should post this issue on rtmedia support forum

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)