Are there any ways to separate the Buddypress Private Messages system into pages? A long conversation can become daunting to scroll through. Also is it possible to set the newest messages to appear at the top?
For readers curious about the answer, autoembed does not run on meta items unless the dev runs it manually themselves ( @r-a-y ).
More details on BuddyPress Slack.
Hello,
I originally noticed this issue with BuddyPress Groups Extras where their Group Pages loaded through BuddyPress groups aren’t picking up the autoembeds or shortcodes. If the Group Pages are loaded outside of the BuddyPress group they function as expected.
References to the original issue;
BP 2.2 Update Broke Auto-Embeds on BP Groups Extras Pages
https://wordpress.org/support/topic/buddypress-22-breaks-vimeo-url-embeds-on-group-pages?replies=3
https://github.com/slaFFik/BP-Groups-Extras/issues/56
I came across this again as I’ve introduced a custom field ‘Group Content’ which adds content to the group overview page. Calling the_content() or apply_filters( ‘the_content’, get_the_content()) both fail to execute shortcodes and autoembeds (and probably any other the_content functions.
Here’s the include file to introducing the Group Content meta to groups;
http://pastebin.com/BsH1b00B
Then from my custom front.php for Groups I introduce the group content field through the_content filter;
<div class="group_content">
<?php
$group_content = groups_get_groupmeta(bp_get_group_id(), 'bp_group_content_editor');
if(!empty($group_content)){
echo apply_filters('the_content', $group_content);
} else {
echo "Please find any forums, documents or videos that you have access to listed in the sidebar.";
}
?>
</div>
Employing this technique I’ve found that no functions tied to the_content which would normally execute like autoembed and run_shortcodes no longer execute.
Does BuddyPress suppress these functions on the_content filter?
This seems to be the case not only in a custom field like this on the front.php but also any custom group pages introduced have the same issue.
Thoughts/Insight appreciated. I tried diving into the BP code but got a bit overwhelmed. I think it might have to do with the buddypress template loader but can’t be sure.
Anyway so this issue affects custom fields, custom pages and the plugin Buddypress Groups Extras which introduces Group Pages.
Thank you
Hi Julia,
it’s a bbPress bug, patched a while ago, but still in. Maybe a day it will be repaired definetly.
For the moment, you can repair yourself. Open activity.php in wp-content/plugins/bbpress/includes/extend/buddypress/
Replace following code block at line 277/279:
$existing = bp_activity_get_specific( array( 'activity_ids' => $activity_id, 'show_hidden' => true, 'spam' => 'all', ) );
if ( empty( $existing['total'] ) || ( 1 !== (int) $existing['total'] ) )
return null;
by
$existing = new BP_Activity_Activity( $activity_id );
if ( empty( $existing->component ) ) {
return null;
}
Save and reload to to your site by FTP and you’re done.
Private group options are
- Only users who request membership and are accepted can join the group.
- This group will be listed in the groups directory and in search results.
- Group content and activity will only be visible to members of the group.
To modify option 3, you can code something.
Read from here.
Since the last BuddyPress update, each time someone edits something they’ve posted in the BBPress forums on my site the forum post re-appears on the activity stream.
This means that if someone edits a post several times their post appears multiple times in the feed.
Hope someone can help. Thanks 🙂
Hi @danbp,
Thank you for your reply.
I wrote bp-custom.php inside the folder( wp-content/plugins/).
I would link to add extra field inside the file( buddypress/bp-themes/bp-default/activity/post-form.php) and need to insert that value on the table (wp_bp_activity_meta). I wrote the function for this purpose. Unfortunately its not working. please help.
function add_meta_to_activity( $content, $user_id, $activity_id ) {
bp_activity_update_meta( $activity_id, 'option1', $_POST['option1'] );
}
add_action( 'bp_activity_posted_update', 'add_meta_to_activity', 10, 3 );
Hey folks,
I’m hoping someone has ideas for how to tackle this.
When I first installed Buddypress I turned off the ability to add forums to groups.
I’m now trying to get it to work again.
I’ve turned the setting on in BBPress to allow forums for groups, and set a forum root to a category forum.
I then went to groups in wp-admin and check the box next to a group to create a forum.
The group forums show up nicely in the forum list next to site wide forums.
However when I click on the forums I get a 404.
I’ve tried settings/permalinks switching back and forth
Delete/recreating forums and groups
Using the forums tools to recalcuate everything
Still no luck.
Any ideas on how to fix the 404 errors?
thx
v
?????
Some details perhaps ?
Groups
Hi @famous,
anything directly related to URL for bp is listed here:
http://hookr.io/plugins/buddypress/#index=l&search=url
In most case, you can built a link by array, which generally extend pre existing parameters. It’s very variable and depend where and how the link shoud work.
Here some exemple snippets to add a link to a member’s profile.
/* add external link on buddy menu bar */
function bpfr_menubar_link() {
global $bp;
if ( !is_user_logged_in() )
return false;
$link = bp_get_loggedin_user_link();
$bp->bp_nav[$slug] = array(
'name' => 'View my profile',
'slug' => 'super_link',
'link' => $link,
'css_id' => 'super-link',
'position' => 20
);
}
add_action( 'bp_core_new_nav_item', 'bpfr_menubar_link', 999 );
/* link to profile on SWA page */
function goto_my_profile_tab() {
if ( !is_user_logged_in() )
return false;
if ( bp_is_active( 'xprofile' ) )
echo '<li><a href="'. bp_get_loggedin_user_link() .'">View my profile</a></li>';
}
add_action( 'bp_activity_type_tabs', 'goto_my_profile_tab' ); // SWA page
add_action( 'bp_members_directory_member_types', 'goto_my_profile_tab' ); // members directory page
/* shortcode linking to profile [xyz] */
function bpfr_link_to_profile() {
return '<a href="'. bp_get_loggedin_user_link() .'">View my profile</a>';
}
add_shortcode( 'xyz', 'bpfr_link_to_profile' );
Another technique for groups here.
In hope this will help you to go further.
Does someone know how to specify buddy press urls? For instance:
<?php echo esc_url( home_url( '/' ) ); ?>
the above is to point to WordPresses homepage.
But what is the url for a buddypress’s profile, sites, etc… page?
Thank you!
Gmail ignores dots in the name of emails. Useful if you want to use one email to keep test registering for a site without having to use multiple emails. But it seems Buddypress gets a bit confused if there are 2 dots in a row. So, I’ll get a confirmation email at myname@gmail.com and my.name@gmail.com but my..name@gmail.com slips by validation filters but the email nevers sends ( even though admin says email was sent successfully ). Ideas?
Hi!
My website was working ok until i found this error message.
Fatal error: Call to undefined function bp_get_members_member_type_base() in
wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php on line 289
I’m not used to modify this kind of things…
Any help please?
Thanks!
that’s correct, BuddyPress filters the the_content of a BP page so anything you add to the content editor will not show. BuddyPress uses your themes page.php for all its pages so its kind moot to add content in the editor unless its something to display site wide. You are better off hooking to bp template hooks to display extra content on specific pages.
Hey,
I’m using Buddypress for my website. I have created a notice for my users and I’m using this code:
<?php if ( is_user_logged_in() ) {
echo '<span class="notice-user">
<div>
You can send friend requests and Messages to this user
</div>
<span>';
}
?>
While this is working absolutely fine for the visitors, This code also shows up the notice if the user visits his OWN profile.
So, If user XYZ visits ABC. This notice should be there but if user XYZ visits his OWN profile i.e. XYZ’s profile, this notice should not be there.
Any idea How can I do that?
Thanks in advance!
Better yet, it would be nice if there was a way to change all the BuddyPress buttons globally, including “Add Friend” “Cancel Friendship,” “SEARCH,” etc.
Example:
I found this code that changes all the wordpress buttons globally, just not the login and register.
.wp-core-ui .button-primary, .button {
background: #99cc66;
border-color: #669933;
box-shadow: inset 0 1px 0 rgba(102,153,51,.5),0 1px 0 rgba(0,0,0,.15);
}
.wp-core-ui .button-primary:hover, .button-primary:active {
background: #669933;
border-color: #99cc66;
box-shadow: inset 0 1px 0 rgba(102,153,51,.5),0 1px 0 rgba(0,0,0,.15);
}
Perhaps there is a .buddypress-core-ui?????
Hey!
I want to get the last active data for an seller on my marketplace. The system uses WC Vendor with buddypress integration. I basically want to display: Active: Days, hours or Active now – how can we do so?
Thanks!
I reported this bug 4 days ago and have not response.
#7061: buddypress changing permalinks to caps
I am using wp 4.5.2 and the ispirit 1.1.2 and it replicates with the
standard themes. It happens in safari, chrome and on iphone browser.
This problem started of 5/11/16 when I discovered register and activate permalinks are
malfunctioning.
I have checked all the plugins we are using and have isolated it to only
occur when using buddy press 2.5.2
I have the links for register and activate set to
http://www.championcollegeservices.com/register and
http://www.championcollegeservices.com/activate but a blank page shows up unless
you cap the page names as follows http://www.championcollegeservices.com/Register
http://www.championcollegeservices.com/Activate
How can we fix this bug with buddy press adding the odd capitalization to the permalinks?
I can’t repair my register and activation pages for my BuddyPress Installation. I have used default themes to troubleshoot and deactivated most plugins. Still the save button won’t show. I even set to close open registration. Still no save buttons. The only save button is on the last tab of the settings page in the dashboard. Please help!
Someone helped me do this for bbpress and it looked like this:
#bbpress-forums .submit {
background-color: #0f5289;
color: #FFFFFF;
float: center;
vertical-align: middle;
border-radius: 0;
height: auto;
width: auto;
}
#bbpress-forums .submit:hover {
background-color: #0c2b44;
color: #FFFFFF;
float: center;
vertical-align: middle;
border-radius: 0;
height: auto;
width: auto;
How can I do the same with hover in buddypress?
I’m using WPMUDEV’s Membership 2 Pro plugin. I’d like to add XProfile fields to the registration form. Here’s my attempt:
<?php
add_action('signup_extra_fields', 'igi_change_reg_fields');
function igi_change_reg_fields() {
if ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile() ) : while ( bp_profile_groups() ) : bp_the_profile_group();
echo '<input type="hidden" name="'.bp_the_profile_field_input_name().'" id="'. bp_the_profile_field_input_name().'" value="'. bp_the_profile_field_edit_value().'"';
endwhile; endif; endif;
}
This produces:
field_field_
Warning: Creating default object from empty value in /home/bennyp5/public_html/israelguides.info/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-template.php on line 520
Please help me to understand where I’m going wrong.
Best,
Thanks for the feedback!
I am now testing it on my developer site. Also noticed problems with BuddyPress after restoring via VaultPress to my developer site. I got this error:
require(): Failed opening required 'Xd#�F+' (include_path='.:/usr/local/php70/pear') in /home/****/public_html/dev/wp-content/plugins/buddypress/bp-messages/bp-messages-classes.php on line 14
and
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 549755814048 bytes) in /home/****/public_html/dev/wp-content/plugins/buddypress/bp-core/classes/class-bp-component.php on line 370
So it seems that BuddyPress needs to be updated for PHP 7.0.6+
Best regards,
Michael
A Group Types API is on its way – 7 commits yesterday 🙂 https://buddypress.trac.wordpress.org/ticket/6784
Hello
I have a Multisite installation with BuddyPress. I’d like to display user’s extended profile fields in the site directory (blog loop)
Based on the documentation, I’ve tried this:
<?php
add_action( 'bp_directory_blogs_item', 'display_user_xprofile' );
function display_user_xprofile() {
$args = array(
'field' => 'Phone', // Field name or ID.
// 'field' => 'Car', // Field name or ID.
// 'field' => 'Languages', // Field name or ID.
);
$phone_number = bp_get_profile_field_data( $args );
if ($phone_number) {
echo 'Phone Number: ' . $phone_number;
// echo 'Car?: ' . $phone_number;
// echo 'Languages: ' . $phone_number;
}
}
Without success. Please advise how to display this info.