Maybe Slava is busy ! Try to contact him on BuddyPress Slack or Twitter (@slaFFik).
[MOD] Topic moved to a more appropriate forum.
The following plugins/widget are generating these error messages.
bp-edit-group-slug
BP_Toplevel_Groups_Widget
BP_Group_Navigator_Widget
bp-group-email
bp-group-hierarchy
You have to contact their authors via plugin support on WP repo.
and on your side:
The first step to getting rid of those Notices is identifying the source, so:
– switch momentarily to a WP theme like 2016 and see if any persist
– turn off plugins one at a time and see if any persist
About the bbPress notice (bbp_setup_current_user was called incorrectly), read here:
https://buddypress.trac.wordpress.org/changeset/10709/
bbp_setup_current_user was called incorrectly
It’s the same principle, but not the same syntax since 2.6
To hide tabs on groups, you need to specify the component. Note that all menu items (nav and subnav items) are considered as sub-nav, they have not the same distinction as on member or activity menus.
Use another function for groups. Try this.
function bpex_remove_group_tabs() {
if ( ! bp_is_group() ) {
return;
}
$slug = bp_get_current_group_slug();
// hide items to all users except site admin
if ( !is_super_admin() ) {
// bp_core_remove_subnav_item( $slug, 'members' );
bp_core_remove_subnav_item( $slug, 'send-invites' );
// bp_core_remove_subnav_item( $slug, 'admin' );
// bp_core_remove_subnav_item( $slug, 'forum' );
}
}
add_action( 'bp_actions', 'bpex_remove_group_tabs' );
To get more usage examples, see here:
Navigation API
When you copy/paste code you do not really control, try at least the original one first before adding wrong things to it.
For the redirect link, use this syntax:
return bp_core_get_user_domain( $user->ID ) .'/mypics';
And please don’t double post. It’s annoying.
Do you mean also that members can’t access to their profile settings when they are on their profile page ?
The BP usermenu on the Toolbar, under Howdy (top right) mimics the usermenu of the BuddyBar which is on each profile.
Have you enabled Extended Profiles ?
Or use this snippet to login redirect your users to their profile.
ps: i removed your site url as it is locked to public – which doesn’t help no one to help you.
hi @earl_d,
add this snippet to bp-custom.php and give it a try.
function bpex_redirect_to_profile( $redirect_to_calculated, $redirect_url_specified, $user ){
if( empty( $redirect_to_calculated ) )
$redirect_to_calculated = admin_url();
// redirect logged in to his/her profile - except site admins
if( isset( $user->ID) && ! is_super_admin( $user->ID ) )
return bp_core_get_user_domain( $user->ID );
else
return $redirect_to_calculated; /* nada !*/
}
add_filter( 'bp_login_redirect', 'bpex_redirect_to_profile', 11, 3 );
For the redirect URL error you mentionned here, use:
return bp_core_get_user_domain( $user->ID ) .'/mypics';
mypics is a slug, not a constant ( $user->ID ) .mypics
Add this snippet to bp-custom.php and give it a try.
function bpex_hide_profile_menu_tabs() {
if( bp_is_active( 'xprofile' ) ) :
if ( bp_is_user() && !is_super_admin() && !bp_is_my_profile() ) {
// BP's profile main menu items. Comment those to show.
// bp_core_remove_nav_item( 'activity' );
bp_core_remove_nav_item( 'profile' );
bp_core_remove_nav_item( 'friends' );
bp_core_remove_nav_item( 'groups' );
// exist only if you use bbPress
bp_core_remove_nav_item( 'forums' );
// BP's profile main menu items. Comment those to show.
// bp_core_remove_subnav_item( 'activity', 'personnal' );
bp_core_remove_subnav_item( 'activity', 'mentions' );
bp_core_remove_subnav_item( 'activity', 'favorites' );
bp_core_remove_subnav_item( 'activity', 'friends' );
bp_core_remove_subnav_item( 'activity', 'groups' );
}
endif;
}
add_action( 'bp_setup_nav', 'bpex_hide_profile_menu_tabs', 15 );
I am using https://wordpress.org/plugins/buddypress-wall/ but as soon as I activate it, the cover image is disappeared from user profile page.
I have tried to look into the BP and Plugin both template file but couldn’t get an idea to fix it. Can anyone help me on it?
Thanks
Wordpress: 4.5.3
Buddypress: 2.6.1.1
Theme: Child of Twentyfourteen
Site: http://social.tgdgaming.com/activity/ (to get you past the login)
Plugins:
Bowe Codes
Buddypress Activity Plus
Buddypress Friend of a Friend (FOAF)
BuddyPress Groups Extras
BuddyPress Profile Shortcodes —-(Has a bad profile link as well, {site.com/members/user//} has //)
Custom Admin Footer Text
Custom Menu Wizard
iFlyChat ————– (Stopped working around the same time as the other issues)
jonradio Multiple Themes
Menu Icons
Mutual Buddies
Peter’s Login Redirect
Scrollbar
WYSIWYG Widgets / Widget Blocks
Problem Pages:
Profile Edit: site.com/members/user/profile/edit/
Profile Activity: site.com/members/user/activity/ (on profile view site.com/members/user/ —works)
Group Manage: site.com/groups/group/admin/
More Info:
I believe the issues started when I was screwing around trying to add a extra sidebar. I did try to add one manually and with plugins (that may have been the cause). Trying to go to these links gives a white screen with nothing loaded in when inspecting with chrome.
Troubleshooting:
Disabling plugins one by one.
Disabling all non-essential plugins (all but buddypress and jonradio Multiple Themes).
Re-installing the Base Theme.
Re-installing Buddypress.
Overwriting WordPress with Fresh files.
Any help is greatly appreciated. I can try to get anymore info you need
Ps. Please excuse the bad styling had a bad upload with a style.css that overwrote the main theme with another theme and it’s being reworked with better css practices.
uh oh – just logged a php error for the new code. The error reported was this:
PHP Parse error: syntax error, unexpected ‘endif’ (T_ENDIF) in /home/mysite/public_html/wp-content/themes/child-theme/buddypress/activity/index.php on line 34
But when I look at this file I’m pretty sure it’s the same as what you posted =
<?php if ( is_user_logged_in() && is_super_admin() ) ?>
<?php bp_get_template_part( 'activity/post-form' ); ?>
<?php endif; ?>
and line 34 is: <?php endif; ?> which I’m pretty sure I didn’t change!
Can anyone spot what the problem is here?
Many thanks, j
Hi, I’m using WordPress 4.5.3–en_GB, with BuddyPress version 2.6.1.1, running on a Customizr child theme.
I am using Frontier Post plugin which allows users to submit front end posts, as such I have disabled the admin bar using Frontier Post plugin. Everything works well. Unfortunately by disabling admin panel, users are unable to enjoy BuddyPress to it’s full potential as they are unable to update their own profile photo etc…
Currently users can only access my-site/your-profile/ after logging in.
I would like users to be able to access my-site/members/*username*/ after logging in.
Please help me, I still want admin panel to be hidden but yet allow users to access their own BuddyPress page. Thank you.
Regards,
shanehidir
It seems that the comments and friendship function abilities are core things of buddypress not external plugins.
Can anyone help with this?
BP files are very well commented actually. But reading through hundreds of files is not easy. Here a good ressource to find a function, hook by keywords. Still interesting even if related to BP 2.4.3
Test and search for get_ to have an idea !
Guess you have to code it completely.
A great and very complete tutorial is Creating Maintainable WordPress Meta Boxes
And here an overview of almost all BP hooks and filters related to meta.
@danbp yeah, sorry about that :). Reason I went a bit further was when working on a theme earlier I was using a function get_displayed_group_id() or something with a similar name. I was expecting a return value but it was echoing no matter where I placed this.
Ended up using a different method.
Just wondered if there were other functions inside BuddyPress that looked like a return value but had output instead.
Maybe it’s me who’s wrong. I haven’t tested, but it’s how i used such a function in the past, called inside another one. I also wrote “something like”, which is very different of “use this”. It’s an example, not the absolute solution! 😉
Let’s wait for Allan’s reaction before continuing this discussion. For the moment, the only important thing related to this post is:
$goal = xprofile_get_field_data( 'Your goal', $user_id );
Function reference.
Have you read this tutorial ?
Note that most of BP custom functions for core are better handled when living in bp-custom.php. Sometimes also, a same function may work from within one file, but not from the other. In other case, which file has no real importance.
Even if in background there is a hierarchy and a load order, to take in account for the file choice.
That said, as it is related to CPT, bp-custom is the best place IMO.
Theme’s functions.php contains functions related to theme, templating and evtl. wp stuff
BP custom functions goes to bp-custom.php
It’s also better for you to have such separated functions.
Inside your theme, make sure there is a file wp-content/themes/your-theme/buddypress/activity/post-form.php. If there is no file in that location copy this file wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/post-form.php into the first location.
Then, look at line number 28 – 32 of post-form.php.
From there, you will notice you can change this text for the activity update form which reads “What’s new in “GROUP NAME” if you’re on a group page posting the update or “What’s new USERNAME” if you’re any where else.
So, to swap in a specific profile field you’d need to supply a bit more about the nature of your project and how it’s setup. You could simply drop in some static text, but if you want it to relate to a specific profile field in a dynamic way then please elaborate further.
Hi,
I’m running a plugin called ignitiondeck for wordpress. This plugin creates a custom post type for projects called ‘ignition_product’. These pages allow for comments, but I can’t get buddypress to track mentions in these comments.
Site tracking is on and comment notifications works for my page comments. I’ve tried using in my functions.php but it doesn’t help.
add_filter ( ‘bp_blogs_record_post_post_types’, ‘activity_publish_custom_post_types’,1,1 );
function activity_publish_custom_post_types( $post_types ) {
$post_types[] = ‘ignition_product’;
return $post_types;
}
Running 2.6.1.1
I want to enable users to add custom metadata fields to their status updates.
Like this: http://imgur.com/kMgx7PS
How do I do that with BuddyPress?
The plugin allows users to select different privacy levels for their activities but the buddypress embed feature allows all activities to be embedded regardless of their privacy level. How can I fix this?
I’ve got a member header with some general stats inside. One of which is a profile completion percentage.
In order to achieve this, I’ve done the following inside member-header.php
<?php
global $bp, $wpdb;
$user_id = $bp->displayed_user->id;
$total_rows = count($wpdb->get_results("SELECT DISTINCT object_id FROM wp_bp_xprofile_meta"));
$total_completed = count($wpdb->get_results("SELECT DISTINCT field_id FROM wp_bp_xprofile_data WHERE user_id = $user_id")) - 1; // Minus one for Base profile field.
$percentage = number_format($total_completed / $total_rows * 100, 0);
?>
Then just echo $percentage.
Will this affect the overall performance of my BuddyPress installation, if so when? Why? and what’s the better way to achieve this?
For now, I’m happy with it.
Hi all
There is something I can’t get my head around.
I installed the paid membership pro and buddypress plugin. I added 3 membership levels; free, gold, platinum.
In Buddypress I associated the register page with the page called register (I am sure it’s the paid membership pro one).
In the main menu I added Register and it points to the membership levels page of paid membership pro and then it goes to my membership level pages; so far so good.
In posts I added a ppost that I linked to a category; the category is only for gold and platinum members. Paid membership pro does a good job when I click that post as a visitor, it shows me the message it is content for gold and platinum. But…
Beneath this message are 2 buttons; login and register. They both point to the default login and register page in WordPress. I want this to point to membership levels page so visitors can sign up.
How can I solve this? Maybe i am overlooking something, but after 6 hours of puzzling with WordPress i may have overlooked something
After I click the Register button on the registration page, the text about “Check Your Email to Activate Your Account” does not display. It is hidden with an element style “display:none;”. I can’t figure out why that is there or how to remove/change it. The activation email is sent so the registration is working. It’s just that the text is hidden. I did change the slug for the register page via WP admin, but according to the codex that’s the way to do it. Any ideas for how to get the text back? Here’s the source code, along with some around it:
<div id="main" class="clearfix " style="">
<div class="fusion-row" style="">
<div id="content" class="" style="float: left;">
<div id="post-0" class="bp_register type-bp_register post-0 page type-page status-publish hentry">
<span class="entry-title" style="display: none;">Check Your Email To Activate Your Account!</span>
<span class="vcard" style="display: none;">
<span class="fn"></span>
</span>
<span class="updated" style="display:none;">2016-06-21T19:03:57+00:00</span>
<h3 class="entry-title">Check Your Email To Activate Your Account!</h3>
<div class="post-content">
<div id="buddypress">
<div class="page" id="register-page">
Hi,
if nothing made sense of what you already read, i doubt i can help you as i would certainly repeat the same things… 😉
Nickname doesn’t exist in WordPress. On a WP install, a new user is only asked for a username(generally it’s a nickname like creatorsite), an email and a password. That’s all!
By convinience, a WP user can add his first and last name to his profile, but it is not an obligation.
When BP is added, he adds a mandatory field called Name which can by filled with first and last name or whatever else. Only the field is mandatory, not the content. And you can change his nale to what you want. Eg. Your dogs name. An other difference for this field is that it let you enter uppercase and space, what the WP username field doesn’t allow. BP use this field to synchronize members from WP and those registered once BP is activated.
Users are handled by WP, not by BP which is only a plugin, btw. both use the same DB user table.
Here a complete description of WP’s database, and read attentively the part related to wp_users.
Nickname = username. Your question is related to username vs. display_name.
Read here for a solution.
ps: your picture mention that nicknames can eliminate a security issue. Which one exactly ? i’m curious to learn how over 200 000 active BP sites are threatened by hackers seaking for usernames in 2016 !