Still a problem. Perhaps a better, clearer, more easily answered question would be “How can I override buddypress javascript?”
SKParticipant
@henrywright
Unfortunately no updates. The wireframes have been done for a while, but I don’t believe a decision has been taken.
@ciromanigrasso
Please visit and chime in at
https://buddypress.trac.wordpress.org/ticket/4132 and https://buddypress.trac.wordpress.org/ticket/5583
Anyone know how to overload an existing BP 2.0 template from a plugin that is not creating a new component?
For example, overload this template – from a plugin:
\buddypress\bp-templates\bp-legacy\buddypress\members\single\member-header.php
[ And yes, I’ve read the codex articles by imath and r-a-y ]
dear all, i am using buddypress v. 2.0.1 and wordpress 3.9.1.
I would like to create a multi step registration. For example: I would likr set up a registration process in 2/3 different steps: (i) account info with username, password, email address, (ii) personal info like gender, age… (iii) define your personal profile:i.e. If you are a student or a teacher and if you are a student what kind of course you attend, your hobbies,… or if you are a teacher, what is your subject…there are just few solution on the web regarding this problem, but no one seems to definitive.
Does anyone has a solution or plug-in for that?
thank you all…
I created a Buddypress page to replace the current php site that I’ve been using. When I tried copying all the Buddypress files over, though, I got only a blank page. I was able to load a backup of the old site and get it working, but now the test site only loads a blank page (I created it in a subdirectory). Any thoughts of where to even begin looking for the problem? Index.php is there, so you can land on the page – it’s just blank.
http://www.larrymac/dcpress
Thanks for any assistance.
Probably a theme issue. Which one do you use ? If you use a premium theme, you should ask on the theeme support anyway, not here.
Read here.
@ciromanigrasso
open a new tread please – this one is 3 1/2 years old…. 👿 – read here before and explain YOUR issue!
Thx
@simpleone,
you found the reason why it doesn’t work on one site and not on the other !
1.9.1 and 2.0.1 are sligthly different BP version !
And the function you mention whas only introduced in BP 2.0, so this can’t anyway work on previous versions.
Actually there is a small bug in BP 2.0+ when using this function to modify profile groups. I opened a ticket about this and @imath provided a patch that works and let the function handle correctly on profile groups. I personnally use this function to conditionnally show/hide fields from the base group without problems. My profile form contains over 20 fields in differents groups, even Base, and are all required and viewable by members only.
I advise you to cancel whatever you have done about this so far, to apply the patch, to add the function to bp-custom.php and to test again.
Please don’t post BP files, it’s really unnecessary. We’re all BP user ! 👿
Sorry, i didn’t correctly understand your request. I thought you wanted to change the order of the selectbox filters. If you also interested, see this old tread.
SWA shows by default all site activities and they can be filtered. It is well documented on the Codex.
If for some reason you don’t want to modify a theme file, you can use a custom function and put it into bp-custom.php
Example ( BP 2.0+ only)
function make_swa_show_notice_only( $retval ) {
if ( bp_is_page( 'activity' ) ) {
$retval['action'] = 'activity_update';
}
return $retval;
}
add_filter( 'bp_after_has_activities_parse_args', 'make_swa_show_notice_only' );
Now the swa shows only notices (if exist). If you need to see a member activity, you have to go on his profile. Same for groups, the activity is only on the group page.
heres my code….
<?php do_action( 'bp_before_directory_activity' ); ?>
<div id="buddypress">
<?php do_action( 'bp_before_directory_activity_content' ); ?>
<?php if ( is_user_logged_in() ) : ?>
<?php bp_get_template_part( 'activity/post-form' ); ?>
<?php endif; ?>
<?php do_action( 'template_notices' ); ?>
<div class="item-list-tabs activity-type-tabs" role="navigation">
<ul>
<?php do_action( 'bp_before_activity_type_tab_all' ); ?>
<li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php esc_attr_e( 'The public activity for everyone on this site.', 'buddypress' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>
<?php if ( is_user_logged_in() ) : ?>
<?php do_action( 'bp_before_activity_type_tab_friends' ); ?>
<?php if ( bp_is_active( 'friends' ) ) : ?>
<?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
<li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>" title="<?php esc_attr_e( 'The activity of my friends only.', 'buddypress' ); ?>"><?php printf( __( 'My Friends <span>%s</span>', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?></a></li>
<?php endif; ?>
<?php endif; ?>
<?php do_action( 'bp_before_activity_type_tab_groups' ); ?>
<?php if ( bp_is_active( 'groups' ) ) : ?>
<?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
<li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/'; ?>" title="<?php esc_attr_e( 'The activity of groups I am a member of.', 'buddypress' ); ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
<?php endif; ?>
<?php endif; ?>
<?php do_action( 'bp_before_activity_type_tab_favorites' ); ?>
<?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
<li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/'; ?>" title="<?php esc_attr_e( "The activity I've marked as a favorite.", 'buddypress' ); ?>"><?php printf( __( 'My Favorites <span>%s</span>', 'buddypress' ), bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
<?php endif; ?>
<?php if ( bp_activity_do_mentions() ) : ?>
<?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
<li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php esc_attr_e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><span><?php printf( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></span></strong><?php endif; ?></a></li>
<?php endif; ?>
<?php endif; ?>
<?php do_action( 'bp_activity_type_tabs' ); ?>
</ul>
</div><!-- .item-list-tabs -->
<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
<ul>
<li class="feed"><a href="<?php bp_sitewide_activity_feed_link(); ?>" title="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
<?php do_action( 'bp_activity_syndication_options' ); ?>
<li id="activity-filter-select" class="last">
<label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
<select id="activity-filter-by">
<option value="-1"><?php _e( 'Everything', 'buddypress' ); ?></option>
<option value="activity_update"><?php _e( 'Updates', 'buddypress' ); ?></option>
<?php if ( bp_is_active( 'blogs' ) ) : ?>
<option value="new_blog_post"><?php _e( 'Posts', 'buddypress' ); ?></option>
<option value="new_blog_comment"><?php _e( 'Comments', 'buddypress' ); ?></option>
<?php endif; ?>
<?php if ( bp_is_active( 'forums' ) ) : ?>
<option value="new_forum_topic"><?php _e( 'Forum Topics', 'buddypress' ); ?></option>
<option value="new_forum_post"><?php _e( 'Forum Replies', 'buddypress' ); ?></option>
<?php endif; ?>
<?php if ( bp_is_active( 'groups' ) ) : ?>
<option value="created_group"><?php _e( 'New Groups', 'buddypress' ); ?></option>
<option value="joined_group"><?php _e( 'Group Memberships', 'buddypress' ); ?></option>
<?php endif; ?>
<?php if ( bp_is_active( 'friends' ) ) : ?>
<option value="friendship_accepted,friendship_created"><?php _e( 'Friendships', 'buddypress' ); ?></option>
<?php endif; ?>
<option value="new_member"><?php _e( 'New Members', 'buddypress' ); ?></option>
<?php do_action( 'bp_activity_filter_options' ); ?>
</select>
</li>
</ul>
</div><!-- .item-list-tabs -->
<?php do_action( 'bp_before_directory_activity_list' ); ?>
<div class="activity" role="main">
<?php bp_get_template_part( 'activity/activity-loop' ); ?>
</div><!-- .activity -->
<?php do_action( 'bp_after_directory_activity_list' ); ?>
<?php do_action( 'bp_directory_activity_content' ); ?>
<?php do_action( 'bp_after_directory_activity_content' ); ?>
<?php do_action( 'bp_after_directory_activity' ); ?>
</div>
The buttons on the individual profile and group pages have completely disappeared. Buttons like “Add Friend” and “Join Group” are completely absent. What may have caused this and how can I get them back? Running WordPress 3.9.1 and BuddyPress 2.0.1.
Check out this article on what hooks are and how you can use them to interact with WordPress and BuddyPress:
https://codex.wordpress.org/Plugin_API
Hi, By default messages component is not visible to other users while viewing profile in buddypress. But I am working on a site where I have to show messages to other users. Don’t know how to do this. I did some code and can successfully show the messages tab for other users but can’t show the messages under that tab. Please help. Thanks
Hello,
after upgrading buddypressto version 2.0.1 admin bar is not shown in any custom page. I load custom pages with bp_core_load_template function. The templates are created in FriscoForBuddypress child theme. WordPress version is:Version 3.9.1
Does anyone else face the same problem? What can i do to show admin bar again?
Thanks.
Sorry, I am new to WordPress and BuddyPress so I Need some more information.
You simply have to modify the html order of the select you will find in /wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/index.php.
This will only affect the site wide activity Show: [All]
If you want the same behaviour on all activity pages, you have to change accordingly each index.php file of each activate component.
The only one I have personally tested is this: https://wordpress.org/plugins/bp-moderation/
It’s clunky but seems to work. I have no idea what mess it might create in the database.
For any community or social networking platform to survive, it’s essential that content moderation can be divested to and distributed amongst the end-users. IMHO this sort of functionality should be bundled with BuddyPress.
In addition, i woud warn any user who want to use bp_parse_args to exclude profile groups (exclude_groups only), that you will get a php warning.
To avoid this, please read this ticket and apply the patch (BP 1.5 to 2.0.1).
SKParticipant
if this part of the core functionality (and the chat as well), then so much the better.
I agree. And if you do feel that way, you should go say so at the Trac ticket https://buddypress.trac.wordpress.org/ticket/4126
Hi @SimpleOne,
read from line 154 in bp-xprofile-classes.php file. It contains many information for what you want to do.
See also on Codex here and here
You can also revert your changes back and use this kind of function (goes into theme’s functions.php or bp-custom.php):
function simple_one_hide_some_profile_fields( $retval ) {
if( bp_is_profile_edit() ) {
$retval['exclude_fields'] = '48'; //field ID's separated by comma
}
return $retval;
}
add_filter( 'bp_after_has_profile_parse_args', 'simple_one_hide_some_profile_fields' );
May this help ? 😉
I’m a total novice with PHP and need some help with creating some code to go inside my functions.php file. The code I need is a clone of the call to bp_the_profile_group_field_ids() that will filter out 3 xprofile field names that I don’t want users to be able to edit.
Background: I’ve successfully modified the edit.php file to not display those 3 “required” fields (because I don’t want users to be able to edit them). However, the problem I discovered is that after modifying the edit.php file to hide those 3 fields (which I make “required” during registration), when a user clicks “Save Changes” on their Edit Profile page, it results in the message: “Please make sure you fill in all required fields in this profile field group before saving” (even though all required fields have data in them).
Through my online research, I found that the following line of code in the edit.php file is the problem…
<input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_group_field_ids() ?>" />
Apparently, the call to bp_the_profile_group_field_ids() which creates a list of the expected field names does not have a filter. So I would need to clone that function in my functions.php file and manually filter out my 3 desired fields from the string that gets generated.
Anyone able to help with this… PLEASE?
I fixed the issue by enabling Extended Profiles in the buddypress settings. I had it disabled since I only needed very basic member functionality. And now the activation page works great.
I fixed the fatal error by enabling Extended Profiles in the buddypress settings. I had it disabled since I only needed very basic member functionality. And now the activation page works great.
Thanks for the help 🙂