Forum Replies Created
-
You may be interested in BuddyProfileData
In reply to: more buddypress.org 'server issues' ?Thanks for the update, mercime.
Things definitely are not yet ‘back to normal’ but hopefully will be soon.
In reply to: more buddypress.org 'server issues' ?[ check re ‘0 and 0’ re replies and voices ]
In reply to: Features of BuddyPressFor ‘expert web developers’
In reply to: Cannot redeclare bp_get_groups_pagination_count()To change the output, use the filter hook in
bp-groups-template.php -> bp_get_groups_pagination_count()return apply_filters( 'bp_get_groups_pagination_count', sprintf( __( 'Viewing group %1$s to %2$s (of %3$s groups)', 'buddypress' ), $from_num, $to_num, $total ) );You can’t override functions unless they are pluggable.
https://codex.wordpress.org/Pluggable_FunctionsUsing ‘scope’ will over-ride any filters, as noted in bp-activity-template.
There are various ways to makes this a function, but it depends on your install params, hooks etc.
Following on with your approach, try putting this (untested) at the top of the main activity template.
$user_id = bp_loggedin_user_id(); $following = array(); if ( bp_is_active( 'bp-follow') ) $following = bp_follow_get_following( array( 'user_id' => $user_id ) ); $friends = array(); if ( bp_is_active( 'friends') ) $friends = friends_get_friend_user_ids( $user_id ); $me = array( $user_id ); $wall = array_merge( $following, $friends, $me ); $wall = array_unique( $wall ); $user_ids = implode( ',', $wall ); $get_users = "'user_id=" . $user_ids . "'"; if ( bp_has_activities( $get_users ) ) //etcActually, in bp-activity=template -> bp_has_activities, there is a filter ‘user_id’ that accepts a csv string.
You shouldn’t need to hack that file.Did you try getting friends & followers and then passing that into bp_has_activities ?
Something like:
$user_ids = 'user_id=' . $csv_string . "'"; if ( bp_has_activities( $user_ids ) )sorry, wrong thread
In reply to: Maximizing performance for moderate trafficYour error message refers to ‘SimplePie’, a plugin ?
Deactivate that plugin and see if you still get the fatal error.In reply to: Problems with the registration pagefunction show_xprofile_fields ( $user ) { $field_value = xprofile_get_field_data( 'x', $user->ID, $multi_format = 'comma' ); echo "x: " . $field_value . '<br />'. $field_value = xprofile_get_field_data( 'y', $user->ID, $multi_format = 'comma' ); echo "y: " . $field_value . '<br />'. } add_action( 'edit_user_profile', 'show_xprofile_fields' );In reply to: Problems with the registration pageYou don’t need to repeat the function, just add as many additional field calls as you want to the function.
In reply to: Problems with the registration page>am i missing something?
It would seem so, but I have no idea what it would be.
Did you adjust the code for your situation?In reply to: How to add a link to Friends Tab subnavTry this in plugins/bp-custom.php
In reply to: Change login landingpagePut this function in your theme/functions.php or plugins/bp-custom.php
And change ‘members’ to the slug of the page you want.function custom_login_redirect_to($user_login, $user) { bp_core_redirect( get_option('siteurl') . "/members/" ); } add_action('wp_login', 'custom_login_redirect_to', 10, 2);In reply to: Blocking members and IP's@funmi-omoba
Thank you for mentioning our BuddyBlock plugin.@tim_marston
If you’re using BP 1.7 then BuddyBlock will do exactly this:
” each individual member to be able to block another member from seeing/contacting/interacting with them”.Re IPs – there are some WordPress plugins that get IPs for posts and comments.
But the best way is to get the IP when a user registers and store it in the usermeta table.
That would probably require some custom code.
Then use htaccess to block that IP if necessary.In reply to: Problems with the registration pageIt’s easy to display profile fields in the Dashboard.
Editing the fields on that screen requires additional custom work.
If that is something you need, please go to
http://www.philopress.com/services/In reply to: Font Size for Groups/CommentsYou can adjust the font size via filters.
If you don’t know how to use apply_filters, then editing or over-riding the css is another approach.
Look for ‘mini’ and ‘acomment’.
For example, ‘mini’ can be found in
bp-themes\bp-default\_inc\css\responsive.css
bp-themes\bp-default\_inc\css\default.css
bp-themes\bp-default\_inc\css\default-rtl.cssIn reply to: [Resolved] Where is activity stream privacy?Thanks for the note re BuddyBlock
It is our most popular plugin and user response has been great !
In 1.7, you can adjust the activity query via a filter – so you don’t have to hack a core file.
Take a look at the bp_activity_get_user_join_filter hook in bp-activity-classes.php
In particular, the $where_sqlIn reply to: Can buddypress do the following?So you know how to code a plugin that creates and handles cpts ?
Then something like this in the plugin class:
add_action( 'bp_setup_nav', array( $this, 'bp_stories_tab' ), 5 ); // create the tab function bp_stories_tab() { bp_core_new_nav_item( array( 'name' => __( 'Stories', 'bp-member-stories' ), 'slug' => 'stories', 'position' => 200, 'screen_function' => array( $this, 'bp_stories_screen' ), 'default_subnav_slug' => 'stories' ) ); } // load template when tab is clicked function bp_stories_screen() { add_action( 'bp_template_content', array( $this, 'bp_stories_profile_screen' ) ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } // show the stories screen function bp_stories_profile_screen() { // etc. }In reply to: Group Text Size in The Activity Stream>Is this the way it is supposed to be?
Yes.
Why? I’ve no idea, but it’s a ‘design’ decision.You can filter the activity stream via bp-custom.
But probably be easier to locate the css that makes it smaller.In reply to: Can buddypress do the following?BP can’t do that out of the box.
You can extend it using custom post types.
No need to send them to wp-admin, they could create stories via a page within their profile.
Read and sort can be handled via the usual WP post functions, within or outside profiles.In reply to: Custom User Role Doesn't Have Sufficient PrivilegesGlad you got it sorted.
But ‘manage_options’ is a powerful cap.
I could see where you wouldn’t want to grant that cap to a custom role.Now that you can explain the issue, I suggest you submit a bug.
https://buddypress.trac.wordpress.org/In reply to: Custom User Role Doesn't Have Sufficient PrivilegesPerhaps try using an existing role, like Editor, instead of a custom role ?
And add caps to that role?In reply to: Custom User Role Doesn't Have Sufficient Privilegesalso – some role editors are funky.
Make sure it’s not that plugin.
Use this to check if your custom role really has those caps:
https://wordpress.org/extend/plugins/members/