Forum Replies Created
-
Yeah, this issue has already been reported on Trac:
https://trac.buddypress.org/ticket/2681In reply to: Bp prevents installing *big-size* plugins?Could be a memory problem.
Have you tried manually uploading the plugins to the server via FTP and then activating them in the admin area?
In reply to: Plugin manager for WordPress MUApparently, the link no longer exists on WPMUDev; the developer of the plugin says the next release will be available on wordpress.org/extend/plugins/.
Mason has posted a modified version here:
http://premium.wpmudev.org/forums/topic/plugin-commander-or-plugin-manager#post-60823In reply to: How can I add embed.ly support@risi @modemlooper – Just added a sticky for this over here:
https://buddypress.org/community/groups/oembed-for-buddypress/forum/topic/embed-ly-plugin-support/In reply to: redirect to /registerLike I said, if you’re using any caching or redirecting plugins please disable them and test.
Sorry about that! I thought it would work. Looks like BP is missing some template tags for this.
This will work.
Add the following to your theme’s functions.php:
`
function bp_topic_poster_is_admin() {
global $topic_template;
return BP_Groups_Member::check_is_admin( $topic_template->post->poster_id, bp_get_the_topic_object_id() );
}function bp_topic_poster_is_mod() {
global $topic_template;
return BP_Groups_Member::check_is_mod( $topic_template->post->poster_id, bp_get_the_topic_object_id() );
}`Then use this in your template:
`if ( function_exists( ‘bp_topic_poster_is_mod’ ) ) :
if ( bp_topic_poster_is_mod() ) echo ‘Group Moderator’;
endif;`Try it!
Be sure to wrap it around php tags though.
“
In reply to: redirect to /registerI don’t understand your issue; I navigate straight to this URL:
http://www.eziny.net/I am able to access your posts without being redirected to the register page.
In reply to: Change Avatar in BuddyPress.orgIt’s a server thing with the way the *press.org sites are hosted; don’t ask me the specifics as I have no idea!
If you really need to show an avatar, then follow what modemlooper said.
Yeah, the second code; I was just trying to explain where you can find useful functions for groups
In reply to: bbPress plugin – Groups?BuddyPress’ forums are group-specific like the forums on Facebook’s group pages.
If you’re looking for a traditional forum, then stick with phpBB.
Also, stay tuned to the new bbPress WordPress plugin:
https://trac.bbpress.org/timelineThere will probably be an alpha release for that in the next month or so.
Check out /buddypress/bp-groups/bp-groups-templatetags.php.
In particular, here are the conditional functions you’re looking for:
`bp_group_is_admin(); // will return true if the user is a group admin
bp_group_is_mod(); // will return true if the user is a group mod`
Use in a conditional statement and you’re good to go!
eg.
`if ( bp_group_is_mod() ) echo ‘Group Moderator’;`
In reply to: How to get topic starter’s username?It’s better to be clear when posting!
You can use this snippet in your theme’s functions.php:
`function ray_bp_get_the_topic_last_poster_name( $name ) {
global $forum_template;return str_replace($forum_template->topic->topic_last_poster_displayname, $forum_template->topic->topic_last_poster_login, $name);
}
add_filter( ‘bp_get_the_topic_last_poster_name’, ‘ray_bp_get_the_topic_last_poster_name’ );`This snippet is part of my BuddyPress Usernames Only plugin, which you might be interested in:
https://wordpress.org/extend/plugins/buddypress-usernames-only/In reply to: redirect to /registerIf your site has open registration like you say, then users shouldn’t be redirected to the register page when they’re trying to read a post.
Do you have any redirection or private BuddyPress plugins installed?
In reply to: How to get topic starter’s username?@imjscn – Works for me.
Like I said, the code only works during the forum topic loop.
The corresponding template is:
/groups/single/forum/topic.phpLook for this line:
“
Then, add the following and see what pops up on the screen:
“
In reply to: Creating custom pagesCheck out the BP Skeleton Component:
https://wordpress.org/extend/plugins/buddypress-skeleton-component/It teaches you how to create a whole plugin for BuddyPress; you won’t need to use all the code in the skeleton component, but it’ll help you structure your code for BP.
The functions you want to look at in particular are:
`bp_example_setup_globals()
bp_example_setup_nav()`Both are located in bp-example-core.php.
Hope that helps.
In reply to: notify site admin when user updates profileThere are two hooks BuddyPress uses when editing a profile that you can hook into:
`do_action( ‘xprofile_profile_field_data_updated’, $field_id, $_POST );
do_action( ‘xprofile_updated_profile’, $bp->displayed_user->id, $posted_field_ids, $errors );`These actions are in the xprofile_screen_edit_profile() function in bp-xprofile.php.
If you’re unfamilar with WP plugin development, check out the WP Plugin API:
https://codex.wordpress.org/Plugin_API@bigjimmysisco – Please try the amended code; I was typing on the fly and forgot to end the conditional statement!
The function_exists() conditional is important because if you ever upgrade BP Template Pack, you’ll get an error.
—
@mercime – Yeah, I’m looking forward to the release as well
In reply to: remove activity stream from front pageCreate a new WP page with the verbiage you want to add.
You might want to create your new page with a custom page template:
https://codex.wordpress.org/Pages#Creating_Your_Own_Page_TemplatesThen set this new page as your frontpage:
https://codex.wordpress.org/Settings_Reading_SubPanelThe code you’re looking for is this:
`if ( !function_exists( ‘bp_dtheme_activity_secondary_avatars’ ) ) :
function bp_dtheme_activity_secondary_avatars( $action, $activity ) {
switch ( $activity->component ) {
case ‘groups’ :
case ‘friends’ :
// Only insert avatar if one exists
if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) {
$reverse_content = strrev( $action );
$position = strpos( $reverse_content, ‘a<' );
$action = substr_replace( $action, $secondary_avatar, -$position – 2, 0 );
}
break;
}return $action;
}
add_filter( ‘bp_get_activity_action_pre_meta’, ‘bp_dtheme_activity_secondary_avatars’, 10, 2 );
endif;`Add to your theme’s functions.php.
*Sidenote: I’m working on my own “template pack” plugin, tentatively titled “BuddyPress Theme Unite!”, which will make it way easier for theme developers to add support for BuddyPress to their WP theme.
In reply to: How to get topic starter’s username?Add the following to your theme’s functions.php:
`function bp_get_the_topic_post_poster_username() {
global $topic_template;if ( !$link = bp_core_get_user_domain( $topic_template->post->poster_id, $topic_template->post->poster_nicename, $topic_template->post->poster_login ) )
return __( ‘Deleted User’, ‘buddypress’ );return apply_filters( ‘bp_get_the_topic_post_poster_username’, ‘post->poster_login . ‘”>’ . $topic_template->post->poster_login . ‘‘ );
}`Then use the following in your template:
`if ( function_exists( ‘bp_get_the_topic_post_poster_username’ ) ) echo bp_get_the_topic_post_poster_username();`
This will only work in a forum topic loop.
The code should work without friends enabled, though I haven’t tested thoroughly.
I’m guessing you’re using the BP Followers plugin?
In reply to: How to add new Group CategoryThere’s a new group category plugin that might help you out:
https://wordpress.org/extend/plugins/bp-group-hierarchy/I haven’t tested it though.
In reply to: redirect to /registerThe register page uses a BP template:
/registration/register.phpYou could add some verbiage before the registration form in that template, perhaps a link to your blog post?
If you’re currently using the bp-default theme, create a child theme, copy /registration/register.php to your child theme and modify the template anyway you like (just don’t break anything
In reply to: Buddypress Friends TableIf user #1 becomes a friend of user #2, then the wp_bp_friends will add only 1 entry to the wp_bp_friends DB, not two.
Hope that helps.