Forum Replies Created
-
And make sure that bp-custom.php goes in your wp-content/plugins directory, NOT in the theme folder.
Thanks for the example code, @mariochampion. Action order can be a bit mystifying. I assume that your action is working because it’s getting loaded after BP is, otherwise I don’t think it would work. In any case, it’s very helpful to have more data points.
Either you haven’t placed the function in the right place (should go right after the `<?php ` in your theme's functions.php), or you're not correctly referencing the nav items. Remember that they're case-sensitive.
Awesome, thanks Roger!
@ri-kun The answer to your second question is not straightforward, though it has been discussed before on this forum. I suggest posting it in another thread so that other users will be able to help you with it. You might also have a look at this plugin by @pollyplummer https://wordpress.org/extend/plugins/buddypress-sliding-login-panel/
In reply to: Update User Activitys Stream by RSS FeedThis plugin https://wordpress.org/extend/plugins/bp-external-activity/ has the basic infrastructure to do what you’re looking for, though it doesn’t yet have a way for users to enter their own RSS feeds via a front-end UI. I plan to add that in the next version.
@blogmudgeon Glad to help

@ri-kun bp_core_remove_nav_item doesn’t take multiple arguments. Try something like:
`<?php function boone_remove_blogs_nav() {
bp_core_remove_nav_item( ‘blogs’ );
bp_core_remove_nav_item( ‘groups’ );
}
add_action( ‘bp_setup_nav’, ‘boone_remove_blogs_nav’, 15 ); ?>`Add additional lines for nav items you want to remove. And make them lowercase, as the names might be case-sensitive and they are almost certainly lowercase when they are initially added.
functions.php, in your theme directory, is the appropriate place to put this. There should be no function called bp-functions.php.
In reply to: Activity stream repliesI’d do it with jquery. When the page loads, replace all but the most recent replies with a Read More link.
In reply to: How to Exclude a Group From the Groups LoopI have grand designs of adding things like exclude parameters to all the bp_has_x loops. Now that the 1.2 branch has been merged into the trunk, I can have a swing at those designs

The following function, placed into your theme’s functions.php or bp-custom.php file, will remove the Blogs nav item from the Members section of the site:
`function boone_remove_blogs_nav() {
bp_core_remove_nav_item( ‘blogs’ );
}
add_action( ‘bp_setup_nav’, ‘boone_remove_blogs_nav’, 15 );`Other top-level nav items can be removed by replacing ‘blogs’ with the appropriate name. Subnav items will work in a similar way, except using `bp_core_remove_subnav_item` and the extra $parent_id argument:
`function boone_remove_friends_activity_nav() {
bp_core_remove_subnav_item( ‘activity’, ‘friends’ );
}
add_action( ‘bp_setup_nav’, ‘boone_remove_friends_activity_nav’, 15 );`Roger’s right – bp_core_remove_nav_item() is the function you want. See bp-core.php to see how that function works.
Also, please don’t bump your question more than once every few days. This board is not so well-trafficked that you can expect an answer to every question within a few hours, especially on the weekend.
In reply to: All those premium plugins drive me crazy!I give pretty much all my work away for free, but I fully support the right of others not to do so. As @travel-junkie suggests, in the long run the community will be healthier if there are multiple paths available for developers to create GPL code and at the same time make a living. Some will do this by client work and some through premium plugins.
In reply to: Remove Automatic Links in ProfileMy plugin is not needed. Do this: https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/remove-automatic-links-in-profile/#post-32749
In reply to: Approve groups before they are listed@bmunch Your suggestion (groups can be created only by users of a certain level) would be much easier to implement than true moderation of group creation. You’d just have to wrap some of the “create a group” elements in the UI in a `if ( current_user_can() )` check, and maybe add a few such checks at the top of some key group creation functions.
With real group moderation, a lot of admin overhead is required: a UI for admins to see pending/approved groups (Group Management doesn’t do that, but it could be a step in that direction, as BPGM has all the necessary hooks and filters); a notification system to let admins know when a group is pending; a notification system to let users know when their groups have been approved; the backend functions necessary to create and check a piece of group metadata saying whether the group has been approved. This could conceivably be accomplished with a plugin (though I can think of one or two places where additional filters would be required in BP’s core code), but it would take a lot of work. Maybe one of you is up for the job
In reply to: 404 Page not foundHave you changed your permalink settings? Dashboard > Settings > Permalinks. Change them to anything except for the first option.
In reply to: Features for BuddyPressYou could hack together something like Lifestream fairly easily using https://wordpress.org/extend/plugins/bp-external-activity/. There’s no interface for it yet, but the infrastructure is all there.
Jeff Sayre has said that he’ll be releasing his Privacy Component shortly after 1.2.6 is released.
The kind of rich tagging you’re talking about really isn’t possible at the moment. Only when BP’s core components are converted into WordPress content types (like custom post types) will they be able to easily inherit WP’s taxonomy functionality. I’m guessing that will happen in the BP 1.4 range. The good news is that, once it does, tagging/categorization will be totally seamless.
In reply to: BP and Tube Site w/User Uploads? (Hodge Podge)The social features of BuddyPress are in addition to, not in place of, the ‘posting’ features of WordPress. If you set up a WP site so that users can write and publish new blog posts, BuddyPress won’t change that.
Try something like this, Anton:
`function boone_get_current_email() {
global $current_user;
get_currentuserinfo();if ( strpos( $current_user->user_email, ‘changeme.username@yourdomain.com’ ) !== false ) {
$redirect = ‘whatever your redirect URL is’;
wp_redirect( $redirect );
}
}
add_action( ‘plugins_loaded’, ‘boone_get_current_email’ );`Totally off the top of my head and untested, but you get the idea. You might have to play with where you hook it (plugins_loaded is just a guess) so that the redirect works properly.
In reply to: TaggingHere’s a helpful tutorial: http://wordpress.tv/2009/01/14/adding-categories-and-tags-to-your-posts/
In reply to: Groups Posts and Disable AvatarsThe most straightforward way is to hook a custom function to `comment_post` and `edit_comment`. The function would look something like this (mainly copied-and-pasted from bp-blogs.php, `bp_blogs_record_comment()` ):
`
function boone_record_blog_comment_to_group( $comment_id, $is_approved = true ) {$action = ‘something’; // here’s where you’ll put together the action, something like ‘[Group member] commented on [blog post]’, with the appropriate links;
$content = ‘something’; // Get the comment content from the $comment_id passed into the function
$primary_link = ‘something’; // Get the comment permalink from the $comment_id
$blog_id = ‘something’; // You’ll have to get the blog id either from $current_blog or from the comment metadata
groups_record_activity( array(
‘action’ => $action,
‘content’ => $content,
‘type’ => ‘new_blog_comment’,
‘item_id’ => $bp->groups->new_group_id,
‘secondary_item_id’ => $blog_id
) );}
add_action( ‘comment_post’, ‘boone_record_blog_comment_to_group’, 10, 2 );
add_action( ‘edit_comment’, ‘boone_record_blog_comment_to_group’, 10 );
`You’ll have to do the grunt work of figuring out how best to populate those variables at the beginning of the function, but this is a step in the right direction.
In reply to: listing membersThe members list might be disappearing now because you have “do stuff here”, which is not valid PHP. Try this:
`<a href="”>
`
Put a bp_has_forum_topics() loop inside of the groups loop, and feed in the argument max=1. See https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-forum-topics-loop/
In reply to: 404 page when replying to forum topic — Please help!Like @mercime said, please don’t start multiple topics. I’ll lock this one, so conversation can take place in the other one.
In reply to: Show: By Latest Post | By GroupI told you to use include= but I realized that you can’t pass multiple groups into bp_has_groups() in the 1.2 branch. My bad.
So you might want to try @modemlooper‘s advice. The group slug is whatever shows up in the URL as the group name. For example, a group with URL http://example.com/groups/i-am-awesome has the slug i-am-awesome. You should be able to get that group only by using the following:
`if ( bp_has_groups( ‘slug=i-am-awesome’ ) )`
Then, as Modemlooper says, you’d have to do it a couple times for each group. Or better yet, make an array and loop over it:
`$groups_to_show = array( ‘i-am-awesome’, ‘i-am-cool’, ‘bodacious’ );
foreach ( $groups_to_show as $g ) {
if ( bp_has_groups( ‘slug=’ . $g ) ) {
// do all your group-specific stuff here
}
}
`In reply to: Show: By Latest Post | By GroupHere’s the short version.
In [theme]/forums/index.php, do a conditional check for $bp->current_action == ‘grouped’. (Depending on the URL structure of your site, you might have to use $bp->action_variables[0].) In other words, the ‘grouped’ code should only be displayed if ( $bp->current_action == ‘grouped’ ).
Then do a bp_has_groups loop for all the groups you want to appear. If that’s all your groups, you can just do bp_has_groups(). If you only want to do a certain number of groups, like on this site, do bp_has_groups( ‘include=4,5,6’ ) where 4, 5, 6 are groups that you want to include in the ‘grouped’ view.
Then, inside the `while ( bp_groups() ) : bp_the_group()` loop, do a normal forums loop. Something like
`if ( bp_has_forum_topics( ‘forum_id=’ . groups_get_groupmeta( bp_get_group_id(), ‘forum_id’ ) ) )`
plus whatever arguments for max number, etc you want.