So I realised looking at this page:
Profile Fields Loop
That I have no idea how it’s getting its data.
There’s no arrays or variables being set. There’s these functions:
bp_has_profile()
bp_profile_groups()
and so on.
But none of these do any assignments of variables or results.
I suspect my PHP/programming knowledge is way out of date. Because there’s something sophisticated or hidden going on here with those functions that I just don’t understand.
As usual glad to be pointed at background reading…
I’ve been wandering around in BuddyPress and WordPress.
I’ve been slowly working out how to get data out of WordPress.
But I CANNOT figure out how to get data out of Buddypress.
In this page:
bp_profile_field_data()
There is some code that indicates how to get data back.
But no matter how I do it, I can’t get it to return any data.
I’m running the code in the middle of a WordPress page using a PHP plugin, rather than trying to create a page from scratch.
I’ve got it returning WordPress user data fine.
But getting any actual xProfile field data out is proving…. impossible.
I’m sure I’m ignorant of something really basic about how it all works…
Thanks for any help and pointing at relevant webpages.
I’m trying to set some code that copies the data from a new user across to xProfile fields.
But I’m wondering when that field creation triggers…
SO that I can insert the function into the correct location using add_action
I’m hoping that by the time WordPress gets to the ‘user_register’ function, and the actions being added, that the xProfile fields have been created…??
@grbarrie user base is shared with multisite; you can keep BuddyPress on Primary site and WooCommerce at SubSite.
Anyone who is registering at the primary site or subsite will have access on both.
I think you should submit this as a feature request in BuddyPress Trac
I would also like to see this as a feature. I think that it should integrate with messaging, you you can add a bunch of friends into a category and choose to message that category for example. I’d also like to see activity shares to these categories.
What plugin did you use to add the option to only display a menu item to logged in users? Seems like that is what is not functioning. hiding the activity link by hiding the menu item does not hide the activity page from non logged in users, if they know the url they will still be able to view it, to prevent that you should explore the security options available to you. There a number of privacy plugins for bp with a range of features, is it only the Activity page you want to hide?
BuddyPress uses the default WordPress login page, there’s a number of customisers for this, for example: https://wordpress.org/plugins/admin-custom-login/
Thank you so much everyone for your time and wisdom!
I decided to use BuddyPress as it’s never going away, the functionality is endless, it’s not expensive in the formation stage, there are tons of developers, and there is lots of support.
So thank you @venutius, and @vapvarun, and @krioteh.
All of your feedback is very helpful in my process to decide in using BP moving forward. Yes, I do not have a lot of time and a one-stop shop like Peepso may make sense now. Yet, my community is still in the birthing stage and it’s best to leave things open as to where it needs to go.
I would like to create a woocommerce shop for my site as a subdomain. Is it possible to have user accounts on my top level domain work with the subdomain? So users that have registered with http://www.example.com have their account info accessible in shop.example.com and vice versa.
Thanks,
Graeme
On BuddyPress settings enable User Groups
@galador WordPress login is same as BuddyPress login; you can create a themed login page as well.
IF you are concern about WordPress.com login options, it might be possible you have enabled it inside Jetpack plugin setting, you can disable from Jetpack option https://jetpack.com/support/sso/
@fuxwit Please make sure same register page is linked to BuddyPress setting.
Sometimes slugs are different like register-2
So I’m having a really frustrating time getting BuddyPress to show all groups and fields, even if they have no data in them.
I found this page:
Profile Fields Loop
It talks about the bp_group_has_profile() function. And parameters that can be applied. BUT that function is NOT in the example code on that page.
I tried applying some of that information to
public_html/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/profile/profile-loop.php
But bp_group_has_profile does not exist in the above file.
How does this information apply to showing all the fields and Profile Groups?
When I search for the individual functions (like bp_profile_group_has_fields) in the BuddyPress site, they don’t seem to exist…
Are these standard functions?
I’m very confused about how to make this work.
I also found this page:
https://wordpress.stackexchange.com/questions/243884/how-to-display-profile-fields-with-no-data-in-buddypress-profile-view
But that involves removing bits, rather than using function calls… Is this the way to do it?
Thanks for any insight
Hello Everyone,
What I am looking to do seems so simple. If there is no solution, I will accept that but I wanted to make one final attempt to seek help on this forum.
Goal #1 – I want the buddypress “favorite” button in the activity stream to create an update in the “buddypressmain activity stream” when clicked.
Example: User Just Favorited A Photo (This shows in the member stream but I want it displayed in the main activity)
Goal #2 – I want the favorite button in wordpress post, which when clicked creates the following activity –
http:/testsite.com/post-123/#activity-1955
I would like to create an activity in the main buddypress stream to display favorited post.
I would like to accomplish this without a plugin. If anyone has info or can direct me to info I am thankful!
Thanks!
Hi all,
In some mails that Buddypress sent yo users there is a footer. This footer contains an “Unregister” link that is wrong. It takes to:
https://myweb.com/members/username/settings/notifications/
This URL returns a 404 error, and it’s becouse the link should point to:
https://myweb.com/members/username/settings/
I have to modify the pattern of the URL in the footer of the emails, but if I go to emails–> Customize I have a “Footer” option where I can modify the text of the footer that appears before that “unsubscribe” link, but that link doesn’t appear at all.
Regards
WordPress 4.9.5 -> BuddyPress 2.9.4 -> Agama Blue Child Theme
I ended up with the below code from posts in these forums but it doesn’t do quite what I need it to do.
Users should not be able to see other users’ friends so the Friends tab when viewing another user’s profile page must be removed along with the functionality. Here’s my code:
function bpfr_hide_tabs() {
if ( !is_super_admin() && !bp_is_my_profile() ) {
bp_core_remove_subnav_item( 'profile', 'friends' ); // This does nothing
//bp_core_remove_nav_item( 'friends' ); //Or this but this also hides the Friends main menu item, not just the Friends tab in the user's profile page
}
}
add_action( 'bp_setup_nav', 'bpfr_hide_tabs', 15 );
I’ve switched between both options in the code. bp_core_remove_subnav_item( 'profile', 'friends' ); doesn’t really do anything and bp_core_remove_nav_item( 'friends' ); does remove the Friends tab from another user’s profile but it also removes it from the main menu which is a different thing. The main menu Friends link points to my own Friends whereas the Friends tab in another user’s profile points to their friends. Any help would be appreciated.
Chat – BP Better Mesage :replaces the standard message system BuddyPress supports attachments (video including) and smilies, you can also conduct group discussions
groups, extended profiles, news areas, activity feeds – this is a full-time functional BuddyPress
polls – bbPress + GD Topic Polls, WP Easy Poll PRO also allows users to create polls
for photos and albums (in addition to the voiced options), you can also try BuddyDrive
but in general, you can see a list of plugins in my profile – there are a lot of things for BuddyPress (not all work correctly, but most of it is used on the sites I follow)
https://profiles.wordpress.org/krioteh/#content-favorites
🙂
Whenever a new user registers for my site, wordpress asks them for an email. Is there a way to circumvent this? I used buddypress back in 13-14 so I don’t remember if there was a specific feature I used to avoid this. I essentially want my users to be able to use the entire site from the front end and avoid any use of wordpress.
Thanks @venutius.
I’m actually using Paid Memberships Pro plugin for my memberships management and they just recently released a BP integration which takes care of the xprofile fields plugin problem as I was told by one of their tech support. It is better installed when you just create your site as they still have to create syncing issues between their fields and regular old xprofile fields for older members – currently this syncing is not available but will be. So as a result I will have to manually move the data over from the members prior to using their integration (about 200 people but it’s doable) . I’m waiting for the code to be installed on my site by their tech support to do this.
But if anyone is interested, they should check out PMPro for managing bp or other memberships, it really is great and it’s always supported. I am using the Pro version which is expensive per year however you get great tech support and they will go into your site to modify things and help you install various add ons and integrations. This BP integration plugin is available in free version too I believe. If you have a serious memberships site where you do or intent do make money, it’s worth to pay for the yearly fee though for support and access to more add ons.
I’ve tried other membership plugins and just wasn’t working for me.
Hopefully the old xprofile fields plugin can be cloned by someone for those who are not going to use PMpro. It’s odd that there are not many options for this plugin and it’s not supported as it’s very essential.
Here’s PMPro info:
Paid Memberships Pro
The integration plugin below, you need the above memberships plugin installed though:
Paid Memberships Pro – BuddyPress Add On
The bp_core_template_plugin function is loading plugins.php from the bp-templates directory, which can be overloaded by placing your own template file in themes/child-theme/buddypress/members/single/plugins.php that’s one way of doing it. another way is to register your own template directory (inside plugin for example) and tell bp to load that.
Hello,
I’m working on a project and could use some assistance.
With bp_core_new_nav_item(), I’ve created a new tab in profiles, called Projects. (See image) I just have not been able to figure out where to create a template for the contents of the tab.
Image
Would it have to do with the setting ‘screen_function’ ??
Thank you in advance!
Hi Vapvarun, thanks for your response. However, it’s not just an auto installer glitch. I don’t think you know “free.fr” host. This host DOES requires the use of “index.php” in the permalinks structure, you just get 404 errors otherwise.
This a restriction imposed by this host provider. “Free.fr” is free but it imposes several restrictions in exchange. For example, out-going traffic, auto-updates, newsletters, private sites, and any rewrite rule in the “.htaccess” are all forbidden.
That’s why I was looking for a way to make buddypress working with “index.php” in the permalink structure. In the end, I gave up but it’s a shame cause buddypress is really a great plugin. I’d still be very interested if someone by any chance knows what I need to modify in buddypress to make it work for my particular case.
Did you try calling:
$bp = buddypress();
$user_id = $bp->displayed_user->id;
Hi Venutis! Thank you for the tip 🙂
But I found this code online created by a fellower named Brajesh Singh that worked very well. I just pasted it into my child theme’s functions.php
//////////////////////////////////////////////////////////////////
// BuddyPress send private message button
//////////////////////////////////////////////////////////////////
/**
* Get a link to send PM to the given User.
*
* @param int $user_id user id.
*
* @return string
*/
function buddydev_get_send_private_message_to_user_url( $user_id ) {
return wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . bp_core_get_username( $user_id ) );
}
/**
* Shortcode [bp-pm-button username=optional_some_user_name]
*
* @param array $atts shortcode attributes.
* @param string $content content.
*
* @return string
*/
function buddydev_private_message_button_shortcode( $atts, $content = '' ) {
// User is not logged in.
if ( ! is_user_logged_in() ) {
return '';
}
$atts = shortcode_atts( array(
'user_id' => '',
'username' => '',
'label' => 'Send Private Message',
), $atts );
$user_id = absint( $atts['user_id'] );
$user_login = $atts['username'];
// if the username is given, override the user id.
if ( $user_login ) {
$user = get_user_by( 'login', $user_login );
if ( ! $user ) {
return '';
}
$user_id = $user->ID;
}
if ( ! $user_id ) {
if ( ! in_the_loop() ) {
return '';
}
$user_id = get_the_author_meta('ID' );
}
// do not show the PM button for the user, if it is aimed at them.
if ( bp_loggedin_user_id() === $user_id ) {
return '';
}
// if we are here, generate the button.
$button = sprintf('<a href="%1$s">%2$s</a>', buddydev_get_send_private_message_to_user_url( $user_id ), $atts['label'] );
return $button . $content;
}
add_shortcode( 'bp-pm-button', 'buddydev_private_message_button_shortcode' );
@venutius that poll plugin is very old and not working, their codes are 6-year old https://github.com/Themekraft/BP-Polls
You can check https://wbcomdesigns.com/downloads/buddypress-polls/
@glenndavis007 I have also created a couple of add-ons for PeepSo recently like bbPress integration, wpForo integration, LifterLMS Integration.
You can ask for any plugin suggestion, and we will guide you a best available solution for it, and you can pick which one fits your site entirely.
For Gallery Solution, You can check for rtMedia or MediaPress; both have the similar features.